• Stars
    star
    2,664
  • Rank 17,155 (Top 0.4 %)
  • Language
    Python
  • Created about 10 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A curated list of awesome tools for SQLAlchemy

Awesome SQLAlchemy

image

A curated list of awesome extra libraries and resources for SQLAlchemy. Inspired by awesome-python. (See also other awesome lists!)

Licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Table of Contents

Data Structures

SQLAlchemy-Continuum

Versioning and auditing extension for SQLAlchemy.

  • Creates versions for inserts, deletes and updates.
  • Does not store updates which don't change anything.
  • Supports alembic migrations.
  • Can revert objects data as well as all object relations at given transaction even if the object was deleted.
  • Transactions can be queried afterwards using SQLAlchemy query syntax.
  • Query for changed records at given transaction.
  • Temporal relationship reflection. Version object's relationship show the parent objects relationships as they where in that point in time.
  • Supports native versioning for PostgreSQL database (trigger based versioning).
sqlalchemy_mptt

Library for implementing MPTT (modified preorder tree traversal) with SQLAlchemy models and working with trees of model instances, like django-mptt.

SQLAlchemy-ORM-tree

An implementation for SQLAlchemy-based applications of the nested-sets/modified-pre-order-tree-traversal technique for storing hierarchical data in a relational database.

vdm

Versioned domain model. Python library for revisioning/versioning of databases.

Data Types

SQLAlchemy-Enum34

SQLAlchemy type to store standard enum.Enum values.

SQLAlchemy-Utc

SQLAlchemy type to store aware datetime.datetime values.

SQLAlchemy-Utils

Various utility functions, new data types and helpers for SQLAlchemy

  • Listeners
  • Data types: {..., ChoiceType, CountryType, JSONType, URLType, UUIDType, ...}
  • Range data types
  • Aggregated attributes
  • Generates decorator
  • Generic relationships
  • Database helpers: create_database, drop_database
  • Foreign key helpers
  • ORM helpers
  • Utility classes
  • Model mixins: Timestamp (created, updated times)

Database Migration Tools

Alembic

Alembic is a lightweight database migration tool for usage with the SQLAlchemy Database Toolkit for Python.

sqlalchemy-migrate

Inspired by Ruby on Rails' migrations, SQLAlchemy Migrate provides a way to deal with database schema changes in SQLAlchemy projects.

Dialects

https://docs.sqlalchemy.org/en/latest/dialects/

redshift_sqlalchemy

Amazon Redshift dialect for SQLAlchemy.

sphinxalchemy

SQLAlchemy dialect for interfacing with Sphinx (search engine) via SphinxQL.

GINO

An asynchronous PostgreSQL dialect for asyncpg, providing SQLAlchemy core support and its own asynchronous ORM interface.

Documentation

File and Image Attachments

filedepot

DEPOT is a framework for easily storing and serving files in web applications. Depot features simple integration with SQLAlchemy by providing customized model field types for storing files attached to your ORM document.

SQLAlchemy-ImageAttach

SQLAlchemy-ImageAttach is a SQLAlchemy extension for attaching images to entity objects.

sqlalchemy-media

Based on SQLAlchemy-ImageAttach but using JSON type instead of relation, and SqlAlchemy's mutable facility, Also supports multiple stores per context.

Forms and Data Validations

ColanderAlchemy

ColanderAlchemy helps you to auto-generate Colander schemas that are based on SQLAlchemy mapped classes.

Such Colander schemas can be used with libraries like Deform and helps remove the need for duplication of schema definitions.

Flask-Validator

Data validator for Flask and SQL-Alchemy, working at Model component with events, preventing invalid data in the columns. The extension works with event listeners from SQLAlchemy.

FormAlchemy

FormAlchemy eliminates boilerplate by autogenerating HTML input fields from a given model. FormAlchemy will try to figure out what kind of HTML code should be returned by introspecting the model's properties and generate ready-to-use HTML code that will fit the developer's application.

WTForms-Alchemy

WTForms-Alchemy is a WTForms extension toolkit for easier creation of model based forms. Strongly influenced by Django ModelForm.

Sprox

Sprox provides an easy way to create forms for web content which are: automatically generated, easy to customize, and validated. Sprox also has powerful tools to help you display your content the way you want to with table and record viewers. Sprox provides a way to fill your widgets, whether they are forms or other content with customizable data.

Full-text Searching

SQLAlchemy-Searchable

Full-text searchable models for SQLAlchemy. Only supports PostgreSQL.

SQLAlchemy-FullText-Search

Fulltext search support with MySQL & SQLAlchemy.

GIS and Spatial Databases

GeoAlchemy

GeoAlchemy provides extensions to SQLAlchemy to work with spatial databases.

The current supported spatial database systems are PostGIS, Spatialite, MySQL, Oracle, and MS SQL Server 2008.

GeoAlchemy 2

GeoAlchemy 2 provides extensions to SQLAlchemy for working with spatial databases.

GeoAlchemy 2 focuses on PostGIS. PostGIS 1.5 and PostGIS 2 are supported. Spatialite is also supported, but using GeoAlchemy 2 with Spatialite requires some specific configuration on the application side.

GeoAlchemy 2 aims to be simpler than its predecessor, GeoAlchemy. Simpler to use, and simpler to maintain.

Internationalizations

SQLAlchemy-i18n

Internationalization extension for SQLAlchemy models.

  • Stores translations in separate tables.
  • Reflects translation table structures based on parent model table structure.
  • Supports forcing of given locale.
  • Good performance (uses proxy dicts and other advanced SQLAlchemy concepts for performance optimization).

Profilers

flask_debugtoolbar

Debug toolbar with SQLAlchemy query information for Flask.

pyramid_debugtoolbar

Debug toolbar with SQLAlchemy query information for Pyramid.

SQLTap

SQLTap is a library that allows you to profile and introspect the queries that your application makes using SQLAlchemy.

SQLTap helps you understand:

  • how many times a sql query is executed
  • how much time your sql queries take
  • where your application is issuing sql queries from
nplusone

Auto-detect the n+1 queries problem in SQLAlchemy (and other Python ORMs)

nplusone detects unnecessary queries caused by lazy loading and unused eager loading. Integrates with Flask-SQLAlchemy.

Query helpers

sqlakeyset

This library implements keyset-based paging for SQLAlchemy (both ORM and core).

This library has been tested with PostgreSQL and MariaDB/MySQL. It should work with other SQLAlchemy-supported databases to provided they support row( syntax.

Recipes

Serialization and deserialization

marshmallow-sqlalchemy

SQLAlchemy integration with the marshmallow (de)serialization library.

pydantic

Data parsing and validation using Python type hints

sqlalchemy-dict

SQLAlchemy extension for interacting models with python dictionary.

Testing

charlatan

Fixtures management for SQLAlchemy and other systems.

factory_boy

Generate fake data and create random fixtures for testing in SQLAlchemy and many other Python ORM systems.

mixer

Generate fake data and create random fixtures for testing in SQLAlchemy and many other Python ORM systems.

Thin Abstractions

Dataset

Easy-to-use data handling for SQL data stores in Python with support for implicit table creation, bulk loading, and transaction. Dataset also includes support for freezing data to CSV and JSON flat files.

rdflib-sqlalchemy

RDFLib store using SQLAlchemy dbapi as back-end.

PugSQL

Loading and execution of parameterized queries stored in files.

SQLSoup

SQLSoup provides a convenient way to map Python objects to relational database tables, with no declarative code of any kind. It's built on top of the SQLAlchemy ORM and provides a super-minimalistic interface to an existing database.

SQLModel

SQLModel is a library for interacting with SQL databases from Python code, with Python objects. It is designed to be intuitive, easy to use, highly compatible, and robust. SQLModel is based on Python type annotations, and powered by Pydantic and SQLAlchemy.

Zillion

Zillion is a free, open data warehousing and dimensional modeling tool that allows combining and analyzing data from multiple datasources through a simple API. It writes SQL so you don't have to, and it easily bolts onto existing database infrastructure via SQLAlchemy.

Vendor-specific Extensions

PostgreSQL

Flask-SQLAlchemy-PGEvents

Flask extension that uses SQLAlchemy and psycopg2-pgevents to enable event listeners tied into database-layer triggers.

sqlalchemy-crosstab-postgresql

New grammar for SQLAlchemy to make handling the crosstab() tablefunc (i.e. pivot tables) in PostgreSQL easy peasy.

sqlalchemy-postgres-copy

Wrapper for using PostgreSQL COPY with SQLAlchemy for efficient bulk data imports and exports.

Visualizations

sadisplay

Simple package for describing SQLAlchemy schema and display raw database tables by reflecting feature.

sqlalchemy_schemadisplay

This module generates images from SQLAlchemy models.

eralchemy

ERAlchemy generates Entity Relation (ER) diagram from databases or from SQLAlchemy models.

Web

Framework Integrations

bottle-sqlalchemy

A Bottle plugin to manage SQLAlchemy session to your application.

filteralchemy

Declarative query builder that auto-generates filter parameters from models and parses request parameters using marshmallow-sqlalchemy and webargs.

Flask-SQLAlchemy

Flask-SQLAlchemy is an extension for Flask that adds support for SQLAlchemy to your application.

Flask-Admin

The admin interface framework for Flask. With scaffolding for SQLAlchemy, MongoEngine, pymongo and Peewee.

pyramid_sqlalchemy

pyramid_sqlalchemy provides everything needed to use SQLAlchemy in Pyramid applications.

pyramid_restler

pyramid_restler is a somewhat-opinionated toolkit for building RESTful Web services and applications on top of the Pyramid framework (with SQLAlchemy models).

sacrud

SACRUD will solve your problem of CRUD interface for SQLAlchemy, by providing extension for Pyramid (yet) or use it in pure form. Unlike classical CRUD interface, pyramid_sacrud allows override and flexibly customize interface (that is closer to django.contrib.admin).

SQLA-wrapper

A light and framework-independent wrapper for SQLAlchemy that makes it really easy to setup and use.

  • Doesn't change the SQLAlchemy syntax.
  • Can paginate the results of the queries.
  • Support for multiple databases at the same time.
zope.sqlalchemy

The aim of this package is to unify the plethora of existing packages integrating SQLAlchemy with Zope's transaction management. As such it seeks only to provide a data manager and makes no attempt to define a zopeish way to configure engines.

Other

paginate_sqlalchemy

This module helps dividing large lists of items into pages. The user is shown one page at a time and can navigate to other pages.

sandman2

Generate a curl-able REST HTTP API with searching and filtering for all tables in a database and an admin UI with Flask-SQLAlchemy and HTTP Basic Authentication.

sqlalchemy_mixins

A set of well-tested mixins that brings Active Record, Django-like queries, nested eager load and beauty __repr__ to your SQLAlchemy.

More Repositories

1

fedify

ActivityPub server framework in TypeScript
TypeScript
512
star
2

logtape

Simple logging library with zero dependencies for Deno, Node.js, Bun, browsers, and edge functions
TypeScript
501
star
3

wikidata

Wikidata client library for Python
Python
333
star
4

hollo

Federated single-user microblogging software
TypeScript
194
star
5

iterfzf

Pythonic interface to fzf, a CLI fuzzy finder
Python
161
star
6

seonbi

SmartyPants for Korean language
Haskell
131
star
7

cjk-compsci-terms

CJK computer science terms comparison / 中日韓電腦科學術語對照 / 日中韓のコンピュータ科学の用語対照 / 한·중·일 전산학 용어 대조
Python
128
star
8

sqlalchemy-imageattach

SQLAlchemy extension for attaching images to entities.
Python
116
star
9

lisphp

Lisphp is a Lisp dialect written in PHP.
PHP
80
star
10

iso4217

ISO 4217 currency data package for Python
Python
59
star
11

muzei-pixiv

Enjoy kawaii artworks of Pixiv through Muzei!
Java
52
star
12

fedi-badge

A badge generator for ActivityPub-enabled social media platforms, i.e., fediverse
TypeScript
43
star
13

sider

ABANDONED. Sider is a persistent object library based on Redis.
Python
39
star
14

logging-spinner

Display spinners (in CLI) through Python standard logging
Python
34
star
15

nvimrc

My Neovim configuration. Supports macOS and Linux.
Vim Script
33
star
16

sentry-heroku

Run Sentry on Heroku for free
Python
32
star
17

deno-task-hooks

A simple way to run Deno tasks as Git hooks
TypeScript
25
star
18

homebrew-jetbrains-eap

JetBrains EAP Casks for Homebrew Cask
Ruby
23
star
19

wsgi-oauth2

Simple WSGI middleware for OAuth 2.0
Python
22
star
20

jikji

Small static site generator toolkit
TypeScript
21
star
21

aitertools

Well-tested utility functions dealing with async iterables
TypeScript
18
star
22

github-distutils

This project is abandoned. Don't use this anymore!
Python
15
star
23

json-hash

JCS (JSON Canonicalization Scheme), JSON digests, and JSON Merkle hashes
TypeScript
14
star
24

blog

Hong Minhee's blog
Python
13
star
25

logtape-otel

LogTape OpenTelemetry Sink
TypeScript
12
star
26

macos-terminal-profiles

My profiles for macOS Terminal.app
12
star
27

naver-translate

ABANDONED. Haskell interface to Naver Translate
Haskell
11
star
28

microblog

A simple federated microblog example using Fedify for educational purpose
TypeScript
10
star
29

plastic

Plastic is a Python web framework built on top of Werkzeug.
Python
8
star
30

unihan-json

JSON data files parsed from the Unicode Han Database (Unihan)
Python
7
star
31

nicovideo-translator

Nico Nico Douga (ニコニコ動画) Comment Translator
Haskell
7
star
32

dojang

A cross-platform dotfiles manager
Haskell
7
star
33

markdown-gfm-admonition

An extension of Python Markdown that enables the admonition syntax of GFM
Python
7
star
34

markdown-it-mention

A markdown-it plugin that parses and renders Mastodon-style @mentions
TypeScript
7
star
35

tofu

A very impractical small programming language.
6
star
36

resume

Hong Minhee's résumé
Makefile
6
star
37

phunctional

Functional programming in PHP 5.2.x
PHP
6
star
38

submark

Extract a part from CommonMark/Markdown docs
Haskell
6
star
39

fedify-h3

Integrate Fedify with h3
TypeScript
6
star
40

fedikit

A prototype of Fedify written in Python (codenamed FediKit)
Python
5
star
41

iso639-1

Type-safe ISO 639-1 language code (a.k.a. two-letter codes) for TypeScript
TypeScript
5
star
42

sphinx-fakeinv

Generate fake Intersphinx inventory
Python
5
star
43

monthday

Date without year
Python
5
star
44

pghstore

This repository is abandoned and the upstream is moved to @heroku →
Python
5
star
45

actions

Small Useful GitHub Actions
JavaScript
5
star
46

bencodex-haskell

Bencodex reader/writer for Haskell
Haskell
5
star
47

fedify-microblog-tutorial-ja

『自分だけのフェディバースのマイクロブログを作ろう!』のAsciiDocのソースコード
Shell
5
star
48

x-forwarded-fetch

A middleware for fetch() behind a reverse proxy with X-Forwarded-* headers
TypeScript
5
star
49

dc-feed

PHP
4
star
50

mediawiki-rc-mastodon-bot

Relay RecentChanges from a MediaWiki site to a Mastodon account
TypeScript
4
star
51

shinjitai-table

The table between shinjitai (新字体) and kyūjitai (舊字體).
Python
4
star
52

travis-auto-rebuilder

Automatically retry failed builds
Python
4
star
53

web_deno_test

Run your tests on Deno and web browsers at a time
TypeScript
4
star
54

fedify-redis

Redis drivers for Fedify
TypeScript
4
star
55

fedify-amqp

AMQP/RabbitMQ driver for Fedify
TypeScript
3
star
56

dahlia.github.io

Hong Minhee's website
HTML
3
star
57

bencodex-php

Bencodex reader/writer for PHP
PHP
3
star
58

gitter-slack

One-way relay from Gitter to Slack
Rust
3
star
59

writings

洪民憙雜記
TypeScript
3
star
60

encodingcontext

A bad idea about the default encoding
Python
3
star
61

feed-translator

ABANDONED. Translate syndication feeds.
Haskell
3
star
62

wikipedia-kana-romanizer

Wikipedia kana romanizer
JavaScript
3
star
63

last.fm-memories

Lists music you had listened before from Last.fm (or Libre.fm)
Python
3
star
64

checkmate

Generate checklists relevant to a given patch
Haskell
3
star
65

jsr-badge

A badge generator for JSR (JavaScript Registry)
TypeScript
3
star
66

fedify-express

Integrate Fedify with Express
TypeScript
2
star
67

markdown-it-jsr-ref

A markdown-it plugin that turns backtick-enclosed symbols into links to JSR API references
TypeScript
2
star
68

narabi

A simple Pythonic asynchronous interface to inter-process pub/sub
Python
2
star
69

web-lessc

A simple HTTP API of LESS compiler
JavaScript
2
star
70

localtunnel

A simple wrapper around the local tunneling services
TypeScript
2
star
71

wiki.hongminhee.org

洪兔雜記
TypeScript
2
star
72

fedify-postgres

PostgreSQL drivers for Fedify
TypeScript
1
star
73

naver-premium-contents-feed

네이버 프리미엄 콘텐츠 RSS 피드
TypeScript
1
star
74

jld

JSON-LD CLI tools
TypeScript
1
star
75

python-1.5.2-docker

Run Python 1.5.2 using Docker
1
star
76

misc

Nothing special
1
star
77

opensearch-descs

Hong Minhee's Collection of OpenSearch Descriptions
JavaScript
1
star
78

foss-license-texts-esm

F/OSS License Texts as ESM
JavaScript
1
star
79

lazylist

Proxy list to a list-returning function
Python
1
star
80

dotfiles

Hong Minhee's dotfiles
Shell
1
star
81

html-charset

Determine character encoding of HTML documents/fragments
Haskell
1
star
82

markdown-it-hashtag

A markdown-it plugin that parses and renders Mastodon-style #hashtags
TypeScript
1
star
83

fedify-queue-benchmarks

Benchmarks for Fedify's outbox queue
TypeScript
1
star