A Python wrapper for the kawaii.red API.
Install from pypi
pip install kawaiired-pyInstall from source
pip install git+https://github.com/keksiqc/kawaiired-pyTo use this wrapper, you'll need an API token from kawaii.red. Visit their website to obtain a token.
from kawaiired import KawaiiClient client = KawaiiClient(token="your_token_here") client.endpoints("gif") # ['hug', 'kiss', 'pat', 'slap', 'tickle', 'waifu', 'wink', 'yiff'] client.get("gif", "kiss") # https://api.kawaii.red/gif/kiss/kiss1.gif client.random("gif") # https://api.kawaii.red/gif/pat/pat1.gif client.gif("kiss") # https://api.kawaii.red/gif/kiss/kiss1.gif stats = client.stats() # <Stats>from kawaiired import KawaiiAioClient client = KawaiiAioClient(token="your_token_here") await client.endpoints("gif") # ['hug', 'kiss', 'pat', 'slap', 'tickle', 'waifu', 'wink', 'yiff'] await client.get("gif", "kiss") # https://api.kawaii.red/gif/kiss/kiss1.gif await client.random("gif") # https://api.kawaii.red/gif/pat/pat1.gif await client.gif("kiss") # https://api.kawaii.red/gif/kiss/kiss1.gif stats = await client.stats() # <Stats>The stats() method returns a Stats object with the following attributes:
stats.endpoints # List of available endpoints stats.all # Total number of requests stats.failed # Number of failed requests stats.history # List of recent requests stats.most_endpoint # Most used endpoint stats.most_endpoints # List of most used endpoints stats.most_type # Most used type (e.g., 'gif') stats.most_types # List of most used typesContributions to this project are welcome! Here's how you can help:
- Fork the repository
- Create a new branch for your changes
- Make your changes and commit them with a clear description
- Open a pull request with a detailed explanation of your changes
This project is licensed under the MIT License. See the LICENSE file for more details.