courseraoauth2client
This project is a library consisting of a command line interface and a client for interacting with Coursera’s OAuth2 authorized APIs.
Installation
To install this sdk, simply execute:
sudo pip install courseraoauth2client
pip is a python package manager. If you do not have pip installed on your machine, please follow the installation instructions for your platform found at: https://pip.pypa.io/en/latest/installing.html#install-or-upgrade-pip
Setup
Before using Coursera’s OAuth2 APIs, be sure you know your client id, client secret, and scopes you want for for your application. You may create an application at https://accounts.coursera.org/console. When creating the application, set the Redirect URI to be http://localhost:9876.
Next, authorize your application by running courseraoauth2client config authorize --app APP where APP is a disambiguating identifier to be referred to later when making Coursera API calls.
Command Line Interface
The project includes a command line tool. Simply run:
courseraoauth2client -h
for a complete list of features, flags, and documentation.
config
Configures the Coursera OAuth2 client library.
- Examples:
courseraoauth2client config authorize --app APP
Configures the tool to go through the authorization secret flow for application APP.
courseraoauth2client config check-auth --app APP
Checks whether the current instance can authorize against Coursera’s API server for application APP
Usage
import requests from courseraoauth2client import oauth2 ... app = 'my_application_name' url = 'https://api.coursera.org/api/externalBasicProfiles.v1?q=me&fields=name' auth = oauth2.build_oauth2(app=app).build_authorizer() response = requests.get(url, auth=auth) print response.json()
If my_application_name was successfully configured, you will be able to successfully make a request. Otherwise, an exception will be thrown telling you to set up your application for API access.
Bugs / Issues / Feature Requests
Please us the github issue tracker to document any bugs or other issues you encounter while using this tool.
Developing / Contributing
We recommend developing courseraoauth2client within a python virtualenv. To get your environment set up properly, do the following:
virtualenv venv source venv/bin/activate python setup.py develop pip install -r test_requirements.txt
Tests
To run tests, simply run: nosetests, or tox.
Code Style
Code should conform to pep8 style requirements. To check, simply run:
pep8 courseraoauth2client tests
Metadata
Release files for courseraoauth2client 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| courseraoauth2client-0.0.1.tar.gz | 11.0 kB | Without provenance | Details for courseraoauth2client-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| courseraoauth2client-0.0.1-py2-none-any.whl | Python 2 | none | any | Details for courseraoauth2client-0.0.1-py2-none-any.whl |
Total release size: 28.0 kB
Release files / courseraoauth2client-0.0.1.tar.gz
| Download URL | courseraoauth2client-0.0.1.tar.gz |
|---|---|
| Size | 11.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
09f33f75c762e752c3e3b1a99c714538250975d5a175297d0a7c61fffd5f18cd
|
|
BLAKE2b-256 checksum How to use checksums |
bba1c36f24c66888a49af1108a405626695a54e60c2aa2f521cf48db2c970e72
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / courseraoauth2client-0.0.1-py2-none-any.whl
| Download URL | courseraoauth2client-0.0.1-py2-none-any.whl |
|---|---|
| Size | 17.0 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
32fa1028702f37e94364cb6117b10e79227df062d5521d8d3812110d381ae7dd
|
|
BLAKE2b-256 checksum How to use checksums |
5e76de1647ad2fcff53753c4080836e159ee83ec170dd860c9dc6de4349fe61f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for courseraoauth2client 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.