Quickstart
Quick Start — Python
Publish a working Python application in under 2 minutes.
Note: This quickstart covers only projects with
GitHub Repositorysource.
Step 1 — Create your application
mkdir hello-zenifra-python
cd hello-zenifra-python
python -m venv .venv
source .venv/bin/activate
pip install fastapi uvicornCreate main.py:
from fastapi import FastAPI
app = FastAPI()
@app.get("/")
async def root():
return {"message": "Hello from Zenifra!", "runtime": "python"}
@app.get("/health")
async def health():
return {"status": "ok"}Create requirements.txt with the dependencies:
fastapi
uvicornImportant:
requirements.txtis required for Python projects on Zenifra.
Step 2 — Publish to GitHub
Create a repository on GitHub and push the code:
git init
git add .
git commit -m "Initial commit"
git branch -M main
git remote add origin https://github.com/your-username/hello-zenifra-python.git
git push -u origin mainStep 3 — Create the project on Zenifra
- In the console, choose
GitHub Repositoryas the project source. - Select the repository and the
mainbranch. - In the runtime field, select
Python. - In the Port field, enter
3000. - In
start, useuvicorn main:app --host 0.0.0.0 --port 3000. - If you want automatic updates on push, enable
auto-deployduring creation. - Click Create Project.
Your application will be available at *.clients.zenifra.com.
Step 4 — Validate the deployment
Open the public URL and test /health. If the application does not respond, review port, start command, and logs.
Publishing a Flask application
For Flask, the configuration is practically identical:
# app.py
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return {"message": "Hello from Zenifra with Flask!"}# requirements.txt
flask
gunicornNote about runtime
On Zenifra, the runtime is chosen during project creation. For more details about dependency installation, commands, and limitations, see the Runtimes page.