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.4.1.tar.gz (15.4 kB view details)

Uploaded Source

Built Distributions

orloclient-0.4.1.macosx-10.12-x86_64.tar.gz (31.0 kB view details)

Uploaded Source

orloclient-0.4.1-py2-none-any.whl (20.6 kB view details)

Uploaded Python 2

File details

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

File metadata

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

File hashes

Hashes for orloclient-0.4.1.tar.gz
Algorithm Hash digest
SHA256 027cff9455ab9b6d712637f0d996eb6ca3848712a7b1f5c7d581a968ad3dc235
MD5 38b09b4d3fcd83a7a89e5d82ab396c0c
BLAKE2b-256 205882efea0e9959857ac593f1256f20989e12fce4e0ba3416d3dfd0e2266343

See more details on using hashes here.

File details

Details for the file orloclient-0.4.1.macosx-10.12-x86_64.tar.gz.

File metadata

File hashes

Hashes for orloclient-0.4.1.macosx-10.12-x86_64.tar.gz
Algorithm Hash digest
SHA256 aec85a8f980564233c13960a9b78ea0361e2474376b79498c18a7e6f0c5a1190
MD5 483fb4bc839442816ad8e2d8cb1d08a0
BLAKE2b-256 70303aa62555a01551f99d661c1d655acdb760d9b37b6e2ccae8cbc940d601e6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orloclient-0.4.1-py2-none-any.whl
Algorithm Hash digest
SHA256 97ba3aa3b5f8fbeb11103309c2fb7644e0584d7c62edba587b53b4258da48e6f
MD5 b63745386b996ae264839d910c96f42f
BLAKE2b-256 6ffeba4f9c4fc57ddf1f4c173de41fb8da650731ef8686a63f6ba34648076ac4

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