All Projects → RusticiSoftware → TinCanPython

RusticiSoftware / TinCanPython

Licence: Apache-2.0 license
Python Library for xAPI (originally Tin Can API)

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to TinCanPython

scormcloud-api-wrapper
Node.js client for the SCORM Cloud API.
Stars: ✭ 15 (-60.53%)
Mutual labels:  xapi, tincan
TinCan.NET
C#/.NET library for Tin Can API
Stars: ✭ 42 (+10.53%)
Mutual labels:  xapi, tincan
lrsql
A SQL-based Learning Record Store
Stars: ✭ 35 (-7.89%)
Mutual labels:  xapi
xapi-node
xStation5 Trading API for NodeJS/JS
Stars: ✭ 36 (-5.26%)
Mutual labels:  xapi
xAPI-Workshop
Workshop presentation and tools for a basic statement generator and reporting app
Stars: ✭ 18 (-52.63%)
Mutual labels:  xapi
xapicohort.github.io
The xAPI Learning Cohort is a free, vendor-neutral, 12-week learning-by-doing project-based team learning experience about the Experience API.
Stars: ✭ 20 (-47.37%)
Mutual labels:  xapi
xapi-authored-profiles
Repository of official xAPI Profiles
Stars: ✭ 35 (-7.89%)
Mutual labels:  xapi
lrs-conformance-test-suite
A NodeJS project that tests the MUST requirements of the xAPI Spec and is based on the ADL testing requirements repository. The test suite website can be found here: https://lrstest.adlnet.gov/. The adopters website can be found here: https://adopters.adlnet.gov/
Stars: ✭ 52 (+36.84%)
Mutual labels:  xapi
xapi
XDEV Application Framework
Stars: ✭ 12 (-68.42%)
Mutual labels:  xapi
SCORM-to-xAPI-Wrapper
APIWrapper.js file commonly used with SCORM with xAPI calls embedded
Stars: ✭ 82 (+115.79%)
Mutual labels:  xapi
xapi-profiles
A set of documents addressing the structure of and supporting services for xAPI Profiles.
Stars: ✭ 47 (+23.68%)
Mutual labels:  xapi

A Python library for implementing Tin Can API.

Build Status

For hosted API documentation, basic usage instructions, supported version listing, etc. visit the main project website at:

http://rusticisoftware.github.io/TinCanPython/

For more information about the Tin Can API visit:

http://tincanapi.com/

Requires Python 3.6 or later.

Installation

TinCanPython requires Python 3.6 or later.

If you are installing from the Github repo, you will need to install aniso8601 and pytz (use sudo as necessary):

pip3 install aniso8601 pytz

Testing

The preferred way to run the tests is from the command line.

Unix-like systems and Mac OS X

No preparation needed.

Windows

Make sure that your Python installation allows you to run python from the command line. If not:

  1. Run the Python installer again.
  2. Choose "Change Python" from the list.
  3. Include "Add python.exe to Path" in the install options. I.e. install everything.
  4. Click "Next," then "Finish."

Running the tests

It is possible to run all the tests in one go, or just run one part of the tests to verify a single part of TinCanPython. The tests are located in test/.

All the tests:

  1. cd to the test directory.

  2. Run

     python3 main.py
    

One of the tests:

  1. cd to the root directory.

  2. Run

     python3 -m unittest test.remote_lrs_test
    

    Where "remote_lrs_test.py" is the test file you want to run

A single test case of one of the tests:

  1. cd to the root directory.

  2. Run

     python3 -m unittest test.remote_lrs_test.RemoteLRSTest.test_save_statements
    

    Where "remote_lrs_test" is the test file, "RemoteLRSTest" is the class in that file, and "test_save_statements" is the specific test case.

API doc generation

To automatically generate documentation, at the root of the repository run,

sphinx-apidoc -f -o ./docs/source/ tincan/

Then from the docs/ directory run,

make html

The docs will be output to docs/build/html/.

If you would like to change the names of each section, you can do so by modifying docs/source/tincan.rst.

Releasing

To release to PyPI, first make sure that you have a PyPI account set up at https://pypi.python.org/pypi (and at https://testpypi.python.org/pypi if you plan on using the test index). You will also need a .pypirc file in your home directory with the following contents.

[distutils]

index-servers =
    pypi
    pypitest

[pypi] # authentication details for live PyPI
repository: https://pypi.python.org/pypi
username: <username>
password: <password>

[pypitest] # authentication details for test PyPI
repository: https://testpypi.python.org/pypi
username: <username>
password: <password>

The pypitest contents of the .pypirc file are optional and are used for hosting to the test PyPI index.

Update setup.py to contain the correct release version and any other new information.

To test the register/upload, run the following commands in the repo directory:

python3 setup.py register -r pypitest
python3 setup.py sdist upload -r pypitest

You should get no errors and should be able to find this tincan version at https://testpypi.python.org/pypi.

To register/upload to the live PyPI server, run the following commands in the repo directory:

python3 setup.py register -r pypi
python3 setup.py sdist upload -r pypi

The new module should be now be installable with pip.

pip3 install tincan

Use sudo as necessary.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].