Metadata-Version: 2.4
Name: putergenai
Version: 2.0.1
Summary: An asynchronous Python client for the Puter API
Author-email: Nerve11 <putergenai@outlook.com>, BubblesTheDev <bubblesthedev@fnbubbles420.org>
License: MIT
Project-URL: Homepage, https://github.com/Nerve11/putergenai
Project-URL: Documentation, https://github.com/Nerve11/putergenai#readme
Project-URL: Repository, https://github.com/Nerve11/putergenai.git
Project-URL: Bug Tracker, https://github.com/Nerve11/putergenai/issues
Project-URL: Security Policy, https://github.com/Nerve11/putergenai/security/policy
Keywords: puter,ai,sdk,python,api,chat,gpt,claude,async,aiohttp
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Framework :: AsyncIO
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Internet
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: aiohttp>=3.11.0
Requires-Dist: aiofiles>=24.1.0
Requires-Dist: certifi>=2024.0.0
Requires-Dist: pillow>=11.0.0
Requires-Dist: customtkinter>=5.2.2
Requires-Dist: cryptography>=44.0.0
Requires-Dist: flask>=3.1.2
Requires-Dist: keyring>=25.5.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
Requires-Dist: pytest-cov>=4.1; extra == "dev"
Requires-Dist: black>=24.0; extra == "dev"
Requires-Dist: flake8>=7.0; extra == "dev"
Requires-Dist: mypy>=1.8; extra == "dev"
Dynamic: license-file

# PuterGenAI

[![PyPI version](https://badge.fury.io/py/putergenai.svg)](https://pypi.org/project/putergenai/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

An asynchronous Python client for the Puter.com API, enabling easy integration with AI chat models.

## Features

- Asynchronous API client for Puter.com
- Support for multiple AI models (GPT, Claude, etc.)
- Streaming and non-streaming responses
- Simple authentication via username/password
- Configurable options: temperature, model selection, etc.

## Installation

Install from PyPI:

```bash
pip install putergenai
```

Or install from source:

```bash
git clone https://github.com/Nerve11/putergenai.git
cd putergenai
pip install -e .
```

## Quick Start

```python
import asyncio
from putergenai import PuterClient

async def main():
    async with PuterClient() as client:
        await client.login('your_username', 'your_password')

        messages = [
            {'role': 'user', 'content': 'Hello!'}
        ]

        # Non-streaming response
        result = await client.ai_chat(messages=messages)
        print(result)

        # Streaming response
        async for content, model in await client.ai_chat(messages=messages, options={'stream': True}):
            print(content, end='')

asyncio.run(main())
```

## Detailed Example

See [examples/example.py](examples/example.py) for a complete interactive example with model selection, streaming options, and error handling.

## Configuration Options

When calling `ai_chat`, you can pass options:

- `model`: Specify the AI model (e.g., 'gpt-5', 'claude-4', etc.)
- `stream`: Enable/disable streaming (boolean)
- `temperature`: Adjust creativity/randomness (0.0-2.0)

## Requirements

- Python >= 3.11
- Dependencies: aiohttp, aiofiles, certifi, pillow, customtkinter, cryptography, flask, keyring

## Development

To set up for development:

```bash
pip install -e .[dev]
```

Run tests:

```bash
pytest
```

Lint code:

```bash
black src/
flake8 src/
```

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## Issues

Report bugs or request features at: https://github.com/Nerve11/putergenai/issues
