https://github.com/kavyaballa1020/flask-crud-app
This project demonstrates performing CRUD (Create, Read, Update, Delete) operations using Flask with various databases including SQLite, MySQL, MongoDB, and PostgreSQL. The application utilizes raw SQL queries for database interactions instead of SQLAlchemy.
https://github.com/kavyaballa1020/flask-crud-app
bootstrap5 css3 flask html5 jinja2 mongodb-atlas mysql-server portgresql sqlite3
Last synced: 4 months ago
JSON representation
This project demonstrates performing CRUD (Create, Read, Update, Delete) operations using Flask with various databases including SQLite, MySQL, MongoDB, and PostgreSQL. The application utilizes raw SQL queries for database interactions instead of SQLAlchemy.
- Host: GitHub
- URL: https://github.com/kavyaballa1020/flask-crud-app
- Owner: kavyaballa1020
- License: mit
- Created: 2024-05-17T15:59:53.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-24T16:20:04.000Z (almost 2 years ago)
- Last Synced: 2025-03-04T02:51:27.160Z (over 1 year ago)
- Topics: bootstrap5, css3, flask, html5, jinja2, mongodb-atlas, mysql-server, portgresql, sqlite3
- Language: Python
- Homepage:
- Size: 51.8 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Flask CRUD Operations with Multiple Databases
This project demonstrates performing CRUD (Create, Read, Update, Delete) operations using Flask with various databases including SQLite, MySQL, MongoDB, and PostgreSQL. The application utilizes raw SQL queries for database interactions instead of SQLAlchemy.
## Files Used
- `flask-sqlite.py`: Demonstrates CRUD operations with SQLite database.
- `flask-mysql.py`: Demonstrates CRUD operations with MySQL database.
- `flask-mongo.py`: Demonstrates CRUD operations with MongoDB.
- `flask-pgsql.py`: Demonstrates CRUD operations with PostgreSQL database.
- `.env`: Environment file for storing sensitive information (e.g., database credentials).
- `requirements.txt`: Contains the list of dependencies required for the project.
- `Procfile`: Specifies the commands that are executed by the app on startup.
## Setup and Installation
1. Clone the repository:
```bash
git clone https://github.com/kavyaballa1020/Flask-CRUD-App.git
```
2. Navigate to the project directory:
```bash
cd Flask-CRUD-App
```
3. Install dependencies:
```bash
pip install -r requirements.txt
```
4. Set up databases:
- For SQLite: No setup required.
- For MySQL: Create a MySQL database and configure the connection settings in `.env`.
- For MongoDB: Make sure MongoDB is running locally or configure the connection settings in `.env`.
- For PostgreSQL: Create a PostgreSQL database and configure the connection settings in `.env`.
## Usage
1. Run the Flask application:
```bash
python flask-sqlite.py
```
Replace `flask-sqlite.py` with the respective file name for other databases.
2. Access the application in your web browser at `http://localhost:5000`.
## Contributing
Contributions are welcome! Please feel free to open issues or submit pull requests.
## License
This project is licensed under the [MIT License](LICENSE).