Intercept.py
Python library for intercept, a game by bubmet
Styled after discord.py, this library aims to give users a customizable experience with the game.
Examples
Chat logger:
from intercept import Client, DataFormat, ChatEvent
client = Client(username, password, handle_data=DataFormat.CLEAN)
@client.event
async def event_chat(event: ChatEvent):
print(event.msg)
client.run()
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
use_asyncio_event_loop()
client = Client(username, password, handle_data=DataFormat.ANSI)
@client.event
async def on_event(event):
if isinstance(event, MessageEvent):
print(event.msg)
@client.event
async def event_ready():
while client.handler._do_loop: # pylint: disable=protected-access
with patch_stdout():
text = await prompt(" >> ", async_=True)
if text == "quit":
client.stop()
else:
await client.command(text)
print("Done running")
client.run(backend='asyncio')
More examples can be found here
Release files for intercept.py 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| intercept.py-0.2.0.tar.gz | 5.3 kB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| intercept.py-0.2.0-py3.7.egg | Legacy Egg format | - | - | Details |
| intercept.py-0.2.0-py3.6.egg | Legacy Egg format | - | - | Details |
| intercept.py-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 42.4 kB
Release files / intercept.py-0.2.0.tar.gz
| Download URL | intercept.py-0.2.0.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3a943d7f980aea14ec40100707bfadcad174a90d8b676f216a7efede42798dab
|
|
BLAKE2b-256 checksum How to use checksums |
7407263199dab19e7a3d44a1bbfce90d14956cc0ef67ea539a4bf1e60e74da7b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
|
Release files / intercept.py-0.2.0-py3.7.egg
| Download URL | intercept.py-0.2.0-py3.7.egg |
|---|---|
| Size | 14.8 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
c9694989bfe40935e1addcaf85f5bcc5fdd2fe8ad0a6909e040e1d5315735355
|
|
BLAKE2b-256 checksum How to use checksums |
ea0aa2a9bc3e64b1489a15150403ab7eebc10a234de8594554e1981c709360f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
|
Release files / intercept.py-0.2.0-py3.6.egg
| Download URL | intercept.py-0.2.0-py3.6.egg |
|---|---|
| Size | 14.7 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
7c8d7cf2c0dc1b2471952fb4cf4d0991fffe6b83b4eae6dcd5291db4e2368812
|
|
BLAKE2b-256 checksum How to use checksums |
68c4bb908d39102306ee592eb7d5bbd1abc677a1901403b275e8a2787c62e070
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7
|
Release files / intercept.py-0.2.0-py3-none-any.whl
| Download URL | intercept.py-0.2.0-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
870379e9bb0f0ea635b4243e0d2f0401da6ef7e823c5c7b23232ea35c16eaa38
|
|
BLAKE2b-256 checksum How to use checksums |
e91bb5fc1455d1b7fc8d9216ffb5717b025c0e016b43da8140aafcb577e9b50c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
|