Skip to main content

Cub Client for Python

Project description

https://travis-ci.org/praetoriandigital/cub-python.png?branch=master

Requirements

Python version 2.7, 3.4, 3.5, 3.6 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

Install tox:

$ pip install tox

run tests:

$ tox

To install additional pythons, you can use pyenv :

$ pyenv install 3.4.9
$ pyenv install 3.5.6
$ # in project dir run pyenv local
$ pyenv local system 3.4.9 3.5.6

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for cub, version 0.23.0
Filename, size File type Python version Upload date Hashes
Filename, size cub-0.23.0-py2.py3-none-any.whl (9.0 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size cub-0.23.0-py3-none-any.whl (9.0 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size cub-0.23.0.tar.gz (7.5 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page