Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

snowclient-0.4.4.tar.gz (8.4 kB view hashes)

Uploaded Source

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