animalapi


Nameanimalapi JSON
Version 0.0.4 PyPI version JSON
download
home_pageNone
SummaryA simple Python wrapper for the some-random-api.ml API.
upload_time2024-10-05 17:19:25
maintainerNone
docs_urlNone
authorAshutosh Das
requires_pythonNone
licenseNone
keywords animal api wrapper images facts
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
<h1 align="center">animalapi</h1>



<p align="center">

  A simple Python wrapper for the <a href="https://some-random-api.ml/">some-random-api.ml</a> API.

  <br />

  <a href="https://pypi.org/project/animalapi">

    <img src="https://img.shields.io/pypi/v/animalapi.svg" alt="PyPI version" />

  </a>

  <a href="https://github.com/dashutosh04/animalapi/blob/main/LICENSE">

    <img src="https://img.shields.io/github/license/dashutosh04/animalapi.svg" alt="License" />

  </a>

</p>



<p align="center">

  Easily access animal images and facts in your Python projects.

</p>



## 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



```bash

pip install animalapi

```



## Usage

> Get random animal data



```Python

import animalapi as a



data = a.rand_animals()

img = data["image"]

fact = data["fact"]



print(img) 

print(fact) 

```



> Get data for a specific animal

```Python

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. 

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "animalapi",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "animal, api, wrapper, images, facts",
    "author": "Ashutosh Das",
    "author_email": "ashutoshdas2004@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/88/4d/3e188e6e354441685394131f73ef096237343405eb24d73246311893dc2b/animalapi-0.0.4.tar.gz",
    "platform": null,
    "description": "\r\n<h1 align=\"center\">animalapi</h1>\r\n\r\n\r\n\r\n<p align=\"center\">\r\n\r\n  A simple Python wrapper for the <a href=\"https://some-random-api.ml/\">some-random-api.ml</a> API.\r\n\r\n  <br />\r\n\r\n  <a href=\"https://pypi.org/project/animalapi\">\r\n\r\n    <img src=\"https://img.shields.io/pypi/v/animalapi.svg\" alt=\"PyPI version\" />\r\n\r\n  </a>\r\n\r\n  <a href=\"https://github.com/dashutosh04/animalapi/blob/main/LICENSE\">\r\n\r\n    <img src=\"https://img.shields.io/github/license/dashutosh04/animalapi.svg\" alt=\"License\" />\r\n\r\n  </a>\r\n\r\n</p>\r\n\r\n\r\n\r\n<p align=\"center\">\r\n\r\n  Easily access animal images and facts in your Python projects.\r\n\r\n</p>\r\n\r\n\r\n\r\n## Features\r\n\r\n\r\n\r\n* **Random Animal Data:** Get randomized animal data (image and fact) with `rand_animals()`.\r\n\r\n* **Specific Animal Data:** Fetch data for a specific animal using `animal_data(animal_name)`.\r\n\r\n* **Supported Animals:**  Currently supports \"dog\", \"cat\", \"bird\" and \"koala\".\r\n\r\n* **Error Handling:**  Provides informative error messages and handles invalid animal names and API request errors.\r\n\r\n\r\n\r\n## Installation\r\n\r\n\r\n\r\n```bash\r\n\r\npip install animalapi\r\n\r\n```\r\n\r\n\r\n\r\n## Usage\r\n\r\n> Get random animal data\r\n\r\n\r\n\r\n```Python\r\n\r\nimport animalapi as a\r\n\r\n\r\n\r\ndata = a.rand_animals()\r\n\r\nimg = data[\"image\"]\r\n\r\nfact = data[\"fact\"]\r\n\r\n\r\n\r\nprint(img) \r\n\r\nprint(fact) \r\n\r\n```\r\n\r\n\r\n\r\n> Get data for a specific animal\r\n\r\n```Python\r\n\r\nimport animalapi as a\r\n\r\n\r\n\r\ndata = a.animal_data(\"dog\")\r\n\r\nimg = data[\"image\"]\r\n\r\nfact = data[\"fact\"]\r\n\r\n\r\n\r\nprint(img)\r\n\r\nprint(fact)\r\n\r\n```\r\n\r\n\r\n\r\n### Contributing\r\n\r\nContributions are welcome! Feel free to open issues or pull requests.\r\n\r\n\r\n\r\n### License\r\n\r\nThis project is licensed under the MIT License - see the LICENSE file for details. \r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A simple Python wrapper for the some-random-api.ml API.",
    "version": "0.0.4",
    "project_urls": {
        "Bug Tracker": "https://github.com/DARKPOISON-yt/animalapi/issues",
        "Source Code": "https://github.com/DARKPOISON-yt/animalapi"
    },
    "split_keywords": [
        "animal",
        " api",
        " wrapper",
        " images",
        " facts"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e09df3c3c3e2cccd690daa64c6d48059bbed5fe219b7fb0d289421b9f8be213c",
                "md5": "ae0bd183e8600300b77cefa191518a38",
                "sha256": "21a306a9d08c003619b091d4821726b9063d981a28aaf6765cb3667e848ae47d"
            },
            "downloads": -1,
            "filename": "animalapi-0.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ae0bd183e8600300b77cefa191518a38",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 3453,
            "upload_time": "2024-10-05T17:19:23",
            "upload_time_iso_8601": "2024-10-05T17:19:23.663932Z",
            "url": "https://files.pythonhosted.org/packages/e0/9d/f3c3c3e2cccd690daa64c6d48059bbed5fe219b7fb0d289421b9f8be213c/animalapi-0.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "884d3e188e6e354441685394131f73ef096237343405eb24d73246311893dc2b",
                "md5": "361c79d9f978bf0d995276abaa550302",
                "sha256": "32bc81b7d00e5ee71ec8668e9c5a45e97cf98063972b697760980c567904d181"
            },
            "downloads": -1,
            "filename": "animalapi-0.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "361c79d9f978bf0d995276abaa550302",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3552,
            "upload_time": "2024-10-05T17:19:25",
            "upload_time_iso_8601": "2024-10-05T17:19:25.563474Z",
            "url": "https://files.pythonhosted.org/packages/88/4d/3e188e6e354441685394131f73ef096237343405eb24d73246311893dc2b/animalapi-0.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-05 17:19:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "DARKPOISON-yt",
    "github_project": "animalapi",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "animalapi"
}
        
Elapsed time: 1.63081s