awesome-python icon indicating copy to clipboard operation
awesome-python copied to clipboard

Add FastAPI example main.py witha simple GET endpoint

Open risha-bit opened this issue 2 months ago • 0 comments

Added main.py as a simple FastAPI example demonstrating a basic GET endpoint.

The application defines a single route ("/") that returns a JSON message: { "message": "Hello, FastAPI!" }

This serves as a quick-start example for beginners to understand how to:

  • Initialize a FastAPI app
  • Define a GET endpoint
  • Run it locally using Uvicorn

To run this example:

  1. Install dependencies: pip install fastapi uvicorn

  2. Run the app: uvicorn main:app --reload

  3. Open in your browser: http://127.0.0.1:8000/

risha-bit avatar Oct 17 '25 05:10 risha-bit