jokelbaf / hhaven

A well-documented and typed API wrapper for Hentai Haven.
https://hhaven.jokelbaf.tech
MIT License
7 stars 1 forks source link
api hentai hentai-haven
Logo

HHaven

GitHub release (with filter) PyPI Code Climate coverage

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

Links

Documentation - https://jokelbaf.github.io/hhaven

API Reference - https://jokelbaf.github.io/hhaven-api-reference

Requirements

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())