A 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 is1
. Must be 100 or fewer.tag
(Union[str, tuple, list], optional): A tag or a list of tags to filter images. IfNone
, no tag filtering is applied.rating
(Union[str, tuple, list], optional): A rating or a list of ratings to filter images. IfNone
, no rating filtering is applied.ignore
(bool, optional): IfFalse
and not enough images are found, a warning is printed. IfTrue
, no warning is printed. Default isFalse
.
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
Built Distribution
File details
Details for the file animegirlapi-0.1.0.tar.gz
.
File metadata
- Download URL: animegirlapi-0.1.0.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82c400ba765ab38c946514b09f60fcd76b84363f141a7467247acc168f000245 |
|
MD5 | fd729fb1e255fd8ae2fd22dccb5424ce |
|
BLAKE2b-256 | 42c217129056dd9abd942cd8c0d3eac8fb90b676a6587da830f3abd14843d125 |
File details
Details for the file animegirlapi-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: animegirlapi-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a787f48a112d3ed4a48357162809a9cf371cabb64bfd1c06df421cfba31fc1b |
|
MD5 | b970503bf3b3e4619b188e8a4dfa9656 |
|
BLAKE2b-256 | 7b36752955f36eed39e420efa364bfa4ba69fcbc5988499481a4ab9da270cc92 |