semvec/pypi-packages huggingface dataset:
keyforge 0.1.0
Test API keys for multiple LLM providers
Requires Python: >=3.8

# 🔥 Keyforge

Test API keys for multiple LLM providers with confidence.

## Features

- **Config-driven**: Provider URLs and settings in JSON
- **CLI arguments**: Test specific models or providers
- **Multi-provider**: Supports 6+ LLM providers out of the box
- **UV optimized**: Fast dependency management

## Installation

```bash
git clone <repository-url>
cd keyforge

# Install dependencies
uv sync
# or: pip install -r requirements.txt

# Setup environment
cp .env.sample .env
# Edit .env with your actual API keys
```

## Usage

### Development (Local)
```bash
# Test all models
uv run keyforge.py

# Test specific model
uv run keyforge.py model1

# Test multiple models  
uv run keyforge.py model1 model3

# Test by provider
uv run keyforge.py --provider anthropic

# List available models
uv run keyforge.py --list

# Show help
uv run keyforge.py --help
```

### Installed Package
```bash
# Install globally
pip install keyforge

# Use the CLI command
keyforge model1
keyforge --provider anthropic
keyforge --list
```

## Configuration

### API Keys (`.env`)
```env
ANTHROPIC_API_KEY=your_key_here
OPENAI_API_KEY=your_key_here
GOOGLE_API_KEY=your_key_here
PERPLEXITY_API_KEY=your_key_here
OPENROUTER_API_KEY=your_key_here
XAI_API_KEY=your_key_here
```

### Models (`config.json`)
```json
{
  "providers": {
    "anthropic": {
      "url": "https://api.anthropic.com/v1/messages",
      "apiKeyEnv": "ANTHROPIC_API_KEY",
      "authHeader": "x-api-key"
    }
  },
  "models": {
    "model1": {
      "provider": "anthropic",
      "modelId": "claude-sonnet-4-20250514",
      "maxTokens": 1000,
      "temperature": 0.2
    }
  }
}
```

## Supported Providers

- **Anthropic** - Claude models
- **OpenAI** - GPT and O-series models  
- **Google** - Gemini models
- **Perplexity** - Search-enhanced AI
- **OpenRouter** - Multi-model aggregator
- **XAI** - Grok models

## Adding New Providers

Add to the `providers` section in `config.json`:

```json
"newprovider": {
  "url": "https://api.example.com/v1/chat",
  "apiKeyEnv": "NEW_PROVIDER_API_KEY",
  "headers": {"Content-Type": "application/json"},
  "authHeader": "Authorization",
  "authPrefix": "Bearer ",
  "responseField": "choices[0].message.content"
}
```

## Security

⚠️ **Never commit `.env` files to version control**

- ✅ `.env.sample` - Safe template with placeholders
- ❌ `.env` - Contains actual API keys (git-ignored)

## Files

| File | Description | Safe to Share |
|------|-------------|---------------|
| `keyforge.py` | Main script | ✅ |
| `config.json` | Configuration | ✅ |
| `.env.sample` | Key template | ✅ |
| `.env` | **Actual keys** | ❌ |

## Dependencies

- `requests` - HTTP client
- `python-dotenv` - Environment variables
- Python 3.8+

## License

MIT
paymongo-service 0.1.0
A simple PayMongo API wrapper for Python.
Requires Python: >=3.6
Keywords: paymongo payments api wrapper

# PayMongo Service (Python)

A simple and lightweight Python wrapper for the [PayMongo API](https://developers.paymongo.com/) that allows developers to create payment intents, methods, and attach them using Python code.

## Features

- Create Payment Intents
- Create Payment Methods
- Attach a Payment Method to an Intent
- Supports both `card` and `gcash`
- Supports environment variable or direct secret key assignment

## Installation

Install via pip:

```bash
pip install paymongo-service
```

## Setup

You can either:

### 1. Use environment variables (recommended):

Create a `.env` file:

```env
PAYMONGO_SECRET_KEY=sk_test_your_secret_key
PAYMONGO_PUBLIC_KEY=pk_test_your_public_key
PAYMONGO_RETURN_URL=http://127.0.0.1:8000/
```

Then load them using `python-dotenv`:

```python
from dotenv import load_dotenv
load_dotenv()
```

### 2. Or directly modify the variables in `service.py`:

```python
PAYMONGO_SECRET_KEY = "sk_test_your_secret_key"
PAYMONGO_PUBLIC_KEY = "pk_test_your_public_key"
PAYMONGO_RETURN_URL = "http://127.0.0.1:8000/"
```

## Usage

```python
from paymongo_service.service import PayMongoService

paymongo = PayMongoService()

# Step 1: Create a Payment Intent
intent = paymongo.create_payment_intent(amount=100)  # PHP 100.00
payment_intent_id = intent['data']['id']

# Step 2: Create a Payment Method
method = paymongo.create_payment_method(
    method_type="gcash",
    details={"phone": "09171234567"}
)
payment_method_id = method['data']['id']

# Step 3: Attach the Payment Method to the Intent
result = paymongo.attach_payment_intent(payment_intent_id, payment_method_id)
print(result)
```

## Exception Handling

The library raises custom exceptions:

- `PaymentIntentError`
- `PaymentMethodError`
- `AttachIntentError`

Wrap your logic in try-except blocks if needed.

## Contributing

Contributions are welcome. Please open an issue or pull request.

## License

This project is licensed under the MIT License. See [LICENSE](LICENSE) for details.