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-0.0.2.tar.gz
(10.3 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-0.0.2.tar.gz.
File metadata
- Download URL: toontown.py-0.0.2.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea13f765ef45734ff30fc2e1efbeaa6bd1eb821b67c20308ed4d9474d22097b4
|
|
| MD5 |
9da5566d83b6f1a992ee580413b66f42
|
|
| BLAKE2b-256 |
d1d37b312dc9c1f3a89cc643fa6791aaf2fadda32b55b6fa7aa0e4b0d568a33c
|
File details
Details for the file toontown.py-0.0.2-py3-none-any.whl.
File metadata
- Download URL: toontown.py-0.0.2-py3-none-any.whl
- Upload date:
- Size: 13.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c948c4adfed3d424d0c674a3693cabb4fb0accdf64caabc17a0ad3f18033528
|
|
| MD5 |
c1044a152e4ab964cfcb0a7d352b7b44
|
|
| BLAKE2b-256 |
4e9716b71e3e37cbbc2e1cee46022777b5787ce78b58bf7f6159b6f566ac3b9f
|