Overview
The Python service is ideal for developers who prefer managing Python environments directly, need custom dependency management, or want to integrate CyborgDB service into existing Python applications. It provides the same REST API functionality as the Docker version.1
Get an API Key
To use CyborgDB, you need an API key. You can get one from the CyborgDB Admin Dashboard.Make sure to keep your API key secure and do not share it publicly.
2
Check Prerequisites
Ensure you have the required Python version and environment tools:
- Python: 3.9, 3.10, 3.11, 3.12, or 3.13
- Package Manager: conda (recommended) or pip with virtual environment
While conda is mentioned in the build instructions, the wheel works with any Python environment manager including pip, pipenv, poetry, etc.
3
Choose Your Database Backend (Optional)
For quick evaluation and testing, you can skip database setup entirely - the service will automatically use a built-in standalone instance.For production deployments or if you have existing database infrastructure, CyborgDB service supports two external database backends:
- PostgreSQL: Compatible with your existing PostgreSQL infrastructure
- Managed services: AWS RDS, Azure Database for PostgreSQL, Google Cloud SQL, DigitalOcean Managed Databases
- Self-hosted PostgreSQL instances
- Redis: Compatible with your existing Redis infrastructure
- Managed services: AWS ElastiCache, Azure Cache for Redis, Google Cloud Memorystore, Redis Cloud
- Self-hosted Redis instances
4
Install CyborgDB Service
Install the CyborgDB service package using conda and pip:
5
Configure Environment Variables
Set the required environment variables for your deployment:For more information on environment variables, refer to this guide.
- Quick Start (Standalone)
- PostgreSQL Backend
- Redis Backend
6
Start the Service
Run the CyborgDB service using the installed command:The service will start and display startup information including:
- Database connection status
- Server URL (default:
http://localhost:8000) - Available API endpoints
For additional configuration options, run
cyborgdb-service --help to see all available command-line arguments and connection string examples.7
Verify Installation
Once the service is running, verify it’s working correctly:Health Check:API Documentation:
Navigate to http://localhost:8000/docs to explore the interactive API documentation.You should see a response indicating the service is healthy and ready to accept requests.
8
Advanced Configuration
For production deployments, consider these additional configurations:
- Environment Variables
- Production Deployment
- HTTPS Configuration
| Variable | Description | Required | Example |
|---|---|---|---|
CYBORGDB_API_KEY | Your CyborgDB API key | ✅ | cyborg_abc123... |
CYBORGDB_DB_TYPE | Database backend type | ⚠️ Optional (defaults to standalone) | postgres or redis |
CYBORGDB_CONNECTION_STRING | Database connection details | ⚠️ Optional (defaults to standalone) | See connection formats |
CYBORGDB_VERSION | Service version (optional) | ❌ | 0.11.1 |
PORT | Service port | ❌ | 8000 |
SSL_CERT_PATH | Path to SSL certificate file | ❌ | /etc/ssl/certs/server.crt |
SSL_KEY_PATH | Path to SSL private key file | ❌ | /etc/ssl/private/server.key |
If
CYBORGDB_DB_TYPE and CYBORGDB_CONNECTION_STRING are not set, the service uses a built-in standalone database for evaluation. For production, configure an external database. For more information, refer to this guide.9
Next Steps
Now that your CyborgDB service is running, you can interact with it using client SDKs:Install Client SDKs:
Comparison with Docker Service
Comparison with Docker Service
| Aspect | Python Service | Docker Service |
|---|---|---|
| Installation | pip install | docker run |
| Dependencies | Managed by pip/conda | Bundled in container |
| Resource Usage | Lower overhead | Higher overhead |
| Environment Isolation | Python virtualenv | Container isolation |
| Deployment Complexity | Simple Python deployment | Container orchestration |
| Configuration | Environment variables/files | Environment variables |
| Best For | Development, Python-heavy workflows | Production, cloud deployment |