animalapi
A simple Python wrapper for the some-random-api.ml API.
<img src="https://img.shields.io/pypi/v/animalapi.svg" alt="PyPI version" />
<img src="https://img.shields.io/github/license/dashutosh04/animalapi.svg" alt="License" />
Easily access animal images and facts in your Python projects.
Features
-
Random Animal Data: Get randomized animal data (image and fact) with
rand_animals(). -
Specific Animal Data: Fetch data for a specific animal using
animal_data(animal_name). -
Supported Animals: Currently supports "dog", "cat", "bird" and "koala".
-
Error Handling: Provides informative error messages and handles invalid animal names and API request errors.
Installation
pip install animalapi
Usage
Get random animal data
import animalapi as a
data = a.rand_animals()
img = data["image"]
fact = data["fact"]
print(img)
print(fact)
Get data for a specific animal
import animalapi as a
data = a.animal_data("dog")
img = data["image"]
fact = data["fact"]
print(img)
print(fact)
Contributing
Contributions are welcome! Feel free to open issues or pull requests.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for animalapi 0.0.4
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 |
|---|---|---|---|---|
| animalapi-0.0.4.tar.gz | 3.6 kB | Without provenance | Details for animalapi-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| animalapi-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for animalapi-0.0.4-py3-none-any.whl |
Total release size: 7.0 kB
Release files / animalapi-0.0.4.tar.gz
| Download URL | animalapi-0.0.4.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
32bc81b7d00e5ee71ec8668e9c5a45e97cf98063972b697760980c567904d181
|
|
BLAKE2b-256 checksum How to use checksums |
884d3e188e6e354441685394131f73ef096237343405eb24d73246311893dc2b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.4
|
Release files / animalapi-0.0.4-py3-none-any.whl
| Download URL | animalapi-0.0.4-py3-none-any.whl |
|---|---|
| Size | 3.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
21a306a9d08c003619b091d4821726b9063d981a28aaf6765cb3667e848ae47d
|
|
BLAKE2b-256 checksum How to use checksums |
e09df3c3c3e2cccd690daa64c6d48059bbed5fe219b7fb0d289421b9f8be213c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.4
|
Security for animalapi 0.0.4
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.