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/Corporate Clash API

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

About

All methods return a tuple-like wrapper class with all the response data wrapped in objects (except Login and Status objects)

e.g. This will print all the news article URLs for Rewritten and Corporate Clash

async def main():
    """Example main function"""
    session = aiohttp.ClientSession(raise_for_status=True)

    async with RewrittenAsyncToontownClient(session=session) as ttr_client, ClashAsyncToontownClient(session=session) as clash_client:
        news_list = await ttr_client.news(all=True)

        for news in news_list:
            print(news.article_url)

        news_list = await clash_client.news()

        for news in news_list:
            print(news.article_url)

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-2.0.1.tar.gz (13.9 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-2.0.1-py3-none-any.whl (37.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: toontown.py-2.0.1.tar.gz
  • Upload date:
  • Size: 13.9 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.2

File hashes

Hashes for toontown.py-2.0.1.tar.gz
Algorithm Hash digest
SHA256 2271ee937c36f0a11153428e37c6ea0316fabd71515e7fee75e230460359fd6d
MD5 3a3de4fb4238a6f87c73587258e1e734
BLAKE2b-256 19217ce29e103c92507021a68d4c62275bd79e7134bdc1cf67e30dbaae39da44

See more details on using hashes here.

File details

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

File metadata

  • Download URL: toontown.py-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 37.6 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.2

File hashes

Hashes for toontown.py-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fddc36bcdc5078428f44a884d2f9bcc0a1216876167d2ec5c85346275d84ce25
MD5 69cf98ffe321b2725363b55f879ef953
BLAKE2b-256 b2fa3323c4e973ef7d037ffe5dd21c9f9627f96e1e9daf7ccdfe9812777e766d

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