Skip to content

Pal-Sandeep/Flask-ToDo-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flask CRUD App README

This README provides an overview of the Flask CRUD (Create, Read, Update, Delete) application. This application allows users to perform basic CRUD operations on a database using a Flask web server.

Installation

  1. Clone the Repository: Clone the repository to your local machine using the following command:

    git clone https://github.com/Pal-Sandeep/Flask-ToDo-App.git
  2. Navigate to the Project Directory: Change your current directory to the cloned project directory:

    cd Flask-ToDo-App
  3. Create a Virtual Environment: It's recommended to use a virtual environment to isolate project dependencies. You can create a virtual environment using virtualenv or venv:

    virtualenv venv

    or

    python3 -m venv venv
  4. Activate the Virtual Environment: Activate the virtual environment:

    On macOS/Linux:

    source venv/bin/activate

    On Windows:

    venv\Scripts\activate
  5. Install Dependencies: Install the project dependencies using pip:

    pip install -r requirements.txt
  6. Set Up the Database: Configure the database settings in config.py and run migrations to set up the database schema:

    flask db init
    flask db migrate -m "Initial migration"
    flask db upgrade
  7. Run the Application: Start the Flask development server:

    flask run

    The application will be accessible at http://localhost:5000 by default.

Usage

The Flask CRUD application provides the following functionality:

  • Create: Users can add new records to the database using a web form.
  • Read: Users can view existing records in the database.
  • Update: Users can edit and update existing records.
  • Delete: Users can delete records from the database.

Project Structure

The project structure is organized as follows:

  • app/
    • Contains the main application code.
    • templates/: HTML templates for rendering web pages.
    • static/: Static files such as CSS stylesheets, JavaScript files, and images.
    • models.py: Defines database models using SQLAlchemy.
    • routes.py: Defines application routes and request handling logic.
  • migrations/: Contains database migration scripts generated by Flask-Migrate.
  • config.py: Configuration settings for the Flask application.
  • requirements.txt: List of project dependencies.

Dependencies

The Flask CRUD application uses the following main dependencies:

  • Flask: Web framework for building web applications in Python.
  • SQLAlchemy: SQL toolkit and Object-Relational Mapping (ORM) library.
  • Flask-Migrate: Extension for handling database migrations with Flask.

Contributing

Contributions to the Flask CRUD application are welcome! If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for more information.

Author

[Sandeep Pal]


Feel free to customize this README file according to your project's specific requirements and features.