skip to navigation
skip to content

Not Logged In

cub 0.2.0

Cub Client for Python

Latest Version: 0.8.0

Requirements

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

 
File Type Py Version Uploaded on Size
cub-0.2.0.tar.gz (md5) Source 2014-07-30 6KB
  • Downloads (All Versions):
  • 59 downloads in the last day
  • 205 downloads in the last week
  • 1693 downloads in the last month
  • Author: Denis Stebunov
  • Home Page: https://github.com/ivelum/cub-python
  • License:
    The MIT License (MIT)
    
    Copyright (c) 2014 ivelum
    
    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:
    
    The above copyright notice and this permission notice shall be included in
    all copies or substantial portions of the Software.
    
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    THE SOFTWARE.
  • Package Index Owner: ivelum
  • DOAP record: cub-0.2.0.xml