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.
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
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 Distribution
orloclient-0.4.2.tar.gz
(22.7 kB
view details)
Built Distributions
File details
Details for the file orloclient-0.4.2.tar.gz
.
File metadata
- Download URL: orloclient-0.4.2.tar.gz
- Upload date:
- Size: 22.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95858d4607ed8700415ff5d0ebf6a7cc5011f1372c167545ee5fd3ea01b13d0e |
|
MD5 | 69d95b094563377f7bfbd5975a67d541 |
|
BLAKE2b-256 | df0a233ee815c69908537dddbaff941bcd4c98625bd9f9d0fc39b6934adbb270 |
File details
Details for the file orloclient-0.4.2.macosx-10.12-x86_64.tar.gz
.
File metadata
- Download URL: orloclient-0.4.2.macosx-10.12-x86_64.tar.gz
- Upload date:
- Size: 32.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 999a3961694e1a652c93e5d0dc52758d57b15e2a7d39243fc090be908cad8d36 |
|
MD5 | a17925656462f5d25370815ef1edc2ba |
|
BLAKE2b-256 | 190520fc3547e287f4c5ca51196393072e50665e73cdda029de50b1ed2257f35 |
File details
Details for the file orloclient-0.4.2-py2-none-any.whl
.
File metadata
- Download URL: orloclient-0.4.2-py2-none-any.whl
- Upload date:
- Size: 32.1 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7804fdaa38a69921c26d185f9031e120d440cb6f1ac4cc899c30af74f0ccde8f |
|
MD5 | 7676338e6b7fcc851717119d38b2d6dd |
|
BLAKE2b-256 | 7605c0d7c1a66cce64025e824f4985894d3181b2b5e4efe83a2cfff93f54bd84 |