characterai


Namecharacterai JSON
Version 1.0.1 PyPI version JSON
download
home_pagehttps://github.com/kramcat/characterai
SummaryAn unofficial API for Character AI for Python
upload_time2024-04-10 08:45:08
maintainerNone
docs_urlNone
authorkramcat
requires_pythonNone
licenseMIT
keywords ai wrapper api library
VCS
bugtrack_url
requirements pydantic websockets curl_cffi
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ######
AioCAI
######

|tag1| |tag2| |tag3| |tag4|

.. |tag1| image:: https://img.shields.io/pepy/dt/characterai?style=flat-square
    :target: https://pypi.org/project/characterai
    :alt: Total Downloads

.. |tag2| image:: https://img.shields.io/pypi/l/characterai?style=flat-square
    :target: https://opensource.org/licenses/MIT
    :alt: MIT License

.. |tag3| image:: https://img.shields.io/github/stars/kramcat/characterai?style=flat-square
    :target: https://github.com/kramcat/characterai
    :alt: Discord

.. |tag4| image:: https://img.shields.io/discord/1120066151515422772?style=flat-square
    :target: https://discord.com/invite/ZHJe3tXQkf
    :alt: Stars


Welcome to the documentation for a synchronous/asynchronous unofficial library for CharacterAI using `curl_cffi <https://github.com/yifeikong/curl_cffi>`_

⚠️ Warning
==========

This version of the library is in alpha version, there may be bugs and errors. The library was developed without the participation of Character AI developers or their knowledge. To work with the library you need to know how to work with `asyncio <https://docs.python.org/3/library/asyncio.html>`_


🔥 Features
===========

- Supports logging in via email or as a guest
- Does not use web browsers like: Pypeeter, Playwright, etc.
- Supports uploading/downloading pictures
- Has detailed documentation
- Uses Pydantic
- Asynchronous


📙 Simple Example
-----------------
.. code-block:: python3

    from characterai import aiocai
    import asyncio

    async def main():
        char = input('CHAR ID: ')

        client = aiocai.Client('TOKEN')

        me = await client.get_me()

        async with await client.connect() as chat:
            new, answer = await chat.new_chat(
                char, me.id
            )

            print(f'{answer.name}: {answer.text}')
        
            while True:
                text = input('YOU: ')

                message = await chat.send_message(
                    char, new.chat_id, text
                )

                print(f'{message.name}: {message.text}')

    asyncio.run(main())


👥 Community
--------------
If you have any questions about our library or would like to discuss CharacterAI, LLM, or Neural Networks topics, please visit our Discord channel

`discord.gg/ZHJe3tXQkf <https://discord.com/invite/ZHJe3tXQkf>`_


📝 TODO List
------------

- Character voice work
- Community tab support
- Add logging
- Group chat support
- Improved work with uploading pictures


💵 Support
----------
| TON - ``UQBlGz8aw5tWaocR8gPppQe6SgTx-kkh5keInKtEzVOqPhdY``
| BTC - ``bc1qghtyl43jd6xr66wwtrxkpe04sglqlwgcp04yl9``
| ETH - ``0x1489B0DDCE07C029040331e4c66F5aA94D7B4d4e``
| USDT (TRC20) - ``TJpvALv9YiL2khFBb7xfWrUDpvL5nYFs8u``
|
| You can contact me via `Telegram <https://t.me/kramcat>`_ or `Discord <https://discordapp.com/users/480976972277874690>`_ if you need help with parsing services or want to write a library. I can also create bots and userbots for Telegram

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/kramcat/characterai",
    "name": "characterai",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "ai wrapper api library",
    "author": "kramcat",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/17/29/9730a6e43ca76342b95a25d6b656be7b2a862e0f413390e4f1c2636a711b/characterai-1.0.1.tar.gz",
    "platform": null,
    "description": "######\nAioCAI\n######\n\n|tag1| |tag2| |tag3| |tag4|\n\n.. |tag1| image:: https://img.shields.io/pepy/dt/characterai?style=flat-square\n    :target: https://pypi.org/project/characterai\n    :alt: Total Downloads\n\n.. |tag2| image:: https://img.shields.io/pypi/l/characterai?style=flat-square\n    :target: https://opensource.org/licenses/MIT\n    :alt: MIT License\n\n.. |tag3| image:: https://img.shields.io/github/stars/kramcat/characterai?style=flat-square\n    :target: https://github.com/kramcat/characterai\n    :alt: Discord\n\n.. |tag4| image:: https://img.shields.io/discord/1120066151515422772?style=flat-square\n    :target: https://discord.com/invite/ZHJe3tXQkf\n    :alt: Stars\n\n\nWelcome to the documentation for a synchronous/asynchronous unofficial library for CharacterAI using `curl_cffi <https://github.com/yifeikong/curl_cffi>`_\n\n\u26a0\ufe0f Warning\n==========\n\nThis version of the library is in alpha version, there may be bugs and errors. The library was developed without the participation of Character AI developers or their knowledge. To work with the library you need to know how to work with `asyncio <https://docs.python.org/3/library/asyncio.html>`_\n\n\n\ud83d\udd25 Features\n===========\n\n- Supports logging in via email or as a guest\n- Does not use web browsers like: Pypeeter, Playwright, etc.\n- Supports uploading/downloading pictures\n- Has detailed documentation\n- Uses Pydantic\n- Asynchronous\n\n\n\ud83d\udcd9 Simple Example\n-----------------\n.. code-block:: python3\n\n    from characterai import aiocai\n    import asyncio\n\n    async def main():\n        char = input('CHAR ID: ')\n\n        client = aiocai.Client('TOKEN')\n\n        me = await client.get_me()\n\n        async with await client.connect() as chat:\n            new, answer = await chat.new_chat(\n                char, me.id\n            )\n\n            print(f'{answer.name}: {answer.text}')\n        \n            while True:\n                text = input('YOU: ')\n\n                message = await chat.send_message(\n                    char, new.chat_id, text\n                )\n\n                print(f'{message.name}: {message.text}')\n\n    asyncio.run(main())\n\n\n\ud83d\udc65 Community\n--------------\nIf you have any questions about our library or would like to discuss CharacterAI, LLM, or Neural Networks topics, please visit our Discord channel\n\n`discord.gg/ZHJe3tXQkf <https://discord.com/invite/ZHJe3tXQkf>`_\n\n\n\ud83d\udcdd TODO List\n------------\n\n- Character voice work\n- Community tab support\n- Add logging\n- Group chat support\n- Improved work with uploading pictures\n\n\n\ud83d\udcb5 Support\n----------\n| TON - ``UQBlGz8aw5tWaocR8gPppQe6SgTx-kkh5keInKtEzVOqPhdY``\n| BTC - ``bc1qghtyl43jd6xr66wwtrxkpe04sglqlwgcp04yl9``\n| ETH - ``0x1489B0DDCE07C029040331e4c66F5aA94D7B4d4e``\n| USDT (TRC20) - ``TJpvALv9YiL2khFBb7xfWrUDpvL5nYFs8u``\n|\n| You can contact me via `Telegram <https://t.me/kramcat>`_ or `Discord <https://discordapp.com/users/480976972277874690>`_ if you need help with parsing services or want to write a library. I can also create bots and userbots for Telegram\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "An unofficial API for Character AI for Python",
    "version": "1.0.1",
    "project_urls": {
        "Community": "https://discord.gg/ZHJe3tXQkf",
        "Documentation": "https://docs.kram.cat",
        "Homepage": "https://github.com/kramcat/characterai",
        "Source": "https://github.com/kramcat/characterai"
    },
    "split_keywords": [
        "ai",
        "wrapper",
        "api",
        "library"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "17299730a6e43ca76342b95a25d6b656be7b2a862e0f413390e4f1c2636a711b",
                "md5": "28e3172ba46d0d0720e6642b93be9381",
                "sha256": "3e404fc4ec6281f8e67aad97cb6cacc1a4c2908d85ab30b28eea0f40d78b7b16"
            },
            "downloads": -1,
            "filename": "characterai-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "28e3172ba46d0d0720e6642b93be9381",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 30485,
            "upload_time": "2024-04-10T08:45:08",
            "upload_time_iso_8601": "2024-04-10T08:45:08.119045Z",
            "url": "https://files.pythonhosted.org/packages/17/29/9730a6e43ca76342b95a25d6b656be7b2a862e0f413390e4f1c2636a711b/characterai-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-10 08:45:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "kramcat",
    "github_project": "characterai",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "pydantic",
            "specs": []
        },
        {
            "name": "websockets",
            "specs": []
        },
        {
            "name": "curl_cffi",
            "specs": []
        }
    ],
    "lcname": "characterai"
}
        
Elapsed time: 0.22764s