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
pip install pysnc
```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)
```
Or you can more traditionally:
while gr.next():
print(gr.sys_id);
It is recommended you use OAuth, however:
```python from pysnc import ServiceNowClient, ServiceNowOAuth2
client = ServiceNowClient('dev0000', ServiceNowOAuth2('integration.user', password)) ```
Full documentation currently available at https://servicenow.github.io/PySNC/
Or build them yourself:
cd docs && make html
The following functions are not (yet?) supported:
choose_window(first_row, last_row, force_count=True)
TODOget_class_display_value()
get_record_class_name()
get_unique_value()
is_valid()
TODOis_valid_record()
new_record()
update_multiple()
TODO_next()
_query()
The following will not be implemented:
get_attribute(field_name)
Not Applicableget_ED()
Not Applicableget_label()
Not Applicableget_last_error_message()
Not Applicableset_workflow(enable)
Not Possibleoperation()
Not Applicableset_abort_action()
Not Applicableis_valid_field()
Not Possibleis_action_aborted()
Not ApplicableSee the documentation.
/api/now/stats/{tableName}
)And we want to:
for #56
setup.py is a clunker and poetry just makes more sense than pipenv
When doing something as such:
python
gr = client.GlideRecord(table)
gr.initialize()
gr.field = 'some value'
gr.get('non_existant_id')
We expect the gr.field
to now be None -- in actuality it is still some value
as the failed get()
did not update _current.
Actual GlideRecord behaves in this matter:
javascript
let gr = new GlideRecord('incident')
gr.initialize()
gr.short_description = 'this is a test'
gs.info(gr.short_description)
gr.get('sys_id')
gs.info(gr.short_description)
will give us
my_scope: this is a test
my_scope:
Bumps cryptography from 38.0.1 to 39.0.1.
Sourced from cryptography's changelog.
39.0.1 - 2023-02-07
* **SECURITY ISSUE** - Fixed a bug where ``Cipher.update_into`` accepted Python buffer protocol objects, but allowed immutable buffers. **CVE-2023-23931** * Updated Windows, macOS, and Linux wheels to be compiled with OpenSSL 3.0.8.
.. _v39-0-0:
39.0.0 - 2023-01-01
- BACKWARDS INCOMPATIBLE: Support for OpenSSL 1.1.0 has been removed. Users on older version of OpenSSL will need to upgrade.
- BACKWARDS INCOMPATIBLE: Dropped support for LibreSSL < 3.5. The new minimum LibreSSL version is 3.5.0. Going forward our policy is to support versions of LibreSSL that are available in versions of OpenBSD that are still receiving security support.
- BACKWARDS INCOMPATIBLE: Removed the
encode_point
andfrom_encoded_point
methods on :class:~cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePublicNumbers
, which had been deprecated for several years. :meth:~cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePublicKey.public_bytes
and :meth:~cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePublicKey.from_encoded_point
should be used instead.- BACKWARDS INCOMPATIBLE: Support for using MD5 or SHA1 in :class:
~cryptography.x509.CertificateBuilder
, other X.509 builders, and PKCS7 has been removed.- BACKWARDS INCOMPATIBLE: Dropped support for macOS 10.10 and 10.11, macOS users must upgrade to 10.12 or newer.
- ANNOUNCEMENT: The next version of
cryptography
(40.0) will change the way we link OpenSSL. This will only impact users who buildcryptography
from source (i.e., not from awheel
), and specify their own version of OpenSSL. For those users, theCFLAGS
,LDFLAGS
,INCLUDE
,LIB
, andCRYPTOGRAPHY_SUPPRESS_LINK_FLAGS
environment variables will no longer be respected. Instead, users will need to configure their buildsas documented here
_.- Added support for :ref:
disabling the legacy provider in OpenSSL 3.0.x<legacy-provider>
.- Added support for disabling RSA key validation checks when loading RSA keys via :func:
~cryptography.hazmat.primitives.serialization.load_pem_private_key
, :func:~cryptography.hazmat.primitives.serialization.load_der_private_key
, and :meth:~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateNumbers.private_key
. This speeds up key loading but is :term:unsafe
if you are loading potentially attacker supplied keys.- Significantly improved performance for :class:
~cryptography.hazmat.primitives.ciphers.aead.ChaCha20Poly1305
... (truncated)
d6951dc
changelog + security fix backport (#8231)138da90
workaround scapy bug in downstream tests (#8218) (#8228)69527bc
bookworm is py311 now (#8200)111deef
backport main branch CI to 39.0.x (#8153)338a65a
39.0.0 version bump (#7954)84a3cd7
automatically download and upload circleci wheels (#7949)525c0b3
Type annotate release.py (#7951)46d2a94
Use the latest 3.10 release when wheel building (#7953)f150dc1
fix CI to work with ubuntu 22.04 (#7950)8867724
fix README for python3 (#7947)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Bumps oauthlib from 3.2.1 to 3.2.2.
e6c33e4
Add 3.2.2 version4a4d65f
Merge pull request #832 from oauthlib/3.2.12e40b41
Merge pull request from GHSA-3pgj-pg6c-r5p7b4bdd09
Merge pull request #818 from dasm/master5d85c61
Fix IPV6 regex used to check redirect_urie514826
Add check of performance of ipv6 check9aa45aa
Restored test for port 0.f52f641
Merge branch 'oauthlib:master' into mastered0cb63
Removed unused query and fragmentd05c388
Removed dependency on splitDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
When using record = gr.pop_record()
to extract and item, if I try to modify it and then update it record.update()
, it fails with
AttributeError: 'NoneType' object has no attribute '_put'
Release
The 1.0.2
release