Skip to main content

aiowallhaven

aiowallhaven is an asynchronous API wrapper for wallhaven.cc.

Basic usage

import asyncio
from aiowallhaven import WallHavenAPI

async def wallpaper_details():
    async with WallHavenAPI("Your-API-key") as wallhaven:
        wallpaper = await wallhaven.get_wallpaper("5758y8")
        print(wallpaper)

asyncio.run(wallpaper_details())

Use the client on a single event loop. The async context manager closes its reusable connection pool, including when a request fails. If you manage the client yourself, call await wallhaven.close() when finished. Each client has its own rate limiter; multiple clients do not share an aggregate rate limit. HTTP errors raise aiohttp.ClientResponseError, with the response status, headers (including Retry-After), and request information available to callers.

Installation

Python 3.12 or newer is required. Runtime dependencies are aiohttp and aiolimiter.

pip install aiowallhaven

Development

Use Poetry to install the versions recorded in poetry.lock:

poetry install
poetry run python -m unittest discover -v
poetry check --lock
poetry build

The default tests run against a local HTTP server and require no API key or internet connection. To run the optional live tests, set WALLHAVEN_API_KEY and run poetry run python -m unittest aiowallhaven.api_tests -v.

pyproject.toml declares runtime dependencies and package metadata; poetry.lock records the development environment resolution. Pip users can install the project with pip install .; a root requirements.txt is not required. Read the Docs uses the separate docs/requirements.txt for documentation dependencies.

Documentation

The documentation is available at Read the Docs.

License

aiowallhaven is developed and distributed under the MIT license.

Metadata

Release files for aiowallhaven 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aiowallhaven 0.0.6
File Size Uploaded Provenance Actions
aiowallhaven-0.0.6.tar.gz 7.9 kB Without provenance Details for aiowallhaven-0.0.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aiowallhaven 0.0.6
File Interpreter ABI Platform Actions
aiowallhaven-0.0.6-py3-none-any.whl Python 3 none any Details for aiowallhaven-0.0.6-py3-none-any.whl

Total release size: 17.7 kB

Release files / aiowallhaven-0.0.6.tar.gz

Download URL aiowallhaven-0.0.6.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
9fb1fe81ec397558549b7a624f9b8641e200a419698aec2c9dc48d0f4e5b6ec3
BLAKE2b-256 checksum
How to use checksums
302972b964a4c607265f7c48fdaf1ffaa08b41d910ef2f4232bc6368f31b83e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / aiowallhaven-0.0.6-py3-none-any.whl

Download URL aiowallhaven-0.0.6-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d40be4a146d53b59740562c2dbbf0610091de21d9006c386c7e21467d69c826b
BLAKE2b-256 checksum
How to use checksums
86cf3f46092af49d682708df41b560cf974114b21d5438580f7a139160e9a863
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for aiowallhaven 0.0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page