Rez Proxy
A RESTful API proxy for Rez package manager, built with FastAPI.
Features
- 🚀 RESTful API: Complete REST interface for Rez operations
- 📦 Package Management: Search, query, and manage Rez packages
- 🔍 Environment Resolution: Resolve and create Rez environments
- 🌐 TypeScript Ready: Perfect for TypeScript/JavaScript integration
- ⚡ Fast: Built with FastAPI for high performance
- 🐍 Easy Deployment: Deploy with
uvx rez-proxy - 🔧 Configurable: Flexible configuration via environment variables
- 📚 Auto-Generated Docs: Interactive API documentation with Swagger UI
- 🔄 Versioned API: Support for API versioning with backward compatibility
Quick Start
Installation
# Install via pip
pip install rez-proxy
# Or install via uvx (recommended)
uvx install rez-proxy
Usage
# Start the server
uvx rez-proxy
# Or with custom configuration
uvx rez-proxy --host 0.0.0.0 --port 8080
# With custom API paths
REZ_PROXY_API_DOCS_URL=/documentation uvx rez-proxy
The API will be available at:
- API Base:
http://localhost:8000/api/v1 - Documentation:
http://localhost:8000/docs - ReDoc:
http://localhost:8000/redoc - API Info:
http://localhost:8000/api/info
API Endpoints
Package Operations
GET /api/v1/packages- List all packagesGET /api/v1/packages/{name}- Get package detailsGET /api/v1/packages/{name}/versions- Get package versionsPOST /api/v1/packages/search- Search packages
Environment Operations
POST /api/v1/environments/resolve- Resolve environmentGET /api/v1/environments/{id}- Get environment detailsPOST /api/v1/environments/{id}/execute- Execute command in environmentDELETE /api/v1/environments/{id}- Delete environment
Suite Management
POST /api/v1/suites- Create new suiteGET /api/v1/suites- List all suitesGET /api/v1/suites/{id}- Get suite detailsPOST /api/v1/suites/{id}/contexts- Add context to suitePOST /api/v1/suites/{id}/tools/alias- Alias tool in suitePOST /api/v1/suites/{id}/save- Save suite to diskGET /api/v1/suites/{id}/tools- Get suite toolsDELETE /api/v1/suites/{id}- Delete suite
System Operations
GET /api/v1/system/status- Get system statusGET /api/v1/system/config- Get Rez configuration
Configuration
The server can be configured via environment variables or command line arguments:
Server Configuration
# Basic server settings
export REZ_PROXY_API_HOST=0.0.0.0
export REZ_PROXY_API_PORT=8080
export REZ_PROXY_API_LOG_LEVEL=info
export REZ_PROXY_API_WORKERS=4
# API paths (customize documentation URLs)
export REZ_PROXY_API_API_PREFIX=/api/v1
export REZ_PROXY_API_DOCS_URL=/docs
export REZ_PROXY_API_REDOC_URL=/redoc
# Command line
uvx rez-proxy --host 0.0.0.0 --port 8080 --log-level debug
Rez Configuration
# Rez-specific settings
export REZ_PROXY_API_REZ_CONFIG_FILE=/path/to/rezconfig.py
export REZ_PROXY_API_REZ_PACKAGES_PATH=/path/to/packages
export REZ_PROXY_API_REZ_LOCAL_PACKAGES_PATH=/path/to/local/packages
export REZ_PROXY_API_REZ_RELEASE_PACKAGES_PATH=/path/to/release/packages
# Cache settings
export REZ_PROXY_API_ENABLE_CACHE=true
export REZ_PROXY_API_CACHE_TTL=300
Development
Prerequisites
- Python 3.10+
- Rez package manager
- uv (recommended) or pip
Setup
# Clone the repository
git clone https://github.com/loonghao/rez-proxy.git
cd rez-proxy
# Install dependencies
uvx nox -s dev
# Run tests
uvx nox -s pytest
# Start development server
uvx nox -s serve
Testing
# Run all tests
uvx nox -s pytest
# Run with coverage
uvx nox -s pytest -- --cov
# Run specific tests
uvx nox -s pytest -- tests/test_api.py
TypeScript Integration
import axios from 'axios';
const rezApi = axios.create({
baseURL: 'http://localhost:8000/api/v1'
});
// Search packages
const packages = await rezApi.post('/packages/search', {
query: 'python',
limit: 10
});
// Resolve environment
const environment = await rezApi.post('/environments/resolve', {
packages: ['python-3.9', 'requests']
});
Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
Metadata
Release files for rez-proxy 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rez_proxy-1.2.0.tar.gz | 72.5 kB | Without provenance | Details for rez_proxy-1.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rez_proxy-1.2.0-py3-none-any.whl | Python 3 | none | any | Details for rez_proxy-1.2.0-py3-none-any.whl |
Total release size: 122.2 kB
Release files / rez_proxy-1.2.0.tar.gz
| Download URL | rez_proxy-1.2.0.tar.gz |
|---|---|
| Size | 72.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0cfa6cad05a168037cf6318e859eb8497682b30a386c08d43023e426ef7e091f
|
|
BLAKE2b-256 checksum How to use checksums |
5fca7f005e3e2977aa18d2610d235b6402f9a56fa191747186b5fca636ffb0f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.7.11
|
Release files / rez_proxy-1.2.0-py3-none-any.whl
| Download URL | rez_proxy-1.2.0-py3-none-any.whl |
|---|---|
| Size | 49.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eba25e97fb54db406f2e574c17fb70e14c5dabf8cb1b4e593c78bac85c17086d
|
|
BLAKE2b-256 checksum How to use checksums |
2700c39215ffd124097e80f99526c97ae830befa2db32eb38ec6a41c247d6bed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.7.11
|
Security for rez-proxy 1.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.