Skip to main content

A simple Python wrapper for the Toontown Rewritten API

Project description

toontown.py

A simple Python API wrapper for the Toontown Rewritten API (https://github.com/ToontownRewritten/api-doc/)

Features

  • Asynchronous and synchronous
  • API complete

Installing

Python 3.8 or higher is required

# Linux/macOS
python3 -m pip install -U toontown.py

# Windows
py -3 -m pip install -U toontown.py

Examples

Synchronous

>>> import toontown
>>> 
>>> 
>>> toontown = toontown.SyncToontownClient()
>>> toontown.connect()
>>> 
>>> population = toontown.population()
>>> population.total  # Random output
1562
>>> for district, district_population in population.districts():
>>>     print(f'{district} population: {district_population}')
... 
>>> toontown.close()

Asynchronous / Context Manager

>>> import toontown
>>> 
>>> 
>>> async with toontown.AsyncToontownClient() as toontown:
>>>     await toontown.field_offices()

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

toontown.py-1.0.3.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

toontown.py-1.0.3-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

Details for the file toontown.py-1.0.3.tar.gz.

File metadata

  • Download URL: toontown.py-1.0.3.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7

File hashes

Hashes for toontown.py-1.0.3.tar.gz
Algorithm Hash digest
SHA256 e5a28261c8762d8909531f6b2dc94a58971517aa0d8ffc6c75e42ac240d7de4e
MD5 b2d27e7b65a824b9fda3d2c5fa5bb3ff
BLAKE2b-256 a47cbc0106b1f21a326b9b67794f8f07b8a3320741898649e74d30f0da4cd7ea

See more details on using hashes here.

File details

Details for the file toontown.py-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: toontown.py-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 13.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7

File hashes

Hashes for toontown.py-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 33fd7d6f965d26eaa982ce9c9d9e4eb97af335b57cc8bc1f4b60585c5a043c88
MD5 a0a3de62b81233a3f70a8a660f1cee69
BLAKE2b-256 482fe14d8ded6dc5c7d9a3d733d1324877d321c53058e6d747a2970e1aef2714

See more details on using hashes here.

Supported by

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