Giter Site home page Giter Site logo

aminalaee / flask-sqlalchemy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pallets-eco/flask-sqlalchemy

0.0 2.0 0.0 960 KB

Adds SQLAlchemy support to Flask

Home Page: https://flask-sqlalchemy.palletsprojects.com

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%

flask-sqlalchemy's Introduction

Flask-SQLAlchemy

Flask-SQLAlchemy is an extension for Flask that adds support for SQLAlchemy to your application. It aims to simplify using SQLAlchemy with Flask by providing useful defaults and extra helpers that make it easier to accomplish common tasks.

Installing

Install and update using pip:

$ pip install -U Flask-SQLAlchemy

A Simple Example

from flask import Flask
from flask_sqlalchemy import SQLAlchemy

app = Flask(__name__)
app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///example.sqlite"
db = SQLAlchemy(app)


class User(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    username = db.Column(db.String, unique=True, nullable=False)
    email = db.Column(db.String, unique=True, nullable=False)


db.session.add(User(username="Flask", email="[email protected]"))
db.session.commit()

users = User.query.all()

Contributing

For guidance on setting up a development environment and how to make a contribution to Flask-SQLAlchemy, see the contributing guidelines.

Donate

The Pallets organization develops and supports Flask-SQLAlchemy and other popular packages. In order to grow the community of contributors and users, and allow the maintainers to devote more time to the projects, please donate today.

flask-sqlalchemy's People

Contributors

coburnjoe avatar dasich avatar davidism avatar dependabot-preview[bot] avatar dependabot[bot] avatar entequak avatar florentx avatar greyli avatar hugovk avatar immunda avatar jeff-99 avatar jparise avatar jqxl0205 avatar justanr avatar lbeaufort avatar martijnvermaat avatar mgax avatar minisotm avatar miracle2k avatar mitsuhiko avatar mvantellingen avatar plaes avatar pre-commit-ci[bot] avatar rsyring avatar s0undt3ch avatar simonsapin avatar svenstaro avatar thiefmaster avatar thrawny avatar trollefson avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.