• Login
    • Report A Bug
    • System Information
    • System Tests
    • System Policies
    • Code Documentation
    • Occam Source Code
    • Web Client Source Code
    • About Occam
    • Acknowledgements
    • Guides / Documentation
    • Publications

translation missing: en.flash.saving
translation missing: en.flash.error
  • Bibliography Data
  • Metadata
python-library
    Flask-SQLAlchemy3.1.1@3.11
    Qmd1Jvs2FdAG3gf15ifyGUNHppz8j1hb1mGQBasRMZZMSD
    5dsd74REyhH3AFzN44LPDSxAtDidQN
      Qmd1Jvs2FdAG3gf15ifyGUNHppz8j1hb1mGQBasRMZZMSD
      5dsd74REyhH3AFzN44LPDSxAtDidQN

      • Details
      • Build
      • Files
      • History
        • Summary

          Add SQLAlchemy support to your Flask application.

          Source

          https://pypi.python.org/pypi/flask-sqlalchemy

          Environment

          linux

          Architecture

          x86-64

          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.

          .. _Flask: https://palletsprojects.com/p/flask/ .. _SQLAlchemy: https://www.sqlalchemy.org

          Installing

          Install and update using pip_:

          .. code-block:: text

          $ pip install -U Flask-SQLAlchemy

          .. _pip: https://pip.pypa.io/en/stable/getting-started/

          A Simple Example

          .. code-block:: python

          from flask import Flask
          from flask_sqlalchemy import SQLAlchemy
          from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column
          
          app = Flask(__name__)
          app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///example.sqlite"
          
          class Base(DeclarativeBase):
            pass
          
          db = SQLAlchemy(app, model_class=Base)
          
          class User(db.Model):
              id: Mapped[int] = mapped_column(db.Integer, primary_key=True)
              username: Mapped[str] = mapped_column(db.String, unique=True, nullable=False)
          
          with app.app_context():
              db.create_all()
          
              db.session.add(User(username="example"))
              db.session.commit()
          
              users = db.session.execute(db.select(User)).scalars()
          

          Contributing

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

          .. _contributing guidelines: https://github.com/pallets-eco/flask-sqlalchemy/blob/main/CONTRIBUTING.rst

          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_.

          .. _please donate today: https://palletsprojects.com/donate

          Links

          • Documentation: https://flask-sqlalchemy.palletsprojects.com/
          • Changes: https://flask-sqlalchemy.palletsprojects.com/changes/
          • PyPI Releases: https://pypi.org/project/Flask-SQLAlchemy/
          • Source Code: https://github.com/pallets-eco/flask-sqlalchemy/
          • Issue Tracker: https://github.com/pallets-eco/flask-sqlalchemy/issues/
          • Website: https://palletsprojects.com/
          • Twitter: https://twitter.com/PalletsTeam
          • Chat: https://discord.gg/pallets

          Versions

          • 3.1.1@3.11

          Related

          • maintainer

            PyPI Package Mirror

          DependenciesHelp

          This section shows a list of objects the current object is dependent upon in order to be used.

          For dependencies that are only relevant as part of the build or runtime of the object, it is best to describe those local to those sections.

          • language

            python

            3.11.x

          • python-library

            Flask

            >=2.2.5

          • python-library

            SQLAlchemy

            >=2.0.16

          BuildHelp

          This section tracks information useful to describing how to build this object.

          Dependencies

          • library

            png

            1.x

          • collection

            build

            1.0

          • application

            unzip

            6.x

          • data

            tzdata

            x

          • compiler

            g++

            >5

          • python-library

            wheel

            >=0

          • python-library

            pytoml

            >=0

          • python-library

            pip

            >=0

          Resources

          • flask_sqlalchemy-3.1.1-py3-none-any.whl

            application/zip

            Python Source for Flask-SQLAlchemy 3.1.1

            https://files.pythonhosted.org/packages/1d/6a/89963a5c6ecf166e8be29e0d1bf6806051ee8fe6c82e232842e3aeac9204/flask_sqlalchemy-3.1.1-py3-none-any.whl

            QmZw6GoyJ1MnAC7bHwXskfX9oK2H3fsgUPP8mZHFptXJBr

            QmTbqPjfS57jABoTn4A5gzjAkkZYpzyWGyQaXHdxLKZH2u

            QmTRvzDumqrRLTMVezuqjkh7YNvL7kmPcWY2kgJfMTWhZR

            download
          • argparse-1.4.0.tar.gz

            application/gzip

            Python Source for argparse 1.4.0

            https://files.pythonhosted.org/packages/18/dd/e617cfc3f6210ae183374cd9f6a26b20514bbb5a792af97949c5aacddf0f/argparse-1.4.0.tar.gz

            QmVMjtpCHUfoKdHkNdqDCry1Ck6P8Tk9bJaHmrH7a35oXr

            QmYhLtiLR6hamZiy5TL3vf5d6fA1z2eq4iGn4EmeJywkFs

            QmUyto3kPC3XY43kf9bh6VoSJnEVvUCX32XX5EPXZCFCNw

            download

          Command

          • /bin/bash
          • {{ paths.mount }}/build.sh
          • flask_sqlalchemy-3.1.1-py3-none-any.whl
          • 3
          • Flask-SQLAlchemy
          • argparse-1.4.0.tar.gz

          Build Environment

          • linux
          • x86-64

          InstallationHelp

          Objects have a set of files that comprise that object, as seen in the Files tab. When an object is built, they have a set of files that are the result of that build. In each case, these sets of files are the ones that are accessible within a virtual machine when running the object.

          This section describes how those files are accessible and visible to that machine. When a virtual machine is created, the data is always accessible read-only within a particular mounted directory. However, applications may expect to be located at particular directories. This section allows one to place files in different directories when the virtual machine is launched.

          There are two types of access. One is a link where the file is not copied from its original location. Instead, it creates what is called a symbolic link which is a "shortcut" that acts like a normal file but allows the actual data to be in a different directory. The other type is a traditional copy which copies the data explicitly to the provided destination. This takes more time, but the copy can be modified, unlike the read-only link type.

          ActionSourceDestinationSummary
          Linkusr/usr

          N/A

          No files will be installed.

          Share

          • URL

            Copy
          • Embed Link

            Copy
          • QR Code

        • JavaScript must be enabled.

          There was an error retrieving this content.

          The content could not be found.

        • JavaScript must be enabled.

          There was an error retrieving this content.

          The content could not be found.

        • JavaScript must be enabled.

          There was an error retrieving this content.

          The content could not be found.

        Confirm
        Do you wish to proceed?

        Confirm message?