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.
Metadata
Release files for picswaifu 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| picswaifu-1.1.0.tar.gz | 3.3 kB | Without provenance | Details for picswaifu-1.1.0.tar.gz |
Release files / picswaifu-1.1.0.tar.gz
| Download URL | picswaifu-1.1.0.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e4ff830e14e0718be32d896e16e7683726ad3951f171f9310e5879f84e5a245d
|
|
BLAKE2b-256 checksum How to use checksums |
6ed0191970b0619db6ad3383405c3b13bcc5d2957c57362a4b13f42f40053f31
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.5
|
Security for picswaifu 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.