Metadata-Version: 2.1
Name: objectrest
Version: 2.1.0
Summary: A Python package to handle REST API requests, JSON parsing, and pydantic object generation.
Home-page: https://github.com/nwithan8/objectrest
Download-URL: https://github.com/nwithan8/objectrest/archive/2.1.0.tar.gz
Author: Nate Harris
Author-email: n8gr8gbln@gmail.com
License: GNU General Public License v3 (GPLv3)
Keywords: API,REST,objects,pydantic,JSON,requests,OAuth2,token
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Build Tools
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Multimedia :: Video
Classifier: Topic :: Multimedia
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests >=2.27.1
Requires-Dist: requests-oauthlib >=1.3.0
Requires-Dist: httpx ==0.23.*
Requires-Dist: oauthlib ==3.2.1
Requires-Dist: proxlist ~=0.5.0
Provides-Extra: dev
Requires-Dist: black ; extra == 'dev'
Requires-Dist: flake8 ; extra == 'dev'
Requires-Dist: pytest-cov ==3.* ; extra == 'dev'
Requires-Dist: pytest-vcr ==1.* ; extra == 'dev'
Requires-Dist: pytest ==7.* ; extra == 'dev'
Requires-Dist: pydantic ; extra == 'dev'
Requires-Dist: requests >=2.27.1 ; extra == 'dev'
Requires-Dist: requests-oauthlib >=1.3.0 ; extra == 'dev'
Requires-Dist: httpx ==0.23.* ; extra == 'dev'
Requires-Dist: oauthlib ==3.2.1 ; extra == 'dev'
Requires-Dist: proxlist ~=0.5.0 ; extra == 'dev'

# ObjectREST
[![PyPi](https://img.shields.io/pypi/dm/objectrest?color=green&label=PyPI&logo=pypi&logoColor=yellow&style=flat-square)](https://pypi.org/project/objectrest)
[![License](https://img.shields.io/pypi/l/tautulli?color=orange&style=flat-square)](https://github.com/nwithan8/objectrest/blob/master/LICENSE)

[![Tests](https://github.com/nwithan8/objectrest/workflows/CI/badge.svg)](https://github.com/nwithan8/objectrest/actions?query=workflow%3ACI)
[![Open Issues](https://img.shields.io/github/issues-raw/nwithan8/objectrest?color=gold&style=flat-square)](https://github.com/nwithan8/objectrest/issues?q=is%3Aopen+is%3Aissue)
[![Closed Issues](https://img.shields.io/github/issues-closed-raw/nwithan8/objectrest?color=black&style=flat-square)](https://github.com/nwithan8/objectrest/issues?q=is%3Aissue+is%3Aclosed)
[![Latest Release](https://img.shields.io/github/v/release/nwithan8/objectrest?color=red&label=latest%20release&logo=github&style=flat-square)](https://github.com/nwithan8/objectrest/releases)

[![Discord](https://img.shields.io/discord/472537215457689601?color=blue&logo=discord&style=flat-square)](https://discord.gg/7jGbCJQ)
[![Twitter](https://img.shields.io/twitter/follow/nwithan8?label=%40nwithan8&logo=twitter&style=flat-square)](https://twitter.com/nwithan8)

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:
```python
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](https://objectrest.readthedocs.io/en/latest/documentation.html)
