sqlalchemy-helpers


Namesqlalchemy-helpers JSON
Version 0.13.0 PyPI version JSON
download
home_pagehttp://github.com/fedora-infra/sqlalchemy-helpers
SummarySQLAlchemy Helpers
upload_time2023-11-16 14:37:25
maintainer
docs_urlNone
authorFedora Infrastructure
requires_python>=3.8.0,<4.0.0
licenseLGPL-3.0-or-later
keywords database web fedora
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # SQLAlchemy Helpers

This project contains a tools to use SQLAlchemy and Alembic in a project.

It has a Flask integration, and other framework integrations could be added in the future.

The full documentation is [on ReadTheDocs](https://sqlalchemy-helpers.readthedocs.io).

You can install it [from PyPI](https://pypi.org/project/sqlalchemy-helpers/).

![PyPI](https://img.shields.io/pypi/v/sqlalchemy-helpers.svg)
![Supported Python versions](https://img.shields.io/pypi/pyversions/sqlalchemy-helpers.svg)
![Build status](https://github.com/fedora-infra/sqlalchemy-helpers/actions/workflows/main.yml/badge.svg?branch=develop)
![Documentation](https://readthedocs.org/projects/sqlalchemy-helpers/badge/?version=latest)

## Features

Here's what sqlalchemy-helpers provides:

- Alembic integration:
  - programmatically create or upgrade your schema,
  - get information about schema versions and status
  - drop your tables without leaving alembic information behind
  - use a function in your `env.py` script to retrieve the database URL, and
    thus avoid repeating your configuration in two places.
  - migration helper functions such as `is_sqlite()` or `exists_in_db()`
- SQLAlchemy naming convention for easier schema upgrades
- Automatically activate foreign keys on SQLite
- Addition of some useful query properties on your models
- A query function `get_or_create()` that you can call directly or use on your model classes
- Optional Flask integration: you can use sqlalchemy-helpers outside of a Flask app and feel at home
- The models created with sqlalchemy-helpers work both inside and outside the Flask application
  context
- Support for asyncio and FastAPI.

This project has 100% code coverage and aims at reliably sharing some of the basic boilerplate
between applications that use SQLAlchemy.

Check out the [User Guide](https://sqlalchemy-helpers.readthedocs.io/en/latest/user.html) to learn
how to use it in your application, with or without a web framework.

## FAQ

- Why not use [Flask-SQLAlchemy](https://flask-sqlalchemy.palletsprojects.com) and
  [Flask-Migrate](https://github.com/miguelgrinberg/Flask-Migrate/)?

Those projects are great, but we also have apps that are not based on Flask and that would benefit
from the features provided by sqlalchemy-helpers.


            

Raw data

            {
    "_id": null,
    "home_page": "http://github.com/fedora-infra/sqlalchemy-helpers",
    "name": "sqlalchemy-helpers",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8.0,<4.0.0",
    "maintainer_email": "",
    "keywords": "database,web,fedora",
    "author": "Fedora Infrastructure",
    "author_email": "admin@fedoraproject.org",
    "download_url": "https://files.pythonhosted.org/packages/d9/f7/96fdf70b8f7165dc38b926cfcf12e1b43528b70ecbf1744795ad21412a90/sqlalchemy_helpers-0.13.0.tar.gz",
    "platform": null,
    "description": "# SQLAlchemy Helpers\n\nThis project contains a tools to use SQLAlchemy and Alembic in a project.\n\nIt has a Flask integration, and other framework integrations could be added in the future.\n\nThe full documentation is [on ReadTheDocs](https://sqlalchemy-helpers.readthedocs.io).\n\nYou can install it [from PyPI](https://pypi.org/project/sqlalchemy-helpers/).\n\n![PyPI](https://img.shields.io/pypi/v/sqlalchemy-helpers.svg)\n![Supported Python versions](https://img.shields.io/pypi/pyversions/sqlalchemy-helpers.svg)\n![Build status](https://github.com/fedora-infra/sqlalchemy-helpers/actions/workflows/main.yml/badge.svg?branch=develop)\n![Documentation](https://readthedocs.org/projects/sqlalchemy-helpers/badge/?version=latest)\n\n## Features\n\nHere's what sqlalchemy-helpers provides:\n\n- Alembic integration:\n  - programmatically create or upgrade your schema,\n  - get information about schema versions and status\n  - drop your tables without leaving alembic information behind\n  - use a function in your `env.py` script to retrieve the database URL, and\n    thus avoid repeating your configuration in two places.\n  - migration helper functions such as `is_sqlite()` or `exists_in_db()`\n- SQLAlchemy naming convention for easier schema upgrades\n- Automatically activate foreign keys on SQLite\n- Addition of some useful query properties on your models\n- A query function `get_or_create()` that you can call directly or use on your model classes\n- Optional Flask integration: you can use sqlalchemy-helpers outside of a Flask app and feel at home\n- The models created with sqlalchemy-helpers work both inside and outside the Flask application\n  context\n- Support for asyncio and FastAPI.\n\nThis project has 100% code coverage and aims at reliably sharing some of the basic boilerplate\nbetween applications that use SQLAlchemy.\n\nCheck out the [User Guide](https://sqlalchemy-helpers.readthedocs.io/en/latest/user.html) to learn\nhow to use it in your application, with or without a web framework.\n\n## FAQ\n\n- Why not use [Flask-SQLAlchemy](https://flask-sqlalchemy.palletsprojects.com) and\n  [Flask-Migrate](https://github.com/miguelgrinberg/Flask-Migrate/)?\n\nThose projects are great, but we also have apps that are not based on Flask and that would benefit\nfrom the features provided by sqlalchemy-helpers.\n\n",
    "bugtrack_url": null,
    "license": "LGPL-3.0-or-later",
    "summary": "SQLAlchemy Helpers",
    "version": "0.13.0",
    "project_urls": {
        "Homepage": "http://github.com/fedora-infra/sqlalchemy-helpers",
        "Repository": "http://github.com/fedora-infra/sqlalchemy-helpers"
    },
    "split_keywords": [
        "database",
        "web",
        "fedora"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9692e644b1486752e3d33ebc9272c65dfb4af541a05bfc44362f7939fe8d4821",
                "md5": "26dc88584fba04396fbc7f14b6bfc63e",
                "sha256": "15667669dfd4c0bef77287b471c0a25a0664d7194947b990848362a6b3a6fad0"
            },
            "downloads": -1,
            "filename": "sqlalchemy_helpers-0.13.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "26dc88584fba04396fbc7f14b6bfc63e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8.0,<4.0.0",
            "size": 36169,
            "upload_time": "2023-11-16T14:37:22",
            "upload_time_iso_8601": "2023-11-16T14:37:22.937044Z",
            "url": "https://files.pythonhosted.org/packages/96/92/e644b1486752e3d33ebc9272c65dfb4af541a05bfc44362f7939fe8d4821/sqlalchemy_helpers-0.13.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d9f796fdf70b8f7165dc38b926cfcf12e1b43528b70ecbf1744795ad21412a90",
                "md5": "cd8c8ab63ce9d1cad89fedfa8e169afd",
                "sha256": "0a7f170300f68f990a6ac485de3955ab9bc9e66d8272ce5772b8e7a6490a77a2"
            },
            "downloads": -1,
            "filename": "sqlalchemy_helpers-0.13.0.tar.gz",
            "has_sig": false,
            "md5_digest": "cd8c8ab63ce9d1cad89fedfa8e169afd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8.0,<4.0.0",
            "size": 28069,
            "upload_time": "2023-11-16T14:37:25",
            "upload_time_iso_8601": "2023-11-16T14:37:25.172389Z",
            "url": "https://files.pythonhosted.org/packages/d9/f7/96fdf70b8f7165dc38b926cfcf12e1b43528b70ecbf1744795ad21412a90/sqlalchemy_helpers-0.13.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-16 14:37:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "fedora-infra",
    "github_project": "sqlalchemy-helpers",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "sqlalchemy-helpers"
}
        
Elapsed time: 0.13688s