A 'Zen Mode' infrastructure engine for Python developers.
Project description
🧘 Xenfra: Infrastructure in Zen Mode
Xenfra is a modular infrastructure engine for Python developers that automates the deployment of applications to DigitalOcean. It is designed as a library first, with a beautiful and interactive CLI as the default frontend.
It handles the complexity of server provisioning, context-aware configuration, Dockerization, and automatic HTTPS, allowing you to focus on your code.
✨ Core Philosophy
- Engine as the Brain:
xenfra.engineis the core library. It owns the DigitalOcean API, the SSH "Auto-Heal" retry loops, and the Dockerizer services. It is stateful, robust, and can be imported into any Python project. - Clients as the Face: Frontends like the default CLI (
xenfra.cli) are thin, stateless clients responsible only for user interaction. - Zen Mode: If a server setup fails due to common issues like a locked package manager, the Engine automatically fixes it without exposing raw errors to the user.
🚀 Quickstart
Using the Xenfra CLI involves a simple workflow: Configure, Initialize, and then Deploy & Manage.
1. Configure
Xenfra needs your DigitalOcean API token to manage infrastructure on your behalf. Export it as an environment variable:
export DIGITAL_OCEAN_TOKEN="dop_v1_your_secret_token_here"
2. Initialize
Navigate to your project's root directory and run the init command. This command scans your project, asks a few questions, and creates a xenfra.yaml configuration file.
xenfra init
You should review the generated xenfra.yaml and commit it to your repository.
3. Deploy & Manage
Once your project is initialized, you can use the following commands to manage your application:
xenfra deploy: Deploys your application based on the settings inxenfra.yaml.xenfra list: Instantly lists all your deployed projects from a local cache.- Use
xenfra list --refreshto force a sync with your cloud provider.
- Use
xenfra logs: Streams real-time logs from a selected project.xenfra destroy: Decommissions and deletes a deployed project.
📦 Supported Frameworks & Features
- Smart Context Detection: Automatically detects your package manager (
uvorpip). - Automatic Dockerization: If a web framework is detected (
FastAPI,Flask), Xenfra will:- Generate a
Dockerfile,docker-compose.yml, andCaddyfile. - Deploy your application as a container.
- Configure Caddy as a reverse proxy with automatic HTTPS.
- Generate a
🤝 Contributing
Contributions are welcome! Please check our CONTRIBUTING.md for more details.
📄 Created by DevHusnainAi
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xenfra-0.1.8.tar.gz.
File metadata
- Download URL: xenfra-0.1.8.tar.gz
- Upload date:
- Size: 21.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f68d0a183048e729a5c3a67882f6b7c82eb0f9ccdf9026f834babd24d4b40f9
|
|
| MD5 |
43e9ce315772f5ddd3eaaaffa89a348b
|
|
| BLAKE2b-256 |
2b9bbf5ea3e2a40e81d9ee7c25f8c7d6f5a7ca8f9add5e03d64cbdefa9b93a8c
|
File details
Details for the file xenfra-0.1.8-py3-none-any.whl.
File metadata
- Download URL: xenfra-0.1.8-py3-none-any.whl
- Upload date:
- Size: 29.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d661ba9d1005c5a2d65148d736b3343998dc19e3744d87a984e339ac9491e1db
|
|
| MD5 |
3b646d1620bc5ebb530bd4d06159eb6b
|
|
| BLAKE2b-256 |
a9dd960ab95dab91efced04d3b5d2cd917bca134e9fb9f99a773e78f15942082
|