Metadata-Version: 2.1
Name: toontown.py
Version: 1.0.1
Summary: A simple Python wrapper for the Toontown Rewritten API
Home-page: https://github.com/jaczerob/toontown.py
Author: jaczerob
License: MIT
Platform: UNKNOWN
Classifier: License :: OSI Approved :: MIT License
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Internet
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Requires-Python: >=3.8.0
Description-Content-Type: text/markdown
License-File: LICENSE

# 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**

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

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

## Examples

### Synchronous

```py
>>> 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

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


