A well-documented and typed API wrapper for Hentai Haven.
Project description
HHaven
A well-documented and typed API wrapper for Hentai Haven, providing efficient asynchronous requests, built-in cache support, and Pydantic Models for seamless autocompletion and linter support.
Key Features
- Efficient Asynchronous Structure: Utilize a fully asynchronous structure that enhances request speed without affecting other processes in your code.
- Built-in Cache Support: Benefit from built-in cache support using the aiocache library, reducing unnecessary API requests and improving overall performance.
- Pydantic Model Output: Receive all data in the form of Pydantic Models, enabling comprehensive autocompletion and linter support.
- Comprehensive Documentation: Explore extensive and user-friendly documentation, covering all aspects of this library.
Links
Documentation - https://jokelbaf.github.io/hhaven
API Reference - https://jokelbaf.github.io/hhaven-api-reference
Requirements
- Python 3.8+
- pydantic
- aiohttp
- aiocache
Installation
From PyPi:
pip install hhaven
From GitHub:
pip install git+https://github.com/JokelBaf/hhaven.git
Examples
Search for hentai by it's name:
from hhaven import Client
import asyncio
async def main():
client = await Client().build()
results = await client.search("Maid Kyouiku")
hentai = await results[0].full()
print(hentai)
if __name__ == "__main__":
asyncio.run(main())
Get all episodes of the latest hentai:
from hhaven import Client
import asyncio
async def main():
client = await Client().build()
home = await client.home()
hentai = await home.last[0].full()
for episode in hentai.episodes:
print(episode.name)
if __name__ == "__main__":
asyncio.run(main())
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hhaven-0.1.4.tar.gz
(10.8 kB
view details)
File details
Details for the file hhaven-0.1.4.tar.gz
.
File metadata
- Download URL: hhaven-0.1.4.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e43faa22d4e021dd87c2582ddfa0740d5a3267416d2e7822ca874454a9db2da |
|
MD5 | f619143b6cd1cd5d2d062f4295b89499 |
|
BLAKE2b-256 | ef3528e195684e824a3d1654e16687b246433a2e7f85a53a59f83c88309d0d45 |