Metadata-Version: 2.1
Name: adapt.py
Version: 0.1.0a0
Summary: Official wrapper around Adapt's API for Python.
Home-page: https://github.com/AdaptChat/adapt.py
Author: jay3332
License: MIT
Project-URL: Issue tracker, https://github.com/AdaptChat/adapt.py/issues/new
Project-URL: Documentation, https://adaptpy.readthedocs.io/en/latest/
Project-URL: Discord server, https://discord.gg/5BUFNBPG
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Internet
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Classifier: Typing :: Typed
Requires-Python: >=3.8.0
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: aiohttp (>=3.8.0)
Provides-Extra: docs
Requires-Dist: sphinx (>=4.1.1) ; extra == 'docs'
Requires-Dist: furo ; extra == 'docs'
Provides-Extra: performance
Requires-Dist: aiohttp[speedups] ; extra == 'performance'
Requires-Dist: msgpack ; extra == 'performance'

# adapt.py
Official wrapper around Adapt's API for Python.

## Installation
```bash
pip install adapt.py
```

From GitHub:
```bash
pip install git+https://github.com/AdaptChat/adapt.py
```

## Usage
```python
import adapt

class Client(adapt.Client):
    """My example client"""

    @adapt.once  # This event will only be called once
    async def on_ready(self, ready: adapt.ReadyEvent) -> None:
        print(f"Logged in as {ready.user}!")

    async def on_message(self, message: adapt.Message) -> None:
        if message.content == "!ping":
            await message.channel.send("Pong!")

if __name__ == "__main__":
    client = Client()
    client.run("token")
```

## Using adapt.py with a custom Adapt instance
Adapt.py defaults to use the official Adapt instance at https://adapt.chat. If you want to use a custom instance,
pass an `AdaptServer` instance to the `server` kwarg when constructing the client.

`AdaptServer.local()` can be used as a shortcut to create a server instance for a local instance of Adapt:

```python
from adapt import AdaptServer, Client

client = Client(server=AdaptServer.local())  # Use a local instance of Adapt
...
```

Or, you can manually pass in URLs:
```python
from adapt import AdaptServer, Client

server = AdaptServer(
    api="https://my-adapt-instance.com/api",
    harmony="https://my-adapt-instance.com/harmony",
    convey="https://my-adapt-instance.com/convey",
)
client = Client(server=server)
...
```
