Metadata-Version: 2.4
Name: edgee
Version: 1.0.0
Summary: Lightweight Python SDK for Edgee AI Gateway
Project-URL: Homepage, https://github.com/edgee-cloud/python-sdk
Project-URL: Repository, https://github.com/edgee-cloud/python-sdk
Author-email: Edgee <support@edgee.cloud>
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: ai,anthropic,gateway,llm,openai
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Provides-Extra: dev
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: ruff>=0.8.0; extra == 'dev'
Description-Content-Type: text/markdown

# Edgee Python SDK

Lightweight, type-safe Python SDK for the [Edgee AI Gateway](https://www.edgee.cloud).

[![PyPI version](https://img.shields.io/pypi/v/edgee.svg)]( )
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)

## Installation

```bash
pip install edgee
```

## Quick Start

```python
from edgee import Edgee

edgee = Edgee("your-api-key")

# Send a simple request
response = edgee.send(
    model="gpt-4o",
    input="What is the capital of France?"
)

print(response.text)
# "The capital of France is Paris."
```

## Send Method

The `send()` method makes non-streaming chat completion requests:

```python
response = edgee.send(
    model="gpt-4o",
    input="Hello, world!"
)

# Access response
print(response.text)           # Text content
print(response.finish_reason)  # Finish reason
print(response.tool_calls)     # Tool calls (if any)
```

## Stream Method

The `stream()` method enables real-time streaming responses:

```python
for chunk in edgee.stream("gpt-4o", "Tell me a story"):
    if chunk.text:
        print(chunk.text, end="", flush=True)
    
    if chunk.finish_reason:
        print(f"\nFinished: {chunk.finish_reason}")
```

## Features

- ✅ **Type-safe** - Full type hints with dataclasses
- ✅ **OpenAI-compatible** - Works with any model supported by Edgee
- ✅ **Streaming** - Real-time response streaming with generators
- ✅ **Tool calling** - Full support for function calling
- ✅ **Flexible input** - Accept strings, dicts, or InputObject
- ✅ **Zero dependencies** - Uses only Python standard library

## Documentation

For complete documentation, examples, and API reference, visit:

**👉 [Official Python SDK Documentation](https://www.edgee.cloud/docs/sdk/python)**

The documentation includes:
- [Configuration guide](https://www.edgee.cloud/docs/sdk/python/configuration) - Multiple ways to configure the SDK
- [Send method](https://www.edgee.cloud/docs/sdk/python/send) - Complete guide to non-streaming requests
- [Stream method](https://www.edgee.cloud/docs/sdk/python/stream) - Streaming responses guide
- [Tools](https://www.edgee.cloud/docs/sdk/python/tools) - Function calling guide

## License

Licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for details.
