Skip to content

Sheersh123/FLASK-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FLASK-API

A modern, lightweight REST API built with Flask. This project demonstrates how to create scalable, maintainable APIs using Python and Flask, ideal for small to medium-sized applications, rapid prototyping, or as a starting point for more complex projects.


🚀 Features

  • Fast, modular RESTful API using Flask
  • Clear separation of concerns (routes, models, services, config)
  • Easy configuration and environment management
  • Simple testing & extension points
  • JSON input/output best practices
  • CORS support

🛠️ Installation

  1. Clone the repository

    git clone https://github.com/Sheersh123/FLASK-API.git
    cd FLASK-API
  2. (Recommended) Create a virtual environment:

    python3 -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install dependencies

    pip install -r requirements.txt

🚦 Usage

  1. Configure (optional):

    • Edit config.py or set environment variables as needed (see below).
  2. Start the API server:

    flask run  # or python app.py
  3. The API should now be running at: http://localhost:5000


🧩 Endpoints

A sample of likely endpoints (please edit these as per your actual implementation):

Method Endpoint Description
GET / Health check/homepage
GET /items List all items
POST /items Create new item
GET /items/{id} Retrieve an item
PUT /items/{id} Update an item
DELETE /items/{id} Delete an item

🧪 Testing

You can run tests using:

pytest

or:

python -m unittest discover

⚙️ Configuration

  • Set Flask configuration variables in config.py or use environment variables:
    • FLASK_ENV=development
    • SECRET_KEY=your-secret
    • Adjust other config as needed

🤝 Contributing

  1. Fork the repo
  2. Create your feature branch (git checkout -b my-feature)
  3. Commit your changes
  4. Push to the branch (git push origin my-feature)
  5. Create a pull request

❤️ License

MIT


📝 Credits

Created and maintained by Sheersh123.


📫 Contact

For questions, suggestions, or bug reports, please open an issue or reach out via GitHub.

About

This project demonstrates a simple microservice architecture using Docker Compose, Python Flask, and Nginx. The Flask backend provides JSON endpoints, while Nginx acts as a reverse proxy for API requests. It offers a clear example of containerized app orchestration for web APIs and microservice

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors