Metadata-Version: 2.1
Name: tradevps
Version: 0.1.0
Summary: Official Python client for TradeVPS APIs
Author-Email: TradeVPS <dev@tradevps.net>, moezehdev <hi@moezeh.dev>
License: MIT
Requires-Python: >=3.8
Requires-Dist: requests<3.0.0,>=2.31.0
Requires-Dist: pydantic<3.0.0,>=2.5.0
Requires-Dist: python-dotenv<2.0.0,>=1.0.0
Requires-Dist: urllib3<2.3.0,>=2.0.0
Requires-Dist: email-validator<3.0.0,>=2.1.0
Description-Content-Type: text/markdown

# TradeVPS Python Client

The official Python client for TradeVPS APIs.

## Installation

```bash
pip install tradevps
```

## Quick Start

```python
from tradevps import Client
from tradevps.exceptions import AuthenticationError, APIError

# Initialize client
client = Client()

# Method 1: Login with email/password
try:
    auth = client.login("your-email@example.com", "your-password")
    print(f"Logged in as: {auth.user.name}")
    
    # Token is automatically set after login
    # You can also set it manually:
    client.set_api_key(auth.token)
except AuthenticationError as e:
    print(f"Authentication failed: {e}")

# Method 2: Initialize with API key directly
client = Client(api_key="your-api-key")

# Handle API errors
try:
    # Your API calls here
    pass
except APIError as e:
    print(f"API error: {e.message} (Status: {e.status_code})")
```

## Development

1. Clone the repository
2. Install dependencies: `pdm install`
3. Run tests: `pdm run pytest`

## License

MIT License
