Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/minnukota381/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/minnukota381/flask-crud-app
flask-application jinja2 mongodb mysql postgresql sqlite
Last synced: 12 days 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/minnukota381/flask-crud-app
- Owner: minnukota381
- License: mit
- Created: 2024-05-17T17:44:50.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-06-29T18:50:03.000Z (7 months ago)
- Last Synced: 2024-11-21T22:17:34.965Z (2 months ago)
- Topics: flask-application, jinja2, mongodb, mysql, postgresql, sqlite
- Language: Python
- Homepage:
- Size: 27.3 KB
- Stars: 8
- Watchers: 1
- Forks: 1
- 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/minnukota381/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).