Skip to main content

Python SNC (REST) API

Project description

ServiceNow Python API

What: PySnc is a python interface for the ServiceNow and the Table API. It is designed to mimic the familiar GlideRecord interface you know with pythonic support where applicable.

Why: Spawned from the desire to interact with ServiceNow data in a familiar and consistent manner

Install

pip install pysnc

If you also want to install the asyncio support, you can run:

pip install pysnc[asyncio]

Quick Start

from pysnc import ServiceNowClient

client = ServiceNowClient('https://dev0000.service-now.com', ('integration.user', password))

gr = client.GlideRecord('sys_user')
gr.add_query('user_name', 'admin')
gr.query()
for r in gr:
	print(r.sys_id)

Documentation

Full documentation currently available at https://servicenow.github.io/PySNC/

Or build them yourself:

cd docs && make html

Development Notes

The following functions are not (yet?) supported:

  • choose_window(first_row, last_row, force_count=True) TODO
  • get_class_display_value()
  • get_record_class_name()
  • is_valid() TODO
  • is_valid_record()
  • new_record()
  • _next()
  • _query()

The following will not be implemented:

  • get_attribute(field_name) Not Applicable
  • get_ED() Not Applicable
  • get_label() Not Applicable
  • get_last_error_message() Not Applicable
  • set_workflow(enable) Not Possible
  • operation() Not Applicable
  • set_abort_action() Not Applicable
  • is_valid_field() Not Possible
  • is_action_aborted() Not Applicable

Feature Wants and TODO

  • GlideAggregate support (/api/now/stats/{tableName})

And we want to:

  • Improve documentation

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

pysnc-1.2.0.tar.gz (34.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pysnc-1.2.0-py3-none-any.whl (39.9 kB view details)

Uploaded Python 3

File details

Details for the file pysnc-1.2.0.tar.gz.

File metadata

  • Download URL: pysnc-1.2.0.tar.gz
  • Upload date:
  • Size: 34.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.11.13 Linux/6.11.0-1018-azure

File hashes

Hashes for pysnc-1.2.0.tar.gz
Algorithm Hash digest
SHA256 a64f534fda7cfecacb18e019f745ed25f22f7c18647f27dfade0ea3d5f57b8da
MD5 540d6cbf5717c28e8a1e0982602a0aa8
BLAKE2b-256 69b2481a2eb63d981d209ebb95111595523fad9b72075541a0585dd507b2eec5

See more details on using hashes here.

File details

Details for the file pysnc-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: pysnc-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 39.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.11.13 Linux/6.11.0-1018-azure

File hashes

Hashes for pysnc-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d839b42cbc19584a6dded0be755d21d621135b518e589a06ce55937d62e03701
MD5 8e6cc9a6c61e1530ef81a6aeee6739e1
BLAKE2b-256 076879afef1d25891ae5653ca730e780108c8f0e339c6f0b4bff67e9f62410f3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page