Skip to main content

An API that can output anime girls, and is 100% manually verified

Project description

Random Image Fetcher

This Python module provides a function to fetch random images from an API based on specified tags and ratings. It supports filtering images by tags and ratings and allows for customization of the number of images requested.

Function: get_random_image

Description

Fetches a random image from the API that matches the specified tag(s) and/or rating(s).

Parameters

  • number (int): The number of images to request. Default is 1. Must be 100 or fewer.
  • tag (Union[str, tuple, list], optional): A tag or a list of tags to filter images. If None, no tag filtering is applied.
  • rating (Union[str, tuple, list], optional): A rating or a list of ratings to filter images. If None, no rating filtering is applied.
  • ignore (bool, optional): If False and not enough images are found, a warning is printed. If True, no warning is printed. Default is False.

Returns

  • A list of URLs for the requested number of images. Returns an empty list if no images are found.

Example Usage

from your_module import get_random_image

Fetch 5 random images with tag "yuri" and rating "safe"

print(get_random_image(number=5, tag="yuri", rating="safe"))

Fetch 10 random images with tag "cute" without checking for rating

print(get_random_image(number=10, tag="cute"))

Fetch 3 random images with rating "explicit" and ignore the warning if not enough images are found

print(get_random_image(number=3, rating="explicit", ignore=True))

Error Handling

Raises a ValueError if number exceeds 100. Prints a warning message if the number of images requested cannot be fulfilled and ignore is False.

Dependencies

requests library: For making HTTP requests to the API.

Contact

For additional support or to request more images with specific tags, you may contact _.lex0 on Discord.

License

This project is licensed under the MIT License. See the terms of service & privacy policy located in the home page

Feel free to modify the content based on your specific project needs or preferences.

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

animegirlapi-0.3.5.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

animegirlapi-0.3.5-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file animegirlapi-0.3.5.tar.gz.

File metadata

  • Download URL: animegirlapi-0.3.5.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for animegirlapi-0.3.5.tar.gz
Algorithm Hash digest
SHA256 37aabc88ad5ddb76fdb409606e1b9bd0033df846a183f3b0a48d0fd667a03c99
MD5 0364a8ea4a061c61973b6a07f377eb07
BLAKE2b-256 c27bf4e020cfd1d2a5503864cec07e47fb6d8e07f6b6077e744a7c47e36db4b9

See more details on using hashes here.

File details

Details for the file animegirlapi-0.3.5-py3-none-any.whl.

File metadata

File hashes

Hashes for animegirlapi-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 a1cb74a12a4d30716adec27df88914e836520e49fa90a2458225d931e3d0b37f
MD5 c48ede7ff10c2d6c29b459a293cd1d12
BLAKE2b-256 e438d26359d22e6737baa4c5b4e1caee2909e386e9ec872d3c9fcb956703b2b6

See more details on using hashes here.

Supported by

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