Quickstart

Quick Start — Python

Publish a working Python application in under 2 minutes.

Note: This quickstart covers only projects with GitHub Repository source.

Step 1 — Create your application

mkdir hello-zenifra-python
cd hello-zenifra-python
python -m venv .venv
source .venv/bin/activate
pip install fastapi uvicorn

Create 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
uvicorn

Important: requirements.txt is 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 main

Step 3 — Create the project on Zenifra

  1. In the console, choose GitHub Repository as the project source.
  2. Select the repository and the main branch.
  3. In the runtime field, select Python.
  4. In the Port field, enter 3000.
  5. In start, use uvicorn main:app --host 0.0.0.0 --port 3000.
  6. If you want automatic updates on push, enable auto-deploy during creation.
  7. 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
gunicorn

Note about runtime

On Zenifra, the runtime is chosen during project creation. For more details about dependency installation, commands, and limitations, see the Runtimes page.

Next steps