Skip to content

bunetic/starter-python-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Backend Starter

A simple Python Flask backend starter template with frontend demo showing health checks and ping-pong communication.

Screenshot

Screenshot 2025-09-30 at 11 42 26 PM

File Structure

This template contains the files needed to deploy a Python backend with frontend on Bunetic:

  • main.py - Flask HTTP server with health and ping endpoints
  • requirements.txt - Python dependencies (Flask and Gunicorn)
  • index.html - Frontend demo with health check and ping-pong buttons
  • Procfile - Tells Bunetic how to start the Python application (web: gunicorn main:app)

Features

  • Health Check Endpoint (/health) - Shows server status, uptime, and timestamp
  • Ping Endpoint (/ping) - Returns "pong" with server info and timestamp
  • Frontend Demo - Simple HTML interface to test both endpoints
  • Response Time Measurement - Shows exact milliseconds for each request
  • CORS Enabled - Ready for cross-origin requests
  • Production Ready - Uses Gunicorn WSGI server for deployment

API Endpoints

GET /health

Returns server health status:

{
  "status": "healthy",
  "timestamp": "2025-09-29T12:00:00Z",
  "uptime": "5h30m15s"
}

GET /ping

Returns pong response:

{
  "message": "pong",
  "timestamp": "2025-09-29T12:00:00Z",
  "server_id": "python-flask-v1"
}

Why These Files Are Needed

  • Python requires dependencies - requirements.txt defines Flask and Gunicorn for deployment
  • WSGI server needed - Gunicorn provides production-ready web server
  • Flask application - main.py creates endpoints and serves static files
  • Frontend included - index.html demonstrates the backend functionality
  • Procfile defines startup - Bunetic reads this to launch Gunicorn with Flask app

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published