Skip to main content

Simple module to get anime pictures

Project description

🌸 About

Anipics wraps several anime image services behind a small sync and async API. It is designed for bots, small apps, scripts, and experiments where you just want a clean url or typed metadata without hand-writing HTTP calls for every provider.

📦 Installation

uv add anipics
pip install anipics

🚀 Quick Start

from anipics import NekosAPI, WaifuIm

waifu = WaifuIm().get(WaifuIm.Types.waifu)
print(waifu.url)

image = NekosAPI().get_random_image(tags=[NekosAPI.Types.girl])
print(image.id, image.url)

Async usage follows the same shape:

import asyncio

from anipics import Nekosia


async def main() -> None:
    image = await Nekosia().async_get(Nekosia.Types.catgirl)
    print(image.url)


asyncio.run(main())

More examples live in examples/. ✨

🧩 Services

Service Best for Extras
NekosAPI 🖼️ Random images and browsable metadata Typed image metadata models
NekosBest 🎬 Reactions, GIFs, waifu/neko/kitsune images Endpoint discovery
Nekosia 🏷️ Tag/category based anime images Documented main categories and tag lookup
NekosLife 🌙 Classic neko/waifu/avatar style endpoints Simple URL result API
PurrBot ⚡ SFW and NSFW gif/image endpoints v2 API paths
WaifuIm 🎀 Waifu images with include/exclude filters Tag lookup and NSFW filter options

✨ Typed Metadata

Most simple calls return Models.Result with a url field:

from anipics import PurrBot

result = PurrBot().get(PurrBot.Types.SFW.GIF.neko)
print(result.url)

NekosAPI metadata calls return typed Pydantic models:

from anipics import NekosAPI

image = NekosAPI().get_random_image(tags=[NekosAPI.Types.neko])

print(image.id)
print(image.url)
print(image.rating)
print(image.tags)

🛠️ Development

uv sync
uv run scripts/format.py
uv run scripts/test.py

Live tests call external services and are kept separate from the default test command:

uv run scripts/live_test.py

Build the package with:

uv build

📜 License

Anipics is distributed under the AGPL-3.0 license.

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

anipics-2.0.0.tar.gz (1.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

anipics-2.0.0-py3-none-any.whl (22.7 kB view details)

Uploaded Python 3

File details

Details for the file anipics-2.0.0.tar.gz.

File metadata

  • Download URL: anipics-2.0.0.tar.gz
  • Upload date:
  • Size: 1.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for anipics-2.0.0.tar.gz
Algorithm Hash digest
SHA256 a12ea9d3f1809c56b72c093ce9736ba9b73931a0c4120798c854db7984fd5f61
MD5 2f94403958327472ab3c1b7f5702fc55
BLAKE2b-256 c0248390cd44659bc39259d3dc90e2000955c2d777d90028253a3f8e346bd9ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for anipics-2.0.0.tar.gz:

Publisher: release.yml on D4n13l3k00/anipics

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file anipics-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: anipics-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 22.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for anipics-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d29180c1f4016c8ab51cba5df0fb5f455a310b43f1491462cd5ec21baba9e5e3
MD5 25801f6003ba7873cbbbd581efd01c36
BLAKE2b-256 4d8fcf910f8f8a02983711b2e558b30a571d6fef95b7214d404cca0eeea1bfa1

See more details on using hashes here.

Provenance

The following attestation bundles were made for anipics-2.0.0-py3-none-any.whl:

Publisher: release.yml on D4n13l3k00/anipics

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page