Skip to content

Strkli/appspacesfastapia9b0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple FastAPI "Hello, World" Application

This is a basic FastAPI application that responds with "Hello, World!" at the root URL.

Create a virtual environment (optional but recommended for Python projects):

Run python -m venv venv to create a virtual environment named venv.

Activate the virtual environment:

Windows: venv\Scripts\activate macOS/Linux: source venv/bin/activate

Requirements

To run this application, you need Python 3.7+ and FastAPI. You can install FastAPI with the following command:

pip install fastapi[all]

Running the Application

To run the application, you will need an ASGI server; uvicorn is recommended. Install it using:

pip install uvicorn

After installation, you can start the server with:

uvicorn main:app --reload

The --reload option makes the server restart after code changes, which is useful during development.

Accessing the Application

Once the server is running, visit http://127.0.0.1:8000/ in your web browser. You should see the message "Hello, World!" displayed in JSON format.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages