Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mikhailkravets/ron-swanson-client
Python Client for Ron Swanson Quotes API
https://github.com/mikhailkravets/ron-swanson-client
api client python
Last synced: about 1 month ago
JSON representation
Python Client for Ron Swanson Quotes API
- Host: GitHub
- URL: https://github.com/mikhailkravets/ron-swanson-client
- Owner: MikhailKravets
- License: mit
- Created: 2022-11-08T10:55:18.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-16T10:34:51.000Z (about 2 years ago)
- Last Synced: 2024-10-11T21:53:59.940Z (4 months ago)
- Topics: api, client, python
- Language: Python
- Homepage:
- Size: 20.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ron Swanson Client
Python client to the [Ron Swanson](https://github.com/jamesseanwright/ron-swanson-quotes) API.
## Installation
In order to install the package run
```shell
pip install ron-swanson-client
```## Quickstart
The package is as simple as it is. At first, create the instance of `RonSwanson` class
```python
from ron_swanson.api import RonSwansonron = RonSwanson()
```Then run the method of the `ron` instance to make a call to the API.
There are three methods available. Please, see the full example below.
```python
import typing
from ron_swanson.api import RonSwansonif __name__ == '__main__':
ron = RonSwanson()# Get single quote of Ron Swanson
one_quote: str = ron.one()# Get five quotes in a list
five_quotes: typing.List[str] = ron.random(count=5)# Search for quotes
results: typing.List[str] = ron.search(term="food")
```## License
The project is licensed under [MIT license](LICENSE).