Metadata-Version: 2.4
Name: pythinker-core
Version: 1.1.0
Summary: Pythinker core LLM, message, provider, and tool abstractions.
Keywords: llm,ai,anthropic,openai,google-genai,mcp,agent
Author: Mohamed Elkholy
Author-email: Mohamed Elkholy <moelkholy1995@gmail.com>
License-Expression: Apache-2.0
License-File: LICENSE
License-File: NOTICE
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Dist: anthropic>=0.78.0
Requires-Dist: google-genai>=1.56.0
Requires-Dist: jsonschema>=4.26.0
Requires-Dist: loguru>=0.6.0,<0.7
Requires-Dist: openai>=2.14.0,<2.15.0
Requires-Dist: pydantic>=2.12.5
Requires-Dist: python-dotenv>=1.2.1
Requires-Dist: typing-extensions>=4.15.0
Requires-Dist: mcp>=1,<1.17
Requires-Dist: anthropic>=0.78.0 ; extra == 'contrib'
Requires-Dist: google-genai>=1.55.0 ; extra == 'contrib'
Requires-Python: >=3.12
Project-URL: Changelog, https://github.com/mohamed-elkholy95/Pythinker-Code/blob/main/packages/pythinker-core/CHANGELOG.md
Project-URL: Homepage, https://github.com/mohamed-elkholy95/Pythinker-Code
Project-URL: Issues, https://github.com/mohamed-elkholy95/Pythinker-Code/issues
Project-URL: Repository, https://github.com/mohamed-elkholy95/Pythinker-Code
Provides-Extra: contrib
Description-Content-Type: text/markdown

# Pythinker Core

Pythinker Core provides the low-level LLM, message, streaming, provider, and tool abstractions used by Pythinker CLI and Pythinker SDK.

## Installation

Pythinker Core requires Python 3.12 or higher. We recommend using uv as the package manager.

```bash
uv add pythinker-core
```

To enable provider integrations beyond the Pythinker API, install the optional extra:

```bash
uv add 'pythinker-core[contrib]'
```

## Example

```python
import asyncio

import pythinker_core
from pythinker_core.chat_provider.pythinker import Pythinker
from pythinker_core.message import Message


async def main() -> None:
    pythinker = Pythinker(
        base_url="https://api.pythinker-ai.ai/v1",
        api_key="your_pythinker_api_key_here",
        model="pythinker-ai",
    )

    result = await pythinker_core.generate(
        chat_provider=pythinker,
        system_prompt="You are a helpful assistant.",
        tools=[],
        history=[Message(role="user", content="Who are you?")],
    )
    print(result.message)


asyncio.run(main())
```
