Skip to main content

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


Download files

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

Source Distribution

vti-jsonrest-1.0.2.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vti_jsonrest-1.0.2-py2.py3-none-any.whl (5.4 kB view details)

Uploaded Python 2Python 3

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

Hashes for vti-jsonrest-1.0.2.tar.gz
Algorithm Hash digest
SHA256 6c079a3cb0b8c6954493831c5caba261753b27ee3fb928d330fb884d432a93be
MD5 3795b05d4b8ca0e2c4c7f208d6e894ec
BLAKE2b-256 519d9470708087a5c4c972e92f9302bae6dcf3bfd4b4201dce43fcd0cf14c15c

See more details on using hashes here.

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

Hashes for vti_jsonrest-1.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 3245d29176d42148dafecba57201ac5c766c5329481a688cff79bec56d723a23
MD5 53830f9fc6c9dc231e3407d76a194ebc
BLAKE2b-256 e22aaeb0d0e6b3410621ae787877cedf4334cbbf41e2465278dfb5f5ebe4d042

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page