A client library for discoverable REST APIs using JSON payloads.
Project description
JSONREST is a client library for discoverable REST APIs using JSON payloads.
>>> import jsonrest
>>> j = jsonrest.JSONREST('http://example/')
>>> dir(j)
['foo', 'bar', 'baz']
>>> j.foo
JSONREST('http://example/foo/', ['x', 'y', 'z'])
>>> j.foo.x = 42
>>> print(j.foo.x)
42
JSONREST exposes the REST API as an object-oriented interface, with the object hierarchy mirroring the directory structure of the URLs. In order to make this work, it depends on the server responding to GET requests on directories with a JSON array containing all available API endpoints (or other directories) that reside there, with directories identified by a trailing forward-slash (/).
Installing
JSONREST is available on PyPI:
$ python -m pip install vti-jsonrest
Documentation
Full documentation is available at jsonrest.readthedocs.io.
Supported Versions
JSONREST officially supports Python 2.7 & 3.6+.
Features
Makes REST APIs behave like a normal python object
Supports tab-completion in REPLs and Jupyter notebooks
Keep-Alive & Connection Pooling
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 Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vti-jsonrest-1.0.2.tar.gz.
File metadata
- Download URL: vti-jsonrest-1.0.2.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c079a3cb0b8c6954493831c5caba261753b27ee3fb928d330fb884d432a93be
|
|
| MD5 |
3795b05d4b8ca0e2c4c7f208d6e894ec
|
|
| BLAKE2b-256 |
519d9470708087a5c4c972e92f9302bae6dcf3bfd4b4201dce43fcd0cf14c15c
|
File details
Details for the file vti_jsonrest-1.0.2-py2.py3-none-any.whl.
File metadata
- Download URL: vti_jsonrest-1.0.2-py2.py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3245d29176d42148dafecba57201ac5c766c5329481a688cff79bec56d723a23
|
|
| MD5 |
53830f9fc6c9dc231e3407d76a194ebc
|
|
| BLAKE2b-256 |
e22aaeb0d0e6b3410621ae787877cedf4334cbbf41e2465278dfb5f5ebe4d042
|