Name | python-pydantic-responses-python-sdk JSON |
Version |
1.0.0
JSON |
| download |
home_page | |
Summary | Client for Python Pydantic Responses API |
upload_time | 2023-11-03 22:21:48 |
maintainer | |
docs_url | None |
author | API Support |
requires_python | >=3.7,<4.0 |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# python-pydantic-responses-python-sdk<a id="python-pydantic-responses-python-sdk"></a>
A simple API based on python pydantic responses.
[![PyPI](https://img.shields.io/badge/PyPI-v1.0.0-blue)](https://pypi.org/project/python-pydantic-responses-python-sdk/1.0.0)
[![README.md](https://img.shields.io/badge/README-Click%20Here-green)](https://github.com/konfig-dev/konfig/tree/main/python#readme)
[![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](http://example.com/support)
## Table of Contents<a id="table-of-contents"></a>
<!-- toc -->
- [Requirements](#requirements)
- [Installing](#installing)
- [Getting Started](#getting-started)
- [Async](#async)
- [Raw HTTP Response](#raw-http-response)
- [Reference](#reference)
* [`pythonpydanticresponses.test.fetch`](#pythonpydanticresponsestestfetch)
* [`pythonpydanticresponses.test.reserved_word`](#pythonpydanticresponsestestreserved_word)
<!-- tocstop -->
## Requirements<a id="requirements"></a>
Python >=3.7
## Installing<a id="installing"></a>
```sh
pip install python-pydantic-responses-python-sdk==1.0.0
```
## Getting Started<a id="getting-started"></a>
```python
from pprint import pprint
from python_pydantic import PythonPydanticResponses, ApiException
pythonpydanticresponses = PythonPydanticResponses(
api_key="YOUR_API_KEY",
)
try:
# Fetches a JSON value based on input parameter
fetch_response = pythonpydanticresponses.test.fetch(
input_parameter="inputParameter_example",
)
print(fetch_response)
except ApiException as e:
print("Exception when calling TestApi.fetch: %s\n" % e)
pprint(e.body)
if e.status == 400:
pprint(e.body["error"])
if e.status == 500:
pprint(e.body["error"])
pprint(e.headers)
pprint(e.status)
pprint(e.reason)
pprint(e.round_trip_time)
```
## Async<a id="async"></a>
`async` support is available by prepending `a` to any method.
```python
import asyncio
from pprint import pprint
from python_pydantic import PythonPydanticResponses, ApiException
pythonpydanticresponses = PythonPydanticResponses(
api_key="YOUR_API_KEY",
)
async def main():
try:
# Fetches a JSON value based on input parameter
fetch_response = await pythonpydanticresponses.test.afetch(
input_parameter="inputParameter_example",
)
print(fetch_response)
except ApiException as e:
print("Exception when calling TestApi.fetch: %s\n" % e)
pprint(e.body)
if e.status == 400:
pprint(e.body["error"])
if e.status == 500:
pprint(e.body["error"])
pprint(e.headers)
pprint(e.status)
pprint(e.reason)
pprint(e.round_trip_time)
asyncio.run(main())
```
## Raw HTTP Response<a id="raw-http-response"></a>
To access raw HTTP response values, use the `.raw` namespace.
```python
from pprint import pprint
from python_pydantic import PythonPydanticResponses, ApiException
pythonpydanticresponses = PythonPydanticResponses(
api_key="YOUR_API_KEY",
)
try:
# Fetches a JSON value based on input parameter
fetch_response = pythonpydanticresponses.test.raw.fetch(
input_parameter="inputParameter_example",
)
pprint(fetch_response.body)
pprint(fetch_response.body["property_a"])
pprint(fetch_response.body["property_b"])
pprint(fetch_response.body["property_c"])
pprint(fetch_response.headers)
pprint(fetch_response.status)
pprint(fetch_response.round_trip_time)
except ApiException as e:
print("Exception when calling TestApi.fetch: %s\n" % e)
pprint(e.body)
if e.status == 400:
pprint(e.body["error"])
if e.status == 500:
pprint(e.body["error"])
pprint(e.headers)
pprint(e.status)
pprint(e.reason)
pprint(e.round_trip_time)
```
## Reference<a id="reference"></a>
### `pythonpydanticresponses.test.fetch`<a id="pythonpydanticresponsestestfetch"></a>
Provide an input parameter to receive a JSON value with properties.
#### 🛠️ Usage<a id="🛠️-usage"></a>
```python
fetch_response = pythonpydanticresponses.test.fetch(
input_parameter="inputParameter_example",
)
```
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
##### input_parameter: `str`<a id="input_parameter-str"></a>
The input parameter to process.
#### 🔄 Return<a id="🔄-return"></a>
[TestFetchResponse](./python_pydantic/pydantic/test_fetch_response.py)
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
`/simple-endpoint` `get`
[🔙 **Back to Table of Contents**](#table-of-contents)
---
### `pythonpydanticresponses.test.reserved_word`<a id="pythonpydanticresponsestestreserved_word"></a>
Reserved word in Python
#### 🛠️ Usage<a id="🛠️-usage"></a>
```python
reserved_word_response = pythonpydanticresponses.test.reserved_word()
```
#### 🔄 Return<a id="🔄-return"></a>
[TestReservedWord](./python_pydantic/pydantic/test_reserved_word.py)
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
`/reserved-word` `get`
[🔙 **Back to Table of Contents**](#table-of-contents)
---
## Author<a id="author"></a>
This Python package is automatically generated by [Konfig](https://konfigthis.com)
Raw data
{
"_id": null,
"home_page": "",
"name": "python-pydantic-responses-python-sdk",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7,<4.0",
"maintainer_email": "",
"keywords": "",
"author": "API Support",
"author_email": "support@example.com",
"download_url": "https://files.pythonhosted.org/packages/f9/34/1d1973dc086536e7ecb504d357c1c69cc142568dad327a21cf9863e0661a/python_pydantic_responses_python_sdk-1.0.0.tar.gz",
"platform": null,
"description": "# python-pydantic-responses-python-sdk<a id=\"python-pydantic-responses-python-sdk\"></a>\n\nA simple API based on python pydantic responses.\n\n\n[![PyPI](https://img.shields.io/badge/PyPI-v1.0.0-blue)](https://pypi.org/project/python-pydantic-responses-python-sdk/1.0.0)\n[![README.md](https://img.shields.io/badge/README-Click%20Here-green)](https://github.com/konfig-dev/konfig/tree/main/python#readme)\n[![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](http://example.com/support)\n\n## Table of Contents<a id=\"table-of-contents\"></a>\n\n<!-- toc -->\n\n- [Requirements](#requirements)\n- [Installing](#installing)\n- [Getting Started](#getting-started)\n- [Async](#async)\n- [Raw HTTP Response](#raw-http-response)\n- [Reference](#reference)\n * [`pythonpydanticresponses.test.fetch`](#pythonpydanticresponsestestfetch)\n * [`pythonpydanticresponses.test.reserved_word`](#pythonpydanticresponsestestreserved_word)\n\n<!-- tocstop -->\n\n## Requirements<a id=\"requirements\"></a>\n\nPython >=3.7\n\n## Installing<a id=\"installing\"></a>\n\n```sh\npip install python-pydantic-responses-python-sdk==1.0.0\n```\n\n## Getting Started<a id=\"getting-started\"></a>\n\n```python\nfrom pprint import pprint\nfrom python_pydantic import PythonPydanticResponses, ApiException\n\npythonpydanticresponses = PythonPydanticResponses(\n api_key=\"YOUR_API_KEY\",\n)\n\ntry:\n # Fetches a JSON value based on input parameter\n fetch_response = pythonpydanticresponses.test.fetch(\n input_parameter=\"inputParameter_example\",\n )\n print(fetch_response)\nexcept ApiException as e:\n print(\"Exception when calling TestApi.fetch: %s\\n\" % e)\n pprint(e.body)\n if e.status == 400:\n pprint(e.body[\"error\"])\n if e.status == 500:\n pprint(e.body[\"error\"])\n pprint(e.headers)\n pprint(e.status)\n pprint(e.reason)\n pprint(e.round_trip_time)\n```\n\n## Async<a id=\"async\"></a>\n\n`async` support is available by prepending `a` to any method.\n\n```python\nimport asyncio\nfrom pprint import pprint\nfrom python_pydantic import PythonPydanticResponses, ApiException\n\npythonpydanticresponses = PythonPydanticResponses(\n api_key=\"YOUR_API_KEY\",\n)\n\n\nasync def main():\n try:\n # Fetches a JSON value based on input parameter\n fetch_response = await pythonpydanticresponses.test.afetch(\n input_parameter=\"inputParameter_example\",\n )\n print(fetch_response)\n except ApiException as e:\n print(\"Exception when calling TestApi.fetch: %s\\n\" % e)\n pprint(e.body)\n if e.status == 400:\n pprint(e.body[\"error\"])\n if e.status == 500:\n pprint(e.body[\"error\"])\n pprint(e.headers)\n pprint(e.status)\n pprint(e.reason)\n pprint(e.round_trip_time)\n\n\nasyncio.run(main())\n```\n\n## Raw HTTP Response<a id=\"raw-http-response\"></a>\n\nTo access raw HTTP response values, use the `.raw` namespace.\n\n```python\nfrom pprint import pprint\nfrom python_pydantic import PythonPydanticResponses, ApiException\n\npythonpydanticresponses = PythonPydanticResponses(\n api_key=\"YOUR_API_KEY\",\n)\n\ntry:\n # Fetches a JSON value based on input parameter\n fetch_response = pythonpydanticresponses.test.raw.fetch(\n input_parameter=\"inputParameter_example\",\n )\n pprint(fetch_response.body)\n pprint(fetch_response.body[\"property_a\"])\n pprint(fetch_response.body[\"property_b\"])\n pprint(fetch_response.body[\"property_c\"])\n pprint(fetch_response.headers)\n pprint(fetch_response.status)\n pprint(fetch_response.round_trip_time)\nexcept ApiException as e:\n print(\"Exception when calling TestApi.fetch: %s\\n\" % e)\n pprint(e.body)\n if e.status == 400:\n pprint(e.body[\"error\"])\n if e.status == 500:\n pprint(e.body[\"error\"])\n pprint(e.headers)\n pprint(e.status)\n pprint(e.reason)\n pprint(e.round_trip_time)\n```\n\n\n## Reference<a id=\"reference\"></a>\n### `pythonpydanticresponses.test.fetch`<a id=\"pythonpydanticresponsestestfetch\"></a>\n\nProvide an input parameter to receive a JSON value with properties.\n\n#### \ud83d\udee0\ufe0f Usage<a id=\"\ud83d\udee0\ufe0f-usage\"></a>\n\n```python\nfetch_response = pythonpydanticresponses.test.fetch(\n input_parameter=\"inputParameter_example\",\n)\n```\n\n#### \u2699\ufe0f Parameters<a id=\"\u2699\ufe0f-parameters\"></a>\n\n##### input_parameter: `str`<a id=\"input_parameter-str\"></a>\n\nThe input parameter to process.\n\n#### \ud83d\udd04 Return<a id=\"\ud83d\udd04-return\"></a>\n\n[TestFetchResponse](./python_pydantic/pydantic/test_fetch_response.py)\n\n#### \ud83c\udf10 Endpoint<a id=\"\ud83c\udf10-endpoint\"></a>\n\n`/simple-endpoint` `get`\n\n[\ud83d\udd19 **Back to Table of Contents**](#table-of-contents)\n\n---\n\n### `pythonpydanticresponses.test.reserved_word`<a id=\"pythonpydanticresponsestestreserved_word\"></a>\n\nReserved word in Python\n\n#### \ud83d\udee0\ufe0f Usage<a id=\"\ud83d\udee0\ufe0f-usage\"></a>\n\n```python\nreserved_word_response = pythonpydanticresponses.test.reserved_word()\n```\n\n#### \ud83d\udd04 Return<a id=\"\ud83d\udd04-return\"></a>\n\n[TestReservedWord](./python_pydantic/pydantic/test_reserved_word.py)\n\n#### \ud83c\udf10 Endpoint<a id=\"\ud83c\udf10-endpoint\"></a>\n\n`/reserved-word` `get`\n\n[\ud83d\udd19 **Back to Table of Contents**](#table-of-contents)\n\n---\n\n\n## Author<a id=\"author\"></a>\nThis Python package is automatically generated by [Konfig](https://konfigthis.com)\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Client for Python Pydantic Responses API",
"version": "1.0.0",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3bc5c8817447f2717b13cfe7e485f4173f4df6a00e2a298123a6e852f24cfa4b",
"md5": "af52f22920997f348289b96a2dbaf454",
"sha256": "fca10e8722e51dfbaa7ff9c7522b34efd823953d1952e21633496c0367974c3d"
},
"downloads": -1,
"filename": "python_pydantic_responses_python_sdk-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "af52f22920997f348289b96a2dbaf454",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7,<4.0",
"size": 78328,
"upload_time": "2023-11-03T22:21:46",
"upload_time_iso_8601": "2023-11-03T22:21:46.331919Z",
"url": "https://files.pythonhosted.org/packages/3b/c5/c8817447f2717b13cfe7e485f4173f4df6a00e2a298123a6e852f24cfa4b/python_pydantic_responses_python_sdk-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f9341d1973dc086536e7ecb504d357c1c69cc142568dad327a21cf9863e0661a",
"md5": "44ac3c3437a09306abb2dbb79d660952",
"sha256": "dcac79374dc42886b357eb3ae7ce1c1eaba80f59b2604be38a3c8e4caf50ec53"
},
"downloads": -1,
"filename": "python_pydantic_responses_python_sdk-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "44ac3c3437a09306abb2dbb79d660952",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7,<4.0",
"size": 51897,
"upload_time": "2023-11-03T22:21:48",
"upload_time_iso_8601": "2023-11-03T22:21:48.231238Z",
"url": "https://files.pythonhosted.org/packages/f9/34/1d1973dc086536e7ecb504d357c1c69cc142568dad327a21cf9863e0661a/python_pydantic_responses_python_sdk-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-11-03 22:21:48",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "python-pydantic-responses-python-sdk"
}