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

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.1.6.tar.gz (22.1 kB view details)

Uploaded Source

Built Distribution

pysnc-1.1.6-py3-none-any.whl (24.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pysnc-1.1.6.tar.gz
  • Upload date:
  • Size: 22.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.11.8 Linux/6.5.0-1016-azure

File hashes

Hashes for pysnc-1.1.6.tar.gz
Algorithm Hash digest
SHA256 254bdae6e5a12cc5ae5e5b9beb51483760e7cc563c8e1e7792a73d3c0ef82135
MD5 fc3cb0b4b7afbe3b2fa6e0179d2fc20b
BLAKE2b-256 f0014be91a3795d90ea6b4edfd35e6c546cae451caa8fe445eedf88b9a636ad3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pysnc-1.1.6-py3-none-any.whl
  • Upload date:
  • Size: 24.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.11.8 Linux/6.5.0-1016-azure

File hashes

Hashes for pysnc-1.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 a6958a00e7e41dc5ed0ddd670dc6239ff0207091c549306850fe2bbb7cd5d923
MD5 320bbecff10d2621087717d82729785f
BLAKE2b-256 10f1d4f2a679ad7f5de4f663b9cad30228582ed493ccce0ad5e9d2b896648ced

See more details on using hashes here.

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