Skip to main content

Client to the Orlo deployment _data capture API

Project description

# orloclient

Python client for the [Orlo](https://github.com/eBayClassifiedsGroup/orlo) server.

# Installation
```
pip install orloclient
```

# Usage

With an Orlo server running on localhost:5000:
```python
vagrant@debian-jessie:/vagrant$ ipython
Python 2.7.9 (default, Mar 1 2015, 12:57:24)
Type "copyright", "credits" or "license" for more information.

IPython 4.0.1 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.

In [1]: import orloclient, json

In [2]: client = orloclient.OrloClient(uri='http://localhost:5000')

In [3]: release = client.create_release(user='alex', platforms=['alexdev'])

In [4]: package = client.create_package(release, name='package-one', version='1.0.0')

In [5]: client.package_start(package)
Out[5]: True

In [6]: client.package_stop(package)
Out[6]: True

In [7]: client.release_stop(release)
Out[7]: True

In [8]: doc = client.get_release_json(release.id)

In [9]: print(json.dumps(doc, indent=2))
{
"releases": [
{
"platforms": [
"alexdev"
],
"ftime": "2016-03-03T16:56:03Z",
"stime": "2016-03-03T16:55:05Z",
"team": null,
"duration": 57,
"references": [],
"packages": [
{
"status": "SUCCESSFUL",
"rollback": false,
"name": "package-one",
"version": "1.0.0",
"ftime": "2016-03-03T16:55:56Z",
"stime": "2016-03-03T16:55:52Z",
"duration": 4,
"diff_url": null,
"id": "9877cd69-1196-42dc-8d6c-0b7c95e11a5d"
}
],
"id": "700ff271-f705-4bfb-8582-b74633759feb",
"user": "alex"
}
]
}
```

# Tests

There are two test suites, test_orloclient and test_integration. The former tests the orlo client functions while mocking the requests library, courtesy of [HTTPretty](https://github.com/gabrielfalcao/HTTPretty), while the integration tests run an actual Orlo server to test against.

Project details


Download files

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

Source Distribution

orloclient-0.2.0.tar.gz (17.4 kB view details)

Uploaded Source

Built Distributions

orloclient-0.2.0.macosx-10.10-x86_64.tar.gz (24.4 kB view details)

Uploaded Source

orloclient-0.2.0-py2-none-any.whl (26.2 kB view details)

Uploaded Python 2

File details

Details for the file orloclient-0.2.0.tar.gz.

File metadata

  • Download URL: orloclient-0.2.0.tar.gz
  • Upload date:
  • Size: 17.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for orloclient-0.2.0.tar.gz
Algorithm Hash digest
SHA256 be8c8d7e05163f6674e48e15f3287c83b8fcaa3af25e28d1ac4b57e874bd9902
MD5 202c723c62fe4ebfb6b6275ca5fda048
BLAKE2b-256 d522b44217394d04edcf34b79f810c976ab40c25637a07e3e918c9ba553fbd56

See more details on using hashes here.

File details

Details for the file orloclient-0.2.0.macosx-10.10-x86_64.tar.gz.

File metadata

File hashes

Hashes for orloclient-0.2.0.macosx-10.10-x86_64.tar.gz
Algorithm Hash digest
SHA256 aaf141845667e530918df68dff82de7580552799713f79af34da140b0254384d
MD5 6a642e728a4b534d4be514cc2fb84d32
BLAKE2b-256 8849bfe00de2002cab73a15a435de6a0f71bdaff83667d2e46efaf787f915345

See more details on using hashes here.

File details

Details for the file orloclient-0.2.0-py2-none-any.whl.

File metadata

File hashes

Hashes for orloclient-0.2.0-py2-none-any.whl
Algorithm Hash digest
SHA256 d18827d8066dd57899ada0428304d522dbd9942c30ac31c13686812cf22f4d76
MD5 b73f575171bd69b09330dc53f52d7c57
BLAKE2b-256 527a0a853482d3ca1623cb2662b969f8cdf086cb68e513fff0312bdb27428165

See more details on using hashes here.

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