Python client for PMEase QuickBuild
Project description
Status
Documentation
Installation
pip3 install -U quickbuild
Examples
Get server version:
from quickbuild import QBClient
client = QBClient('http://server', 'login', 'password')
version = client.system.get_version()
print(version)
With async client:
import asyncio
from quickbuild import AsyncQBClient
client = AsyncQBClient('http://server', 'login', 'password')
async def example():
await client.system.get_version()
loop = asyncio.get_event_loop()
try:
loop.run_until_complete(example())
finally:
loop.run_until_complete(client.close())
loop.close()
Content type
By default QuickBuild returns XML content, but starting from 10 version it also has native support of JSON content, usually it’s much more convenient to use native Python types (parsed XML) instead of pure XML string.
So, that is why current package introducing three types of content, this type and behavior can be set globally for client instances, and can be rewritten for some methods.
- PARSE (using by default)
GET: parse XML to native Python types.
POST: pure XML string.
- XML
GET: return native XML without any transformations.
POST: pure XML string.
- JSON (QuickBuild 10+)
GET: parsed JSON string.
POST: dumps object to JSON string.
Development
It’s possible to run QuickBuild community edition locally using docker:
Build locally:
docker build . -f docker/QB10.Dockerfile -t quickbuild:10
docker run --restart always --name qb10 -d -p 8810:8810 quickbuild:10
Or run prepared image:
docker run --restart always --name qb10 -d -p 8810:8810 pbelskiy/quickbuild:10
Then open http://localhost:8810/
Testing
Prerequisites: tox
Then just run tox, all dependencies and checks will run automatically
tox
Contributing
Feel free for any contributions.
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
Built Distribution
Hashes for quickbuild-0.17.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ccf98ab0206e8a6202327285eb6021af82a02217a42b9ac6524fb9a0376b4c4 |
|
MD5 | b60dbe17ded899bdbdd252b96b100625 |
|
BLAKE2b-256 | c5a50bcc8f13e5fabcb1284048938c723b66dfe0564ad32563fcc50009bed2f0 |