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.

Filename, size & hash SHA256 hash help File type Python version Upload date
snowclient-0.4.4.tar.gz (8.4 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page