New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

animalapi

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

animalapi

A simple Python wrapper for the some-random-api.ml API.

0.0.4
PyPI
Maintainers
1

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.

Keywords

animal

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts