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
Release history Release notifications | RSS feed
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)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5a28261c8762d8909531f6b2dc94a58971517aa0d8ffc6c75e42ac240d7de4e
|
|
| MD5 |
b2d27e7b65a824b9fda3d2c5fa5bb3ff
|
|
| BLAKE2b-256 |
a47cbc0106b1f21a326b9b67794f8f07b8a3320741898649e74d30f0da4cd7ea
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33fd7d6f965d26eaa982ce9c9d9e4eb97af335b57cc8bc1f4b60585c5a043c88
|
|
| MD5 |
a0a3de62b81233a3f70a8a660f1cee69
|
|
| BLAKE2b-256 |
482fe14d8ded6dc5c7d9a3d733d1324877d321c53058e6d747a2970e1aef2714
|