Skip to main content

API Wrapper around Chimu.moe API for both synchronous and asynchronous purposes.

Project description

ChimuAPI Python Wrapper

API Wrapper around Chimu.moe API for both synchronous and asynchronous purposes.

What is it for?

I made this wrapper for Python devs so they can easly access Chimu.moe API both async and sync.

Allowing more people to use it!

Synchronous Example

import ChimuApi as chimu

def main():

    api = chimu.ChimuAPI()

    sets = api.get_set(1)

    for mapa in sets.ChildrenBeatmaps:

        print(f"{mapa.BeatmapId} [{mapa.DiffName}]")

    print(sets.Creator)

def download():

    api = chimu.ChimuAPI()

    file_bytes = api.download_file(1, key_here, state_here)

    with open("map.osz", "wb") as filea:
        filea.write(file_bytes)

main()
download()

Asynchronous Example

import ChimuApi as chimu
import asyncio

async def main():

    api = chimu.AsyncChimuAPI()

    sets = await api.get_set(1)

    for mapa in sets.ChildrenBeatmaps:

        print(f"{mapa.BeatmapId} [{mapa.DiffName}]")

    print(sets.Creator)

async def download():

    api = chimu.AsyncChimuAPI()

    file_bytes = await api.download_file(1, key_here, state_here)

    with open("map.osz", "wb") as filea:
        filea.write(file_bytes)

asyncio.run(main())
asyncio.run(download())

Contribution

If you feel like you want to help/fix/change something in this package, just create Issue or Pull Request on GitHub and I'll review it.

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

ChimuApi-0.1.5.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

ChimuApi-0.1.5-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file ChimuApi-0.1.5.tar.gz.

File metadata

  • Download URL: ChimuApi-0.1.5.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/51.3.3 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.6

File hashes

Hashes for ChimuApi-0.1.5.tar.gz
Algorithm Hash digest
SHA256 04020cc83f73123cbd72fcf5d6c102112904c79b659a022285f2add08940e5de
MD5 755fe7c8f4f7f12d18cf23e8f92d7c60
BLAKE2b-256 7e837b9a3de5dd5788a014b5102d24e87aeecb2097f037194c4597eed4fa1a1e

See more details on using hashes here.

File details

Details for the file ChimuApi-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: ChimuApi-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/51.3.3 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.6

File hashes

Hashes for ChimuApi-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 8403c0eea552d438dd33ea57bf56b808336635513e6e94255a8e8344edb70baf
MD5 9937c8e592aef623576cb7547a4dba31
BLAKE2b-256 5ec7951ea4c0737f55d082630c0022571886bb2a987d2dd02d2df239e4274611

See more details on using hashes here.

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