Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hackersandslackers/flask-sqlalchemy-tutorial
:snake: :information_source: Create and manage data in your Flask app via a SQL database.
https://github.com/hackersandslackers/flask-sqlalchemy-tutorial
flask flask-application-factory flask-sqlalchemy orm-framework orms python sqlalchemy sqlalchemy-orm tutorial
Last synced: 7 days ago
JSON representation
:snake: :information_source: Create and manage data in your Flask app via a SQL database.
- Host: GitHub
- URL: https://github.com/hackersandslackers/flask-sqlalchemy-tutorial
- Owner: hackersandslackers
- License: mit
- Created: 2019-02-06T05:40:52.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-12-24T00:40:11.000Z (19 days ago)
- Last Synced: 2024-12-29T07:06:48.585Z (14 days ago)
- Topics: flask, flask-application-factory, flask-sqlalchemy, orm-framework, orms, python, sqlalchemy, sqlalchemy-orm, tutorial
- Language: Python
- Homepage: https://hackersandslackers.com/flask-sqlalchemy-database-models
- Size: 1.53 MB
- Stars: 393
- Watchers: 7
- Forks: 71
- Open Issues: 25
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
- jimsghstars - hackersandslackers/flask-sqlalchemy-tutorial - :snake: :information_source: Create and manage data in your Flask app via a SQL database. (Python)
README
# Flask-SQLAlchemy Tutorial
![Python](https://img.shields.io/badge/Python-v^3.10-blue.svg?logo=python&longCache=true&logoColor=white&colorB=5e81ac&style=flat-square&colorA=4c566a)
![Flask](https://img.shields.io/badge/Flask-v3.0.3-blue.svg?longCache=true&logo=flask&style=flat-square&logoColor=white&colorB=5e81ac&colorA=4c566a)
![Flask-SQLAlchemy](https://img.shields.io/badge/Flask--SQLAlchemy-3.1.1-red.svg?longCache=true&style=flat-square&logo=flask&logoColor=white&colorA=4c566a&colorB=5e81ac)
![GitHub Last Commit](https://img.shields.io/github/last-commit/google/skia.svg?style=flat-square&colorA=4c566a&colorB=a3be8c)
[![GitHub Issues](https://img.shields.io/github/issues/hackersandslackers/flask-sqlalchemy-tutorial.svg?style=flat-square&colorA=4c566a&colorB=ebcb8b&logo=Github)](https://github.com/hackersandslackers/flask-sqlalchemy-tutorial/issues)
[![GitHub Stars](https://img.shields.io/github/stars/hackersandslackers/flask-sqlalchemy-tutorial.svg?style=flat-square&colorB=ebcb8b&colorA=4c566a&logo=Github)](https://github.com/hackersandslackers/flask-sqlalchemy-tutorial/stargazers)
[![GitHub Forks](https://img.shields.io/github/forks/hackersandslackers/flask-sqlalchemy-tutorial.svg?style=flat-square&colorA=4c566a&colorB=ebcb8b&logo=Github)](https://github.com/hackersandslackers/flask-sqlalchemy-tutorial/network)![Flask-SQLAlchemy Tutorial](https://github.com/hackersandslackers/flask-sqlalchemy-tutorial/blob/master/.github/[email protected]?raw=true)
Connect your Flask app to a database using Flask-SQLAlchemy.
* **Tutorial**: [https://hackersandslackers.com/manage-database-models-with-flask-sqlalchemy/](https://hackersandslackers.com/manage-database-models-with-flask-sqlalchemy/)
* **Demo**: [https://flasksqlalchemy.hackersandslackers.com](https://flasksqlalchemy.hackersandslackers.com)## Getting Started
Get set up locally in two steps:
### Environment Variables
Replace the values in **.env.example** with your values and rename this file to **.env**:
* `ENVIRONMENT`: The environment in which to run your application (either `development` or `production`).
* `FLASK_DEBUG`: Whether to run Flask in "debug mode".
* `SECRET_KEY`: Randomly generated string of characters used to encrypt your app's data.
* `SQLALCHEMY_DATABASE_URI`: SQLAlchemy connection URI to a SQL database.*Remember never to commit secrets saved in .env files to Github.*
### Installation
Get up and running with `make deploy`:
```shell
git clone https://github.com/hackersandslackers/flask-sqlalchemy-tutorial.git
cd flask-sqlalchemy-tutorial
make deploy
```-----
**Hackers and Slackers** tutorials are free of charge. If you found this tutorial helpful, a [small donation](https://www.buymeacoffee.com/hackersslackers) would be greatly appreciated to keep us in business. All proceeds go towards coffee, and all coffee goes towards more content.