Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gawsoftpl/rest-api-client-framework-python
Simple framework for rest api client in Python
https://github.com/gawsoftpl/rest-api-client-framework-python
Last synced: about 10 hours ago
JSON representation
Simple framework for rest api client in Python
- Host: GitHub
- URL: https://github.com/gawsoftpl/rest-api-client-framework-python
- Owner: gawsoftpl
- License: mit
- Created: 2023-02-11T09:50:30.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-18T09:30:04.000Z (4 months ago)
- Last Synced: 2024-09-19T20:18:24.882Z (about 2 months ago)
- Language: Python
- Size: 70.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Overall
Rest API client for PythonSimple REST API client for Python
## Installation
Use the package manager pip to install our client in Python.
```bash
pip install gawsoft-api-client
```OR
```bash
pip3 install gawsoft-api-client
```## Usage
Write your client api
```python
from gawsoft.api_client import Request, Responseclass Client(Request):
def __init__(
self,
api_key: str,
api_version: str ='',
api_host: str = 'http://httpbin.org',
user_agent: str = 'Example Api Python client'
):
super().__init__(api_key, api_version, api_host, user_agent)def info(self, link: str, params: dict = {}) -> Response:
return self.request(link, 'POST', params)c = Client("abc")
response = c.info("delay/1")
print(response.status_code)
print(response.data())
```## Tests
```sh
make test
make mypy
```## Release
```sh
# Release in test env
make release-test# Real release
make release
```
## License
[MIT](https://choosealicense.com/licenses/mit/)