Metadata-Version: 2.1
Name: achat
Version: 0.1.0
Summary: asynchronous wrapper over the chatsonic api for the python programming language
License: MIT
Author: saladware
Author-email: saladware46@gmail.com
Requires-Python: >=3.8,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: aiohttp (>=3.8.4,<4.0.0)
Description-Content-Type: text/markdown

# achat
achat is an asynchronous wrapper over the [chatsonic api](https://writesonic.com/chat) for the python programming language.

## Features
* asynchronous support
* message history support
* convenient customization of all query parameters

## Installation
To install the latest stable version, use 
```commandline
pip install achat
```

## Examples

### Using chat instance
```python
import asyncio

from achat import SonicChat


async def main():
    chat = SonicChat(token="your api token here")
    try:
        await chat.start()
        
        response = await chat.ask("Who is Elon Musk?")
        print(response.message)

        response = await chat.ask("When was he born?")
        print(response.message)
    finally:
        await chat.close()


asyncio.run(main())
```

### Using async context manager

```python
import asyncio

from achat import SonicChat


async def main():
    async with SonicChat(token="your api token here") as chat:
        response = await chat.ask("Who is Elon Musk?")
        print(response.message)

        response = await chat.ask("When was he born?")
        print(response.message)


asyncio.run(main())

```

## Documentation
Coming soon

## Dependencies
* [aiohttp](https://github.com/aio-libs/aiohttp)
