ObjectREST
A Python package to handle REST API requests, JSON parsing, and pydantic object generation.
Installation
From PyPi: python -m pip install objectrest
From GitHub python -m pip install git+https://github.com/nwithan8/objectrest.git
Usage
This package acts as a middle-man between the user and the Requests library.
Users can call to methods directly, or use the RequestHandler class to set universal parameters (i.e. API tokens), universal headers and/or a universal base URL for all requests
Users can retrieve the raw request, the JSON data from a request, or have the JSON data automatically parsed into a Pydantic model.
Example:
from objectrest import RequestHandler
requests = RequestHandler(base_url="http://rootoftheapi", universal_parameters={'api_key': "thisisanapikey"})
my_object = requests.get_object(url="/object", model=MyObjectClass, params={"limit": 10})
Documentation
Documentation available on ReadTheDocs
Metadata
Release files for objectrest 2.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| objectrest-2.1.0.tar.gz | 25.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| objectrest-2.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 53.0 kB
Release files / objectrest-2.1.0.tar.gz
| Download URL | objectrest-2.1.0.tar.gz |
|---|---|
| Size | 25.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
645ba4d80baae6cf3e85e715dc00c553c308cdd68a3101497818e02e010f2bc6
|
|
BLAKE2b-256 checksum How to use checksums |
2a877cb69903cc4fdbff22ed767b7cda5c177770e682515ca282ac4a601a630d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / objectrest-2.1.0-py3-none-any.whl
| Download URL | objectrest-2.1.0-py3-none-any.whl |
|---|---|
| Size | 28.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
42c6d0e7c5ddbbf761d3c4519b1a26a837679758845f07c502aea08f3c755b51
|
|
BLAKE2b-256 checksum How to use checksums |
e9c56992bdbc33f3667f8a2bbde2cd65034a54c96f59463806c00f4f16d6c579
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|