Python library for interacting with Tokyo API (https://api.miduwu.ga/)
Project description
tokyo.py
Python library for interacting with Tokyo API (https://api.miduwu.ga/)
Installation
pip install tokyo.py
Usage
import tokyo
import asyncio
from tokyo.properties import Api
api = Api()
print(api.endpoints)
async def main():
json = await tokyo.Json.get(endpoint = ..., builders = {
...
})
bytes = await tokyo.Buffer.get(endpoint = ..., builders = {
...
})
anime = await tokyo.Anime.get(endpoint = ..., builders = [
...
])
print(json, bytes, anime)
# Parameter "endpoint" is the request endpoint string.
# Parameter "builders" is the request parameters/route. {} for parameters, [] for route.
# await tokyo.Json.get(endpoint = '8ball', builders = {'text': 'Hi'})
# await tokyo.Anime.get(endpoint = 'gifs', builders = ['angry'])
asyncio.run(main())
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tokyo.py-0.0.4.tar.gz
(5.6 kB
view hashes)