Skip to main content

Adapt SQLAlchemy ORM Support to web application, include Flask, Django, or any other web frameworks. A Fork GitRepo from: https://github.com/pallets/flask-sqlalchemy

Project description

Adapt to Support SQLAlchemy-ROM forweb application, include flask, django, or any other web frameworks.


It is based on Flask-SQLAlchemy==2.5.1. which is 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 pysql-orm

A Simple Example

from flask import Flask
from pysql_orm 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(name="Flask", email="example@example.com"))
db.session.commit()

users = User.query.all()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Pysql-ORM-2.5.8.tar.gz (37.8 kB view details)

Uploaded Source

File details

Details for the file Pysql-ORM-2.5.8.tar.gz.

File metadata

  • Download URL: Pysql-ORM-2.5.8.tar.gz
  • Upload date:
  • Size: 37.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.3

File hashes

Hashes for Pysql-ORM-2.5.8.tar.gz
Algorithm Hash digest
SHA256 bb20672054c48dc6f620790bd79baf4c5a851a2175a9bb41350565027c00b09e
MD5 65b24a0185f5e6b5c0a515b8cf03781d
BLAKE2b-256 91636b76d0103b9f385cb3b5666b37819def66be4eff345de7c8ace1b76d0d30

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page