Python library for intercept, a game by bubmet
Project description
Intercept.py
Python library for intercept, a game by bubmet
Styled after discord.py (async), 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, fmt=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 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.2.tar.gz
(5.0 kB
view details)
Built Distributions
intercept.py-0.0.2-py3.7.egg
(13.9 kB
view details)
File details
Details for the file intercept.py-0.0.2.tar.gz
.
File metadata
- Download URL: intercept.py-0.0.2.tar.gz
- Upload date:
- Size: 5.0 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c7dc611cdf9a5e2e035a72dc48b88b0a9655ab4b3519eda67901a822cff854e |
|
MD5 | a585466e0c8d53f3093ab005c28436fb |
|
BLAKE2b-256 | 7d44243e2c0898c6b9d375b9800f4d4f56f1dc9e9c2416bf3be88e3f15371e82 |
File details
Details for the file intercept.py-0.0.2-py3.7.egg
.
File metadata
- Download URL: intercept.py-0.0.2-py3.7.egg
- Upload date:
- Size: 13.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 655f79d5e9117d444a003cffbe5d234160adfa2c986e28efa38b7a527d7ebb71 |
|
MD5 | 33d4c49341e4fec58ad78a08e950233e |
|
BLAKE2b-256 | 24a1acf0294c06f71eab92c1e5fb47b6b7aa7c469058f9d149bbbd6e2cddae83 |
File details
Details for the file intercept.py-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: intercept.py-0.0.2-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae891c831c4458b36fed8eac3f5ea25ac9dbdc430a997535a8ef2668783a6abc |
|
MD5 | 3fa357fb5133a3de3382ff7dc9876826 |
|
BLAKE2b-256 | a561de71aa7093a842caacc46436ec7ef3fa0ac295efc17de6d439f519b43619 |