Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Rehive SDK for Python

Project Description
# Rehive Python SDK
A tool primarly used for quick interfacing with the Rehive API.


## Install
```
pip install rehive
```

## Examples And How-to

```
from rehive import Rehive, APIException
rehive = Rehive() # OR Rehive(API_TOKEN_HERE)
```
You can parse an api token or leave blank if manually logging in. Each object instance will store it's own token and act as another user.

Login:
```
rehive.auth.login({"user": "user", "company": "company", "password": "pass"})
```

Get:
```
rehive.admin.accounts.get()
```

Get nested objects:
```
rehive.admin.accounts.obj('5AT24mW61H').currencies.get()
```

Get with filters:
```
rehive.admin.transactions.get(filters={"status":"confirmed"})
```

Create:
```
rehive.admin.users.emails.create('1d3e584d-ac56-483c-8aa5-d4ef059608ba', 'connor+899@rehive.com', verified=True)
```

Patch/Put:
```
rehive.admin.company.switches.patch('1', enabled=True) # Patch switch with identifier 1
```

Pagination:
```
rehive.admin.currencies.get()
rehive.admin.currencies.get_next()
rehive.admin.currencies.get_previous()
```


## Exception And Error Handling

```
from rehive import APIException

try:
rehive.admin.currencies.get()
exception APIException as e:
print(e.status_code) # Error code status code from Rehive
print(e.data) # Any custom error messages and data returned from Rehive
```


Release History

Release History

This version
History Node

0.3.6

History Node

0.3.5

History Node

0.2.5

History Node

0.2.4

History Node

0.1.4

History Node

0.1.3

History Node

0.0.3

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
rehive-0.3.6-py3-none-any.whl (12.2 kB) Copy SHA256 Checksum SHA256 py3 Wheel Jul 24, 2017
rehive-0.3.6.tar.gz (8.0 kB) Copy SHA256 Checksum SHA256 Source Jul 24, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting