Metadata-Version: 2.4
Name: vexa-auth
Version: 1.0.1
Summary: Official Python SDK for VexaAuth - Modern Authentication & License Management
Author-email: VexaAuth Team <support@vexaauth.com>
License: MIT
Project-URL: Homepage, https://vexaauth.com
Project-URL: Documentation, https://docs.vexaauth.com
Project-URL: Repository, https://github.com/vexaauth/python-sdk
Project-URL: Bug Tracker, https://github.com/vexaauth/python-sdk/issues
Keywords: authentication,license,api,sdk,vexaauth
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
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: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Security
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.25.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: black>=22.0.0; extra == "dev"
Requires-Dist: mypy>=0.950; extra == "dev"
Requires-Dist: flake8>=4.0.0; extra == "dev"

# VexaAuth Python SDK

[![PyPI version](https://badge.fury.io/py/vexa-auth.svg)](https://badge.fury.io/py/vexa-auth)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Official Python SDK for VexaAuth - The modern, secure, and easy-to-use authentication & license management system.

## 🚀 Features

- **License Management**: Verify, activate, deactivate, and redeem licenses.
- **User Authentication**: Secure login, registration, and session management.
- **2FA Support**: Enable, verify, and manage Two-Factor Authentication.
- **User Variables**: Store and retrieve custom user data (cloud variables).
- **File Management**: Securely upload and download files with license restrictions.
- **Online Users**: Track and manage connected users in real-time.

## 📦 Installation

Install the package via pip:

```bash
pip install vexa-auth
```

## 🛠️ Quick Start

### Initialization

```python
from VexaAuth import VexaAuthClient

# Initialize with your API Key
client = VexaAuthClient(api_key="your_api_key_here")
```

### License Verification

```python
# Verify a license key
result = client.verify_license(
    license_key="XXXX-XXXX-XXXX-XXXX",
    hwid="user-hwid-123"  # Optional: Hardware ID for device locking
)

if result.get('valid'):
    print(f"License is valid! Type: {result['type']}")
else:
    print(f"Invalid license: {result.get('message')}")
```

### User Login

```python
try:
    user = client.login(
        username="user@example.com",
        password="secure_password",
        hwid="user-hwid-123"
    )
    print(f"Welcome back, {user['username']}!")
    print(f"Session Token: {user['token']}")
except Exception as e:
    print(f"Login failed: {e}")
```

### Cloud Variables

Store custom data for your users securely in the cloud.

```python
# Set a variable
client.set_user_variable("theme", "dark_mode")

# Get a variable
theme = client.get_user_variable("theme")
print(f"User theme: {theme['value']}")
```

### File Handling

Securely download files restricted to valid license holders.

```python
try:
    response = client.download_file(
        file_id="file_123",
        app_id="app_123",
        app_secret="secret_123",
        license_key="XXXX-XXXX-XXXX-XXXX"
    )
    
    with open("update.zip", "wb") as f:
        f.write(response.content)
    print("Download complete!")
except Exception as e:
    print(f"Download failed: {e}")
```

## 📚 Documentation

For full API documentation and advanced usage, please visit our [official documentation](https://docs.vexaauth.com).

## 🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## 📄 License

This project is licensed under the MIT License - see the LICENSE file for details.
