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.2.0.tar.gz
.
File metadata
- Download URL: animegirlapi-0.2.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 | 9a045dac4b345cd1ab6b821851c1780d3677766baa293b67808c63c902071e34 |
|
MD5 | dc9d7fde60b84f009138ad6fbb74af76 |
|
BLAKE2b-256 | 731483e9f11571f8a4dc9c8842ec7c02ca7655ebd311006e5d991b249b3f23ed |
File details
Details for the file animegirlapi-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: animegirlapi-0.2.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 | 062af0844d99ede35a525103d36be56323a7d9c062c774a35a81e561ba98296e |
|
MD5 | 66cba0b77398c9064eaf5fd614141ce3 |
|
BLAKE2b-256 | 513b9536afe3d3746b50499138e1cddc86c78e93f2857203b07daf349fd270ee |