Metadata-Version: 2.4
Name: prompt-to-query
Version: 1.0.0
Summary: High-performance SDK to convert natural language prompts to MongoDB queries using AI (OpenAI GPT or Anthropic Claude)
Home-page: https://github.com/dimarborda/prompt-to-query
Author: Dimar Borda
Author-email: Dimar Borda <dimarborda@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/dimarborda/prompt-to-query
Project-URL: Documentation, https://github.com/dimarborda/prompt-to-query#readme
Project-URL: Repository, https://github.com/dimarborda/prompt-to-query
Project-URL: Bug Tracker, https://github.com/dimarborda/prompt-to-query/issues
Keywords: mongodb,query,natural-language,nlp,ai,llm,openai,gpt,gpt-4,anthropic,claude,database,text-to-query,prompt-engineering,sdk
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Database
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Dynamic: author
Dynamic: home-page
Dynamic: requires-python

# Prompt to Query - Python SDK

High-performance Python SDK to convert natural language prompts to MongoDB queries using AI (OpenAI GPT or Anthropic Claude).

## Installation

```bash
pip install prompt-to-query
```

## Quick Start

```python
from prompt_to_query import PromptToQuery

# Initialize the client
ptq = PromptToQuery(
    llm_provider="openai",
    api_key="your-api-key",
    db_schema_path="schema.json"
)

# Generate a MongoDB query from natural language
query = ptq.generate_query("Get all active users from last month")
print(query)
# Output: {'operation': 'find', 'collection': 'users', 'filter': {...}}
```

## Features

- 🚀 **High Performance**: Native Go library with Python bindings
- 🔄 **Cross-Platform**: Supports Linux (glibc/musl), macOS (Intel/ARM), and Windows
- 🎯 **Zero External Dependencies**: Uses only Python's standard library (ctypes)
- 🤖 **Multiple LLM Providers**: OpenAI (GPT-4) and Anthropic (Claude)
- 📊 **Flexible Schema**: JSON-based database schema definition

## Supported Platforms

The package includes pre-built native libraries for:

- **Linux**: x86_64 (glibc), x86_64 (musl/Alpine), ARM64 (glibc), ARM64 (musl/Alpine)
- **macOS**: x86_64 (Intel), ARM64 (Apple Silicon)
- **Windows**: x86_64

## Documentation

For complete documentation, examples, and API reference, visit:
https://github.com/dimarborda/prompt-to-query

## Development

### Building from Source

```bash
# Install dependencies
pip install -e .

# Build native libraries for current platform
python scripts/build-native.py

# Build for all platforms (requires Docker)
python scripts/build-native.py --all
```

### Running Tests

```bash
pytest tests/
```

## License

MIT License - see LICENSE file for details

## Links

- **GitHub**: https://github.com/dimarborda/prompt-to-query
- **PyPI**: https://pypi.org/project/prompt-to-query/
- **Issues**: https://github.com/dimarborda/prompt-to-query/issues
