Cub Client for Python
Project description
Requirements
Python version 2.7, 3.5, 3.6, 3.7, 3.8, 3.9 or PyPy. For better security, we recommend to install Python Requests library, since it supports SSL certs verification. To install Requests, simply run:
$ pip install requests
or using easy_install:
$ easy_install requests
Requests library is optional. If it is not installed, Cub Client will use urllib2 instead. All features of Cub Client will remain fully functional, but it will not verify SSL certificate of Cub API.
Installation
Install using pip, recommended (why?):
$ pip install cub
or using easy_install:
$ easy_install cub
Usage
User Login
import cub
import cub.config
cub.config.api_key = '<your-secret-key>'
user = cub.User.login(
username='<username>',
password='<password>',
)
Get User by token
import cub
user = cub.User.get('<token>')
Report bugs
Report issues to the project’s Issues Tracking on Github.
Development
Run tests with local python:
$ INTEGRATION_TESTS_SECRET_KEY={key} INTEGRATION_TESTS_USER_PASS={password} pytest -v --tb=short tests.py
Install tox:
$ pip install tox
Run tests with tox:
$ INTEGRATION_TESTS_SECRET_KEY={key} INTEGRATION_TESTS_USER_PASS={password} tox
To install additional pythons, you can use pyenv:
$ pyenv install 3.5.10 $ pyenv install 3.6.12 $ # in project dir run pyenv local $ pyenv local system 3.5.10 3.6.12
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file cub-0.28.0.tar.gz
.
File metadata
- Download URL: cub-0.28.0.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0153a576d26fc1a650f66030ad7fc0af709b778870a8f9082c9cef16af6663f8 |
|
MD5 | 89a9fecd6dfaa4855588e5cdd8cd4afd |
|
BLAKE2b-256 | f7ca8c69fe6dbc59ec9d5ad7886395801503bf1faee238f5ff9f77edd3321c62 |
File details
Details for the file cub-0.28.0-py2.py3-none-any.whl
.
File metadata
- Download URL: cub-0.28.0-py2.py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 579eb43e58dfc63b4be891e42123a6221febd038fbcab4e635b1657ca2fe8360 |
|
MD5 | 1a4959d7ae17a410168d50c89a0b7cb8 |
|
BLAKE2b-256 | 5f3bc4548bd2fe13c8ee6d08fa181aad2a09953b676228f65b58a0369e08fc53 |