Metadata-Version: 2.1
Name: cub
Version: 0.17.2
Summary: Cub Client for Python
Home-page: https://github.com/ivelum/cub-python
Author: Denis Stebunov
Author-email: support@ivelum.com
License: The MIT License (MIT)
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Requires-Dist: requests (>=0.9)

Cub Client for Python
=====================

.. image:: https://travis-ci.org/ivelum/cub-python.png?branch=master
        :target: https://travis-ci.org/ivelum/cub-python

Requirements
------------

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

.. _`Python Requests`: http://docs.python-requests.org/

Installation
------------

Install using pip, recommended (`why?`_): ::

    $ pip install cub

or using easy_install: ::

    $ easy_install cub

.. _`why?`: http://www.pip-installer.org/en/latest/other-tools.html#pip-compared-to-easy-install

Usage
-----

User Login
~~~~~~~~~~

.. code:: python

    import cub
    import cub.config

    cub.config.api_key = '<your-secret-key>'

    user = cub.User.login(
        username='<username>',
        password='<password>',
    )


Get User by token
~~~~~~~~~~~~~~~~~

.. code:: python

    import cub

    user = cub.User.get('<token>')


Report bugs
-----------

Report issues to the project's `Issues Tracking`_ on Github.

.. _`Issues Tracking`: https://github.com/ivelum/cub-python/issues


