eeriemyxi / somerandomapi-wrapper

Easy to use API Wrapper for somerandomapi.ml.
MIT License
1 stars 1 forks source link

Overview

somerandomapi is an API Wrapper for some-random-api.ml

Examples

Asynchronous

from somerandomapi import Animal
import asyncio

async def main():
    async with Animal.dog as resp:
        print(
            f"Fact: {resp.fact}",
            f"Image: {resp.image}",
            sep="\n"
        )

asyncio.run(main())

Synchronous

from somerandomapi import Animal

with Animal.dog as resp:
    print(
        f"Fact: {resp.fact}",
        f"Image: {resp.image}",
        sep="\n"
    )

Easy, isn't it?

Documentation

I am not completely happy with the docs and its still being fixed but its pretty usable, click here to check it.

Note

How to install