repowiseabsent1706/sqlalchemy-mixins

absent1706 / sqlalchemy-mixins

Active Record, Django-like queries, nested eager load and beauty __repr__ for SQLAlchemy

Python★ 786

github.com/absent1706/sqlalchemy-mixinsIndexed at 9877efdUp to date with upstream

What is sqlalchemy-mixins?

sqlalchemy-mixins is a framework-agnostic collection of mixins for the SQLAlchemy ORM. It adds Active Record operations, Django-like queries, eager loading, timestamps, serialization, and object representations to SQLAlchemy models. sqlalchemy-mixins is written in Python.

Written by a model from the README and the source

42 files and 500 symbols in 3 modules, written in Python.

Code health

8.2out of 10Good

This codebase scores 8.2 out of 10 for code health, which we rate good. It also scores maintainability 8.7 and static performance 10.0 out of 10. The three are scored separately and never blended into one number.

Use absent1706/sqlalchemy-mixins in your agent

Point Claude Code, Cursor, Codex or VS Code at this repository. Your agent gets the index this page is built from: cited answers, callers, history and health for any file.

  1. 1.In Claude, open Customize → Connectors, click +, then Add custom connector. On a Team or Enterprise plan an owner adds it first under Organization settings → Connectors.
  2. 2.Paste the server URL below as the Remote MCP server URL, then click Add.
  3. 3.Click Connect. A Repowise sign-in window opens. Approve access.
  4. 4.Repowise's tools are now available in your Claude chats.

Connect with one click. Sign in with Repowise (OAuth), no API key to copy. Works in Claude on the web, desktop, and mobile.

Docs
bash
https://api.repowise.dev/mcp/absent1706/sqlalchemy-mixins
Editors need an API key: sign in to create one.Sign in to connect

This repo is public, so anyone with a Repowise account and an API key can connect.

Try asking

  • get_overview()
  • get_answer("how is sqlalchemy-mixins put together?")
  • get_why("why is sqlalchemy-mixins structured this way?")

Explore sqlalchemy-mixins

Key features of sqlalchemy-mixins

  • Active Record operations provide model methods for creating, updating, deleting, and finding records.
  • Eager loading supports nested relationships, joined loading, and subquery loading.
  • Django-like queries support field lookups, automatic relation joins, filtering, and sorting.
  • Models can automatically eager load relations used for filtering or sorting.
  • Mixins provide timestamps and serialization to dictionaries.
  • The package provides a beauty __repr__ for SQLAlchemy objects.

How absent1706/sqlalchemy-mixins works

Models combine mixins from the sqlalchemy_mixins package with a SQLAlchemy declarative base. AllFeaturesMixin provides a combined integration, while individual mixins can be used separately. SessionMixin supplies model access to a configured SQLAlchemy session, and InspectionMixin inspects columns and relationships for shared functionality. ActiveRecordMixin uses the session for model creation, updates, deletion, and retrieval. EagerLoadMixin builds nested, joined, or subquery relationship loading, while SmartQueryMixin handles Django-like filtering, sorting, and relation joins. The examples directory provides usage examples, and tests are run against sqlalchemy_mixins.

The codebase has 42 files and 500 symbols in 3 modules, led by Python. Code health is 8.2 out of 10, rated good.

Getting started with sqlalchemy-mixins

  1. Install sqlalchemy-mixins with pip.
    pip install sqlalchemy_mixins
  2. Run the test suite.
    python -m unittest discover sqlalchemy_mixins/
  3. Import AllFeaturesMixin and add it to a SQLAlchemy model.
    from sqlalchemy_mixins import AllFeaturesMixin
  4. Configure a session with autocommit enabled and assign it to the base model.
    session = scoped_session(sessionmaker(bind=engine, autocommit=True))

Commands copied from the README

absent1706/sqlalchemy-mixins FAQ

What is sqlalchemy-mixins?

sqlalchemy-mixins is a framework-agnostic collection of mixins for the SQLAlchemy ORM. It adds Active Record, eager loading, Django-like queries, timestamps, serialization, and object representations.

How does sqlalchemy-mixins work?

sqlalchemy-mixins adds mixins to SQLAlchemy models and uses SessionMixin for session access and InspectionMixin for inspecting model structure. Other mixins provide Active Record, eager loading, and smart query behavior.

How do I install sqlalchemy-mixins?

sqlalchemy-mixins is installed with pip using the package name sqlalchemy_mixins. Its tests run with Python's unittest discovery command.

What language is sqlalchemy-mixins written in?

sqlalchemy-mixins is written in Python. The package supports Python 3.5 and later.

How is the sqlalchemy-mixins code organized?

sqlalchemy-mixins is organized mainly in the sqlalchemy_mixins directory, with examples in the examples directory. Shared session and inspection behavior lives in SessionMixin and InspectionMixin.

Who is sqlalchemy-mixins for?

sqlalchemy-mixins is for projects using the SQLAlchemy ORM that want framework-agnostic model mixins. It can be integrated into an existing project or used through individual mixins.

What license does sqlalchemy-mixins use?

sqlalchemy-mixins uses the MIT license.

The summary, features and answers on this page are written by a model from the README and the source, and refreshed with each index.

About this page

Get a page like this for your own codebase

Repowise built this map of absent1706/sqlalchemy-mixins from its source and git history. It parses every symbol, draws the dependency graph, scores each file's health from complexity, duplication, coverage and churn, finds hotspots and owners in the history, and writes documentation for every module. Your coding agent reads the same index over MCP, so its answers cite real files.

Index your repo freeSee how Repowise worksFree for 2 public repos, with a page like this one.

Prefer local? pip install repowise && repowise init indexes your own checkout, no account needed.