Metadata-Version: 1.2
Name: intercept.py
Version: 0.2.0
Summary: Python library for intercept, a game by bubmet
Home-page: https://github.com/martmists/intercept.py
Author: martmists
Author-email: mail@martmists.com
Maintainer: martmists
Maintainer-email: mail@martmists.com
License: MIT
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>`__, this
        library aims to give users a customizable experience with the game.
        
        Examples
        ========
        
        Chat logger:
        
        .. code:: py
        
            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 <https://github.com/prompt-toolkit/python-prompt-toolkit>`__:
        
        .. code:: py
        
            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 <https://github.com/martmists/intercept.py/tree/master/examples>`__
        
Keywords: game,intercept,asyncio,trio,curio,anyio
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Framework :: AsyncIO
Classifier: Topic :: Games/Entertainment
Classifier: Topic :: Communications :: Chat
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.6
