Giter Site home page Giter Site logo

ryanhope2 / scormcloud-api-v2-client-python Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rusticisoftware/scormcloud-api-v2-client-python

0.0 0.0 0.0 327 KB

Swagger Generated Python Client for SCORM Cloud API v2

License: Apache License 2.0

Python 100.00%

scormcloud-api-v2-client-python's Introduction

rustici_software_cloud_v2

REST API used for SCORM Cloud integrations.

This Python package is automatically generated by the Swagger Codegen project:

  • API version: 2.0
  • Package version: 1.0.1
  • Build package: io.swagger.codegen.languages.PythonClientCodegen

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on Github, you can install directly from Github

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import rustici_software_cloud_v2

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import rustici_software_cloud_v2

Getting Started

Please follow the installation procedure and then run the following:

import rustici_software_cloud_v2 as scorm_cloud
from datetime import datetime, timedelta

# Configure HTTP basic authorization: APP_NORMAL
scorm_cloud.configuration.username = 'SCORM_CLOUD_APP_ID'
scorm_cloud.configuration.password = 'SECRET_KEY_FOR_APP_ID'

# Then (optionally) further authenticate via Oauth2 token access
app_management_api = scorm_cloud.ApplicationManagementApi()

# get Oauth2 token with a life of 60 minutes and with permission to read the registrations api
token_request = {
# the expiry expected for token request must be in ISO-8601 format
    'expiry': (datetime.utcnow() + timedelta(minutes=60)).isoformat() + 'Z',
    'permissions': scorm_cloud.PermissionsSchema(['read:registration'])
}
response = app_management_api.create_token(token_request)

# further calls with this configuration will use Oauth2
scorm_cloud.configuration.access_token = response.result

registration_api = scorm_cloud.RegistrationApi()
registration_list = registration_api.get_registrations()

print(registration_list)

scormcloud-api-v2-client-python's People

Contributors

tedwards avatar dillgromble avatar brianrogers avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.