Skip to main content

Python ServiceNow API Wrapper

Project description

ServiceNow API

PyPI - Version PyPI - Downloads GitHub Repo stars GitHub forks GitHub contributors PyPI - License GitHub

GitHub last commit (by committer) GitHub pull requests GitHub closed pull requests GitHub issues

GitHub top language GitHub language count GitHub repo size GitHub repo file count (file type) PyPI - Wheel PyPI - Implementation

Version: 0.20.15

ServiceNow API Python Wrapper

This repository is actively maintained and will continue adding more API calls

Contributions are welcome!

AI Skill Ready (PEP8 Documented) - Assimilate the following package into your agent and begin using it!

API Calls:

  • Application Service
  • Change Management
  • CI/CD
  • CMDB
  • Import Sets
  • Incident
  • Knowledge Base
  • Table
Usage:

OAuth Authentication

#!/usr/bin/python
# coding: utf-8
import servicenow_api

username = "<SERVICENOW USERNAME>"
password = "<SERVICENOW PASSWORD>"
client_id = "<SERVICENOW CLIENT_ID>"
client_secret = "<SERVICENOW_CLIENT_SECRET>"
servicenow_api_url = "<SERVICENOW_URL>"

client = servicenow_api.Api(url=servicenow_api_url,
                            username=username,
                            password=password,
                            client_id=client_id,
                            client_secret=client_secret)

table = client.get_table(table="<TABLE NAME>")
print(f"Table: {table}")

Basic Authentication

#!/usr/bin/python
# coding: utf-8
import servicenow_api

username = "<SERVICENOW USERNAME>"
password = "<SERVICENOW PASSWORD>"
servicenow_api_url = "<SERVICENOW_URL>"

client = servicenow_api.Api(url=servicenow_api_url,
                            username=username,
                            password=password)

table = client.get_table(table="<TABLE NAME>")
print(f"Table: {table}")

Proxy and SSL Verify

#!/usr/bin/python
# coding: utf-8
import servicenow_api

username = "<SERVICENOW USERNAME>"
password = "<SERVICENOW PASSWORD>"
servicenow_api_url = "<SERVICENOW_URL>"

proxy = "https://proxy.net"

client = servicenow_api.Api(url=servicenow_api_url,
                            username=username,
                            password=password,
                            proxy=proxy,
                            verify=False)

table = client.get_table(table="<TABLE NAME>")
print(f"Table: {table}")
Installation Instructions:

Install Python Package

python -m pip install servicenow-api
Tests:
python ./test/test_servicenow_models.py
Repository Owners:

GitHub followers GitHub User's stars

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

servicenow_api-0.20.15-py2.py3-none-any.whl (17.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file servicenow_api-0.20.15-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for servicenow_api-0.20.15-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 10e42c66e6cea0daee7ef0bc822bfa46ec9cd6d5e4aed9a247a28d303047a5e1
MD5 786d69be0046e584d934c237636909a1
BLAKE2b-256 b99609e897836f8216f73f9e76f5d8a85ad2d88da0e64c473e04ba2aa361750a

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