Skip to content

Add FastAPI example main.py witha simple GET endpoint - #2773

Closed
mimionly wants to merge 1 commit into
vinta:masterfrom
mimionly:my-first-contribution
Closed

mimionly wants to merge 1 commit into
vinta:masterfrom
mimionly:my-first-contribution

Conversation

@mimionly

Copy link
Copy Markdown

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/

@vinta

vinta commented Jan 8, 2026

Copy link
Copy Markdown
Owner

This PR does not add a project to the list. This repository is a curated list of Python libraries, not a place to contribute code. Please see CONTRIBUTING.md for submission guidelines.

@vinta vinta closed this Jan 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants