# 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
```python
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/](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
Raw data
{
"_id": null,
"home_page": "https://github.com/ServiceNow/PySNC",
"name": "pysnc",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.8",
"maintainer_email": null,
"keywords": "servicenow, snc",
"author": "Matthew Gill",
"author_email": "matthew.gill@servicenow.com",
"download_url": "https://files.pythonhosted.org/packages/f0/01/4be91a3795d90ea6b4edfd35e6c546cae451caa8fe445eedf88b9a636ad3/pysnc-1.1.6.tar.gz",
"platform": null,
"description": "# ServiceNow Python API\n\n**What:** \nPySnc 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. \n\n**Why:** \nSpawned from the desire to interact with ServiceNow data in a familiar and consistent manner\n\n## Install\n\n```\npip install pysnc\n```\n\n## Quick Start\n\n```python\nfrom pysnc import ServiceNowClient\n\nclient = ServiceNowClient('https://dev0000.service-now.com', ('integration.user', password))\n\ngr = client.GlideRecord('sys_user')\ngr.add_query('user_name', 'admin')\ngr.query()\nfor r in gr:\n\tprint(r.sys_id)\n```\n\n## Documentation\n\nFull documentation currently available at [https://servicenow.github.io/PySNC/](https://servicenow.github.io/PySNC/)\n\nOr build them yourself:\n\n```\ncd docs && make html\n```\n\n## Development Notes\n\nThe following functions are not (yet?) supported:\n\n* `choose_window(first_row, last_row, force_count=True)` TODO\n* `get_class_display_value()`\n* `get_record_class_name()`\n* `is_valid()` TODO\n* `is_valid_record()`\n* `new_record()`\n* `_next()`\n* `_query()`\n\nThe following will not be implemented:\n\n* `get_attribute(field_name)` Not Applicable\n* `get_ED()` Not Applicable\n* `get_label()` Not Applicable\n* `get_last_error_message()` Not Applicable\n* `set_workflow(enable)` Not Possible\n* `operation()` Not Applicable\n* `set_abort_action()` Not Applicable\n* `is_valid_field()` Not Possible\n* `is_action_aborted()` Not Applicable\n\n# Feature Wants and TODO\n\n* GlideAggregate support (`/api/now/stats/{tableName}`)\n\nAnd we want to:\n\n* Improve documentation",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python SNC (REST) API",
"version": "1.1.6",
"project_urls": {
"Documentation": "https://servicenow.github.io/PySNC/",
"Homepage": "https://github.com/ServiceNow/PySNC",
"Repository": "https://github.com/ServiceNow/PySNC"
},
"split_keywords": [
"servicenow",
" snc"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "10f1d4f2a679ad7f5de4f663b9cad30228582ed493ccce0ad5e9d2b896648ced",
"md5": "320bbecff10d2621087717d82729785f",
"sha256": "a6958a00e7e41dc5ed0ddd670dc6239ff0207091c549306850fe2bbb7cd5d923"
},
"downloads": -1,
"filename": "pysnc-1.1.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "320bbecff10d2621087717d82729785f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.8",
"size": 24171,
"upload_time": "2024-03-28T20:13:28",
"upload_time_iso_8601": "2024-03-28T20:13:28.407641Z",
"url": "https://files.pythonhosted.org/packages/10/f1/d4f2a679ad7f5de4f663b9cad30228582ed493ccce0ad5e9d2b896648ced/pysnc-1.1.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f0014be91a3795d90ea6b4edfd35e6c546cae451caa8fe445eedf88b9a636ad3",
"md5": "fc3cb0b4b7afbe3b2fa6e0179d2fc20b",
"sha256": "254bdae6e5a12cc5ae5e5b9beb51483760e7cc563c8e1e7792a73d3c0ef82135"
},
"downloads": -1,
"filename": "pysnc-1.1.6.tar.gz",
"has_sig": false,
"md5_digest": "fc3cb0b4b7afbe3b2fa6e0179d2fc20b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8",
"size": 22129,
"upload_time": "2024-03-28T20:13:30",
"upload_time_iso_8601": "2024-03-28T20:13:30.418557Z",
"url": "https://files.pythonhosted.org/packages/f0/01/4be91a3795d90ea6b4edfd35e6c546cae451caa8fe445eedf88b9a636ad3/pysnc-1.1.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-28 20:13:30",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ServiceNow",
"github_project": "PySNC",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pysnc"
}