Skip to main content

Python library for intercept, a game by bubmet

Project description

Python library for intercept, a game by bubmet

Styled after, this library aims to give users a customizable experience with the game.


Chat logger:

from intercept import Client, DataFormat, ChatEvent

client = Client(username, password, handle_data=DataFormat.CLEAN)

async def event_chat(event: ChatEvent):

Simple custom client using prompt-toolkit:

from prompt_toolkit import prompt
from prompt_toolkit.eventloop.defaults import use_asyncio_event_loop
from prompt_toolkit.patch_stdout import patch_stdout

from intercept import Client, DataFormat, MessageEvent


client = Client(username, password, handle_data=DataFormat.ANSI)

async def on_event(event):
    if isinstance(event, MessageEvent):

async def event_ready():
    while client.handler._do_loop:  # pylint: disable=protected-access
        with patch_stdout():
            text = await prompt(" >> ", async_=True)

        if text == "quit":
            await client.command(text)
    print("Done running")'asyncio')

More examples can be found here

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 (5.3 kB view hashes)

Uploaded source

Built Distributions (14.8 kB view hashes)

Uploaded 3 7 (14.7 kB view hashes)

Uploaded 3 6 (7.6 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page