No project description provided
Project description
Python Waifu Pics API Client
WaifuPics is a Python client for the Waifu Pics API, providing a simple and convenient way to retrieve SFW and NSFW images of various categories.
Installation
You can install WaifuPics using pip:
pip install picswaifu
Usage
from picswaifu import Waifu, ApiTypes, SFWCats, NSFWCats
# Create an instance of WaifuPics
waifu_client = Waifu()
# Get a single SFW image URL
sfw_url = await waifu_client.get()
print(f"SFW Image URL: {sfw_url}")
# Get multiple SFW images URLs as a list
sfw_urls = await waifu_client.get_sfw(category=SFWCats.NEKO, multi=True)
for url in sfw_urls:
print(f"SFW Image URL: {url}")
Errors
- InvalidResponse: Raised when the API returns an invalid response.
- InvalidInput: Raised when the client is not configured properly.
# Notes This package uses the Waifu Pics API. Make sure to review and comply with the API's terms of service.
Contributing
Feel free to contribute by opening issues or submitting pull requests on the GitHub repository.
# License This project is licensed under the GPLv3 License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
picswaifu-1.1.0.tar.gz
(3.3 kB
view details)
File details
Details for the file picswaifu-1.1.0.tar.gz
.
File metadata
- Download URL: picswaifu-1.1.0.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4ff830e14e0718be32d896e16e7683726ad3951f171f9310e5879f84e5a245d |
|
MD5 | febb5a7eecd4041f67a544889ee0f1b8 |
|
BLAKE2b-256 | 6ed0191970b0619db6ad3383405c3b13bcc5d2957c57362a4b13f42f40053f31 |