Metadata-Version: 2.4
Name: charisma-sdk
Version: 0.2.0
Summary: SDK for Charisma.ai
Home-page: https://github.com/charisma-ai/charisma-sdk-python
Author: To Play For Ltd.
Author-email: hello@charisma.ai
License: MIT
Project-URL: Documentation, https://github.com/charisma-ai/charisma-sdk-python/blob/main/README.md
Platform: any
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
License-File: LICENSE.md
Requires-Dist: importlib-metadata; python_version < "3.8"
Requires-Dist: pyee
Requires-Dist: python-socketio[client]<5.0,>=4.0
Requires-Dist: requests
Provides-Extra: testing
Requires-Dist: setuptools; extra == "testing"
Requires-Dist: pytest; extra == "testing"
Requires-Dist: pytest-cov; extra == "testing"
Dynamic: license-file

# Charisma.ai SDK for Python

```bash
pip install charisma-sdk
```


## Usage

```python
from charisma_sdk.playthrough import Playthrough
from charisma_sdk.api import (
    create_playthrough_token,
    create_conversation,
    set_memory,
    set_mood,
)

story_id = 1

token = create_playthrough_token({"story_id": story_id})
conversation_id = create_conversation(token)

set_memory(token, "my_memory_recall", "the value to save!")
set_mood(token, "My Character Name", {"happiness": 15})

playthrough = Playthrough(token)
playthrough.on("message", lambda message: print("Received a message:", message))
playthrough.connect()

# Some time later...
playthrough.start({"conversationId": conversation_id})
# Some time later...
playthrough.reply({"conversationId": conversation_id, "text": "This is my message to send to Charisma."})
```

## Questions?

Get in touch with us at hello@charisma.ai and we'll be happy to help you out!
