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.0.tar.gz
(11.1 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.0.tar.gz.
File metadata
- Download URL: toontown.py-1.0.0.tar.gz
- Upload date:
- Size: 11.1 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 |
17e60735d88aa302efb809b4c72b13ea54d065dfb34b23d514d78eb16ea399a0
|
|
| MD5 |
92abb9b9059db9a00924659698151cb7
|
|
| BLAKE2b-256 |
23193e3d73e09e9a1c94e50189d623c88771dfb2ca1c376f2e34054afe7e0727
|
File details
Details for the file toontown.py-1.0.0-py3-none-any.whl.
File metadata
- Download URL: toontown.py-1.0.0-py3-none-any.whl
- Upload date:
- Size: 13.9 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 |
11a9e35f38ee27938411752e52488d397e8d1369444a7ac3ce70a2e7f079afb5
|
|
| MD5 |
f471adb37b8f584755538069460f4aec
|
|
| BLAKE2b-256 |
62d9f4faf74dc6fca40929de2e8056abbf29b73db2b63db4ca79efeaff18b13a
|