semvec/pypi-packages huggingface dataset:
ai-llm-router 0.1.0
Intelligent routing of LLM API calls across multiple providers with automatic fallbacks, cost optimization, and monitoring
License: MIT
Requires Python: >=3.8
Keywords: llm, ai, router, openai, anthropic, api, fallback, cost-optimization

# AI LLM Router

Intelligent routing of LLM API calls across multiple providers with automatic fallbacks, cost optimization, caching, health monitoring, and retry logic.

## Features

- **Multi-Provider Support**: OpenAI, Anthropic, and extensible for other providers
- **Intelligent Routing**: Priority-based, cost-optimized, and round-robin strategies
- **Automatic Fallbacks**: Seamless failover between providers
- **Cost Optimization**: Track and optimize API usage costs
- **Caching**: Redis-based response caching for improved performance
- **Health Monitoring**: Real-time provider health checks
- **Retry Logic**: Configurable retry mechanisms with exponential backoff
- **Async Support**: Full async/await support for high-performance applications
- **Streaming**: Support for streaming responses
- **CLI Interface**: Command-line tool for easy integration
- **Metrics**: Prometheus-compatible metrics collection

## Installation

```bash
pip install ai-llm-router
```

## Quick Start

```python
from llm_router import LLMRouter, RouterConfig
from llm_router.providers import OpenAIProvider, AnthropicProvider

# Configure providers
config = RouterConfig(
    providers=[
        OpenAIProvider(api_key="your-openai-key"),
        AnthropicProvider(api_key="your-anthropic-key")
    ],
    strategy="priority"
)

# Create router
router = LLMRouter(config)

# Make a request
response = await router.chat_completion(
    messages=[{"role": "user", "content": "Hello, world!"}],
    model="gpt-4"
)
```

## CLI Usage

After installation, you can use the CLI:

```bash
ai-llm-router chat --provider openai --model gpt-4 --message "Hello, world!"
```

## Documentation

For detailed documentation, examples, and API reference, visit our [GitHub repository](https://github.com/Sherin-SEF-AI/llm-router).

## Author

**Sherin Joseph** - [LinkedIn](https://www.linkedin.com/in/sherin-roy-deepmost/)

## License

MIT License - see [LICENSE](LICENSE) file for details.
pygops 0.2
Python wrapper for Go applications with PowerShell launcher
License: MIT
Requires Python: >=3.8

# pygops

Python wrapper for running Go applications via PowerShell.

```bash
pip install pygops
```

## Requirements

* Python 3.8 or higher
* PowerShell installed and accessible in PATH
* Go installed for running Go applications
* Dependencies (installed automatically):

  * `loguru`
  * `toomanyports`
  * `aiohttp` (for server health checks)

## Usage

### Launch a Go script manually

```python
from pygops import GoLauncher

launcher = GoLauncher(
    go_file="path/to/script.go",
    script_path=script_path,
    verbose=True,
    port=5000  # optional: will kill existing or choose random if omitted
)
launcher.thread.start()
```

### Run a Go server with health check

```python
import asyncio
from pygops import GoServer, get_go_launcher_script

script = get_go_launcher_script()
server = GoServer(
    go_file="path/to/main.go",
    script_path=script,
    port=4000,
    verbose=True
)

async def main():
    await server.start()
    running = await server.is_running()
    print(f"Server running: {running}")
    # ... later ...
    await server.stop()

asyncio.run(main())
```

### Execute Go script in its own thread

```python
from pygops import GoThread, get_go_launcher_script

thread = GoThread(
    go_file="path/to/task.go",
    script_path=get_go_launcher_script(),
    go_args=["--flag", "value"],
    verbose=True
)
thread.start()
# Do other work...
if thread.is_running():
    thread.terminate()
```

## License

Released under the MIT License. See [LICENSE](LICENSE) for details.