Skip to main content

Python library for intercept, a game by bubmet

Project description

# Intercept.py
Python library for [intercept](https://bubmet.itch.io/intercept), a game by [bubmet](https://github.com/bubmet)

Styled after [discord.py](https://github.com/Rapptz/discord.py) (async), this library aims to give users a customizable experience with the game.

# Examples

Chat logger:
```py
from intercept import Client, DataFormat, ChatEvent

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

@client.event
async def event_chat(event: ChatEvent):
print(event.msg)

client.run()
```

Simple custom client using [prompt-toolkit](https://github.com/prompt-toolkit/python-prompt-toolkit):
```py
from prompt_toolkit import prompt
from intercept import Client, DataFormat, MessageEvent

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

@client.event
async def on_event(event):
if isinstance(event, MessageEvent):
print(event.msg)

@client.event
async def event_ready():
while client._do_loop: # pylint: disable=protected-access
text = await prompt(" >> ", async_=True)
if text == "quit":
client.stop()
else:
await client.command(text)

client.run(backend='asyncio')
```


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

intercept.py-0.0.1.tar.gz (4.9 kB view details)

Uploaded Source

Built Distributions

intercept.py-0.0.1-py3.7.egg (13.8 kB view details)

Uploaded Source

intercept.py-0.0.1-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file intercept.py-0.0.1.tar.gz.

File metadata

  • Download URL: intercept.py-0.0.1.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for intercept.py-0.0.1.tar.gz
Algorithm Hash digest
SHA256 a8757420dddccacdc76f74a3740eef7fe6ac7bf7c097d472009f61099936de38
MD5 73e647e60f52bc68caf3814f789de631
BLAKE2b-256 23656e2c0836b1f0278514fc704839d38a2f256811bc66ddd95f9328dccceb13

See more details on using hashes here.

File details

Details for the file intercept.py-0.0.1-py3.7.egg.

File metadata

  • Download URL: intercept.py-0.0.1-py3.7.egg
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for intercept.py-0.0.1-py3.7.egg
Algorithm Hash digest
SHA256 e07cff918c60f39117d7558486be15d0ddde8c7897a5de1d1bc853005e93aeb1
MD5 cc5223f7ac3330dbc6e9df94de905752
BLAKE2b-256 90f3b92f681f1d7fc0dc611213afc56f9c5ac6c8dc457c7734801edfe104c6fb

See more details on using hashes here.

File details

Details for the file intercept.py-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: intercept.py-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for intercept.py-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c812b5481cfc0fd6bdedc32543a6a89635961704fea6259d1fe8d16f93a20eb0
MD5 a4dc6cafb0deb9135f740c9fbba80488
BLAKE2b-256 731a07ab440a9fd438d8b92c4a35be0aa5bf4bc4b2514c5a3eb4ca476cd832a7

See more details on using hashes here.

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