A Flask 3 API starter in Python 3.12 for developers who want a clean JSON API skeleton with no database. It uses an application factory and a blueprint, serves through Waitress locally and Gunicorn on Light Cloud, and comes with pytest tests and ruff linting.
by Light CloudREST APIs
main.py builds the app once with create_app() and exposes it as main:app, which is the object both Waitress and Gunicorn serve; the tests call the factory themselves so each one starts clean. Choosing Waitress for python main.py means local runs use the same kind of multi-threaded server as the deployed app. Unknown paths still get Flask's HTML 404 page, so a JSON error handler in create_app() is a sensible first change, followed by your own blueprints. On Light Cloud the deploy installs requirements.txt, adds Gunicorn at build time and runs gunicorn main:app on the platform's PORT, redeploying on every push to your copy.
Add a function to the blueprint in app/routes.py, or create a new blueprint module in app/ and register it in create_app() with app.register_blueprint(things_bp).
flask run starts Flask's development server, which is single-threaded and not meant for live traffic. This starter serves the same main:app object with Waitress locally and Gunicorn on Light Cloud.
Register an error handler in create_app(), for example app.register_error_handler(404, lambda e: ({"error": "Not found"}, 404)). Without it, Flask answers with its HTML error page.
This starter has no database. The flask-postgresql-crud-api template adds PostgreSQL and a full CRUD resource.
Yes. Any host with Python 3.12 runs it with python main.py and PORT set, or with any WSGI server pointed at main:app.
Start a Flask CRUD API on PostgreSQL with blueprints, Gunicorn and pytest set up

Start a Python REST API with FastAPI, live OpenAPI docs, pytest and ruff set up
Start a Python CRUD API on PostgreSQL with Django REST framework, migrations and tests