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.1.tar.gz (37.3 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.1-py3-none-any.whl (42.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pysnc-1.2.1.tar.gz
  • Upload date:
  • Size: 37.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.11.14 Linux/6.11.0-1018-azure

File hashes

Hashes for pysnc-1.2.1.tar.gz
Algorithm Hash digest
SHA256 26fba05dbda382ad56727f58a12cec540bc4de773252b569838f9a360f7e86ce
MD5 6a5a8cb2ec1f5d281bf7518f1ff9d9c1
BLAKE2b-256 d8c235dbcd29c7ee120e44f35c056d577646dbf3e55476fc792fca737c9721f1

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pysnc-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 54fdfa2d99a5e3cccea6b295b8f1e5649ce221b0c4423fccc4c5b8d09cdccdda
MD5 009ca8d225abc25b0bf77ee9c6b537a3
BLAKE2b-256 a7167e0560357fef8aa95c123c6634a0e59bfb3479a8bb7d072cfcfff9999342

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