Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Task Management API (Flask & SQLAlchemy)

Python Version License: MIT

A RESTful API built with Flask, SQLAlchemy, and Marshmallow for managing projects and tasks. This project demonstrates CRUD operations, input validation, database interactions, and organized code structure using Flask Blueprints.

Features

  • Project Management: Create, Read, Update, Delete (CRUD) operations for Projects.
  • Task Management: CRUD operations for Tasks, logically associated with Projects.
  • Data Validation & Serialization: Uses Marshmallow schemas to validate incoming request data and serialize outgoing responses.
  • Organized Routes: Employs Flask Blueprints to structure API routes logically (e.g., projects, tasks).
  • Database Backend: Uses SQLAlchemy ORM with a SQLite database for persistence.
  • Clear API Documentation: Detailed endpoint descriptions with request/response examples.

Technologies Used

  • Framework: Flask
  • Database ORM: Flask-SQLAlchemy
  • Validation/Serialization: Flask-Marshmallow / Marshmallow / marshmallow-sqlalchemy
  • Database: SQLite (default)

Prerequisites

  • Python 3.7+
  • pip (Python package installer)
  • Git (for cloning)

Setup and Running

  1. Clone the repository:

    git clone <https://github.com/stex4cs/Task_Menagment_API.git>
    cd Task_Menagment_API 
  2. Create and activate a virtual environment (Recommended):

    python -m venv venv
    # On Windows (Git Bash or WSL)
    # source venv/Scripts/activate
    # On Windows (Command Prompt/PowerShell)
    # .\venv\Scripts\activate
    # On macOS/Linux
    source venv/bin/activate

    (You should see (venv) at the beginning of your terminal prompt).

  3. Install dependencies:

    pip install -r requirements.txt
  4. Run the application:

    python app.py

    The API will start, typically running at http://127.0.0.1:5000. Note: The SQLite database file (tasks.db) will be automatically created inside an instance folder within your project directory the first time the application runs or needs the database.

Project Structure (Illustrative)

Task_Menagment_API/
├── instance/
│   └── tasks.db      # SQLite database file (created automatically)
├── project/
│   ├── __init__.py   # Application factory, initializes extensions
│   ├── models.py     # SQLAlchemy database models (Project, Task)
│   ├── schemas.py    # Marshmallow schemas for validation/serialization
│   ├── routes/
│   │   ├── __init__.py
│   │   ├── projects.py # Blueprint for project routes
│   │   └── tasks.py    # Blueprint for task routes
│   └── config.py     # Configuration settings (optional)
├── tests/            # Unit/Integration tests (Optional)
│   └── ...
├── venv/             # Virtual environment directory (Ignored by Git)
├── .gitignore        # Specifies intentionally untracked files by Git
├── app.py            # Main entry point to run the Flask application
├── requirements.txt  # Project dependencies
├── LICENSE           # Project license information
└── README.md         # This file

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages