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.3.tar.gz
(22.9 kB
view details)
Built Distributions
File details
Details for the file orloclient-0.4.3.tar.gz
.
File metadata
- Download URL: orloclient-0.4.3.tar.gz
- Upload date:
- Size: 22.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4fcbcc0c5790be9f19c715f86b36fbfa7f686e98000774b85b9ba065621c507c |
|
MD5 | 5994470286d4c4c55a77760a0bf0f254 |
|
BLAKE2b-256 | 21a13a73abfdc745cf795d730870a6459c4dcb893971e76f448b5b08e3f564ff |
File details
Details for the file orloclient-0.4.3.macosx-10.12-x86_64.tar.gz
.
File metadata
- Download URL: orloclient-0.4.3.macosx-10.12-x86_64.tar.gz
- Upload date:
- Size: 32.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f9c08b1f3cb25c9a7695f8093eee30048cf99076930cf488dafa9b359d23c20 |
|
MD5 | cd91cf31741a632fe5f6426cbd640f8b |
|
BLAKE2b-256 | 1703710040714f6880e2f658280735dc9f00952b851c1ceaf6e2e3182fe835be |
File details
Details for the file orloclient-0.4.3-py2-none-any.whl
.
File metadata
- Download URL: orloclient-0.4.3-py2-none-any.whl
- Upload date:
- Size: 32.3 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 875f2247b0f7a65bdef0fd9729983c3516116a7f6ac07b1867dd52a99a00dc88 |
|
MD5 | ef118c26063bf7b8c9724e348648b490 |
|
BLAKE2b-256 | 2346411280fc6ec4c681242c7e357759c2c8ad328e44ae84006f2e84887c2fa0 |