Skip to main content

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)

Uploaded source

Built Distribution

tokyo.py-0.0.4-py3-none-any.whl (6.3 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page