Skip to content

LowellOsborne/PythonFastAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ‰ PythonFastAPI

Simple, efficient FastAPI app with SQLAlchemy and Docker support.


πŸš€ Features

  • ⚑ FastAPI: Modern, fast web framework for APIs
  • πŸ—„οΈ SQLAlchemy: ORM for database management
  • πŸƒ Uvicorn: ASGI server for fast performance
  • 🐳 Dockerized: Easy container deployment

πŸ›  Prerequisites

  • Python 3.11+
  • Docker (optional, for container use)
  • pip package manager

βš™οΈ How to Use Locally

1. Clone the repo

git clone https://github.com/yourusername/PythonFastAPI.git
cd PythonFastAPI
2. (Optional) Create and activate a virtual environment
bash
Copy
Edit
python -m venv venv

# On macOS/Linux
source venv/bin/activate

# On Windows
venv\Scripts\activate
3. Install dependencies
bash
Copy
Edit
pip install -r requirements.txt
4. Run the FastAPI app
bash
Copy
Edit
uvicorn main:app --reload
5. Access the API
Open your browser to:
πŸ‘‰ http://localhost:8000/docs β€” Interactive API docs

🐳 How to Use with Docker
1. Build the Docker image
bash
Copy
Edit
docker build -t python-fastapi-app .
2. Run the Docker container
bash
Copy
Edit
docker run -d -p 8000:8000 python-fastapi-app
3. Access the API inside Docker
Open your browser to:
πŸ‘‰ http://localhost:8000/docs β€” Interactive API docs

πŸ” Environment Variables
If you use a .env file for settings or secrets, make sure to:

Add .env file to your project root

Use python-dotenv or FastAPI’s recommended way to load environment variables

πŸ“„ License
Distributed under the MIT License. See the LICENSE file for details.

πŸ‘¨β€πŸ’» Author
Your Name
Email | GitHub

yaml
Copy
Edit

---

Would you like me to help you with environment variable management in the code, or add instructions on how to extend the API?



Ask ChatGPT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published