ObjectRocket Python Client
Project description
[![Circle CI](https://circleci.com/gh/objectrocket/python-client.svg?style=svg)](https://circleci.com/gh/objectrocket/python-client)
[![codecov.io](http://codecov.io/github/objectrocket/python-client/coverage.svg?branch=master)](http://codecov.io/github/objectrocket/python-client?branch=master)
[![Coverage Status](https://coveralls.io/repos/objectrocket/python-client/badge.svg?branch=master&service=github)](https://coveralls.io/github/objectrocket/python-client?branch=master)
ObjectRocket Python Client
==========================
ObjectRocket API interface library for Python.
**NOTICE:** this client is still undergoing intial stages of development, and some public interfaces may change as development continues. We will increment the version of this package to 1.0.0 once the public interface to this library is deemed stable.
### examples
To use the library, simply do the following:
```python
>>> import objectrocket
>>> client = objectrocket.Client()
>>> client.authenticate('<username>', '<password>')
# Create a new instance.
>>> client.instances.create(name='instance0', size=5, zone='US-West'
<MongodbInstance {...} at 0x10aedb990>
# Get an instances object.
>>> client.instances.get('instance0')
<MongodbInstance {...} at 0x10aedb980>
# Get all instances.
>>> client.instances.all()
[<MongodbInstance {...} at 0x10aedb980>]
```
### installation
```bash
pip install objectrocket
```
### development
#### test
Testing against local you will want to export a couple environment variables:
```bash
export OR_DEFAULT_API_URL='http://localhost:5050/v2/'
export OR_DEFAULT_ADMIN_API_URL='http://localhost:5050/admin/'
```
Before you push your code, run `tox` from the top level directory. If errors
are reported, fix them.
#### coverage
To receive a test coverage report, run `tox -e coverage` from the top level directory.
#### pypi build
Update version in setup.py
Pushing a tag following the pattern `/^[0-9]+.[0-9]+.[0-9]+$/` will automatically trigger a new version of the client to be built and uploaded to [pypi](https://pypi.python.org). A pattern of `/^[0-9]+.[0-9]+.[0-9]+-rc[0-9]+$/` will cause it to be pushed to [testpypi](https://testpypi.python.org).
#### documentation
To build the documentation, invoke `tox -e docs` from the top level directory.
The HTML index can then be found at `docs/build/html/index.html`.
[![codecov.io](http://codecov.io/github/objectrocket/python-client/coverage.svg?branch=master)](http://codecov.io/github/objectrocket/python-client?branch=master)
[![Coverage Status](https://coveralls.io/repos/objectrocket/python-client/badge.svg?branch=master&service=github)](https://coveralls.io/github/objectrocket/python-client?branch=master)
ObjectRocket Python Client
==========================
ObjectRocket API interface library for Python.
**NOTICE:** this client is still undergoing intial stages of development, and some public interfaces may change as development continues. We will increment the version of this package to 1.0.0 once the public interface to this library is deemed stable.
### examples
To use the library, simply do the following:
```python
>>> import objectrocket
>>> client = objectrocket.Client()
>>> client.authenticate('<username>', '<password>')
# Create a new instance.
>>> client.instances.create(name='instance0', size=5, zone='US-West'
<MongodbInstance {...} at 0x10aedb990>
# Get an instances object.
>>> client.instances.get('instance0')
<MongodbInstance {...} at 0x10aedb980>
# Get all instances.
>>> client.instances.all()
[<MongodbInstance {...} at 0x10aedb980>]
```
### installation
```bash
pip install objectrocket
```
### development
#### test
Testing against local you will want to export a couple environment variables:
```bash
export OR_DEFAULT_API_URL='http://localhost:5050/v2/'
export OR_DEFAULT_ADMIN_API_URL='http://localhost:5050/admin/'
```
Before you push your code, run `tox` from the top level directory. If errors
are reported, fix them.
#### coverage
To receive a test coverage report, run `tox -e coverage` from the top level directory.
#### pypi build
Update version in setup.py
Pushing a tag following the pattern `/^[0-9]+.[0-9]+.[0-9]+$/` will automatically trigger a new version of the client to be built and uploaded to [pypi](https://pypi.python.org). A pattern of `/^[0-9]+.[0-9]+.[0-9]+-rc[0-9]+$/` will cause it to be pushed to [testpypi](https://testpypi.python.org).
#### documentation
To build the documentation, invoke `tox -e docs` from the top level directory.
The HTML index can then be found at `docs/build/html/index.html`.
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distributions
objectrocket-0.4.8-py2.7.egg
(42.9 kB
view details)
File details
Details for the file objectrocket-0.4.8-py2.py3-none-any.whl
.
File metadata
- Download URL: objectrocket-0.4.8-py2.py3-none-any.whl
- Upload date:
- Size: 21.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | edf070de7d9089809d45403101ed5696b8dbb208649ccc18ddc29a47bcc83dde |
|
MD5 | 080b2998aa9ac6b84e189d34df26dd81 |
|
BLAKE2b-256 | 483cef14add67b89a724b3981f6d67784b47aca1ccb022e22c9da65de4c5b55e |
Provenance
File details
Details for the file objectrocket-0.4.8-py2.7.egg
.
File metadata
- Download URL: objectrocket-0.4.8-py2.7.egg
- Upload date:
- Size: 42.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9ceed002f639abf05580fa65ed1a7a573c201a2f962f5c6cbcfad03f41e8c56 |
|
MD5 | 592e07157235c11556f9f51a9a45b84c |
|
BLAKE2b-256 | 84083507f1dd90e2e8e1e4c93a379575ad2e1df8431e07f6a53089eacaed5104 |