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.1.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.1-py2.py3-none-any.whl (5.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file vti-jsonrest-1.0.1.tar.gz.

File metadata

  • Download URL: vti-jsonrest-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 5a57569ce706a159c538233bdd56909cc9e1ed238b3a465063f98a4cf2e30359
MD5 4f4c52113037c4b61626863af4e3de5f
BLAKE2b-256 31a902a8bd61cf4e6cfd4f73c535cbabc96c72e53947461f888ec1ee8ceb62b8

See more details on using hashes here.

File details

Details for the file vti_jsonrest-1.0.1-py2.py3-none-any.whl.

File metadata

  • Download URL: vti_jsonrest-1.0.1-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.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 bd100570f8b2715df16730a0284496d93d42d4ab3a8fde765ca62559351ce07e
MD5 35a29bbc0ea8adc3fc3cd41f2386b87a
BLAKE2b-256 8e27660993aee7ed4e3a9ec71b88877bbc4598757987e8c6dd2d9e4f2771c2d9

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