Skip to main content

ObjectRocket Python Client

Project description

Circle CI codecov.io Coverage Status

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:

>>> 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

pip install objectrocket

development

test

Testing against local you will want to export a couple environment variables:

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. A pattern of /^[0-9]+.[0-9]+.[0-9]+-rc[0-9]+$/ will cause it to be pushed to testpypi.

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


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 Distribution

objectrocket-0.6.0-py2.py3-none-any.whl (20.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file objectrocket-0.6.0-py2.py3-none-any.whl.

File metadata

  • Download URL: objectrocket-0.6.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 20.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.6

File hashes

Hashes for objectrocket-0.6.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 5f39d12d087ae306e3d7b6282e60a082153d8eacd5a7e5ae105d409a7c6c3f5f
MD5 5580c3a169bab51939225e946ba6d11a
BLAKE2b-256 f3e6940679a1207a8201b1b43c5a408ce6747619cdf7d41cff343675390ff585

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page