ServiceNow api client in python
Project description
Python REST client with some extras baked in:
Request retires built in with appropriated backoffs.
Wrap response output in object with conviency methods such as being able to resolve depedency tables if they are linked in an attribute ( aka record.resolve_link(“depfield”) ).
Wrap problems/errors/empty records in NotFound objects.
Extra querying sugar - see QueryBuilder and docs for details. For example, a request with specific query info like:
GET /api/now/v1/table/change_request?sysparm_limit=10&sysparm_query=cmdb_ciISNOTEMPTY%5Estate=1%5Eassignment_group=deadbeef%5Esys_created_onBETWEENjavascript:gs.dateGenerate(‘2018-06-11’,’19:25:00’)@javascript:gs.dateGenerate(‘2018-07-11’,’19:25:00’)%5EORDERBYDESCsys_created_on
Can be generated instead from:
` qb.field_equals("state", "1") qb.field_equals("assignment_group", "deadbeef") start = datetime.utcnow() end = start - timedelta(days=30) qb.between(end, start) qb.orderbydesc("sys_created_on") `
Which, depending on the eyes (and cough, auto method completions), might hurt just a littttle bit less.
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
File details
Details for the file snowclient-0.4.4.tar.gz
.
File metadata
- Download URL: snowclient-0.4.4.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/2.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ee7cd994c3a2e291689cb6813d23a7e35fe926bdd2804d4b7bfafa2cac62914 |
|
MD5 | cd72626482507aead80fee8deaf50d3b |
|
BLAKE2b-256 | 63be7c2557f087f6fa5ea1b80552b240a2fe2455aa8eda5a6078bf46ae6a23b3 |