Sign inSign up

yanixdo/flask_api_project

By yanixdo

•Updated almost 2 years ago

Simple Flask-based RESTful API with Docker support, featuring basic routes for testing and learning.

Image
API management
0

149

yanixdo/flask_api_project repository overview

⁠Flask_API_Project

Python Docker

ā šŸ“‹ Description

Flask_API_Project — This is a simple RESTful API server built using Flask, designed to demonstrate a basic setup for creating and running API services inside a Docker container. This project includes multiple routes for testing and learning API development.

ā šŸš€ Start of work

⁠1. Clone the repository
git clone https://github.com/YanaDevOps/Flask_API_Project.git
cd Flask_API_Project
⁠2. Build and run the container
docker build -t flask_api_project:1.0.0 .
docker run -d -p 8080:5000 --name flask_api_project flask_api_project:1.0.0
⁠3. Access the application

Open your browser and go to:

http://localhost:8080

ā šŸ“‚ Project structure

Flask_API_Project/
ā”œā”€ā”€ Dockerfile
ā”œā”€ā”€ app.py
ā”œā”€ā”€ requirements.txt
└── README.md
  • Dockerfile: Configuration file for creating a Docker image.
  • app.py: The main Flask application file with multiple routes.
  • requirements.txt: Dependencies required for the Flask application.
  • README.md: Project documentation.

⁠🌟 Functionality

  • /: Main route returning a welcome message.
  • /status: Returns server status in JSON format.
  • /data: Accepts POST requests and returns the received data.

ā šŸ’» Technology

  • Python 3.8
  • Flask 2.2.0
  • Docker

ā šŸ‘¤ Author

Name: Yana Lysenko

GitHub: YanaDevOps⁠

Tag summary

Content type

Image

Digest

sha256:e7daea92a…

Size

50 MB

Last updated

almost 2 years ago

docker pull yanixdo/flask_api_project