Skip to main content

SQLAlchemy Lightening

Making SQLAlchemy great again

Install

pip install sqlalchemy_lightening

Usage

# load by id
Person.get(1)

# load multiple by id
Person.get([1, 2, 3])

# basic filter
Person.where(name='dpepper')

# where `name` in ...
Person.where(name=['dpepper', 'thatguy'])

# mix and match
Person.where(Person.id != 1, name='dpepper')

# standard utilities
Person.all
Person.first

# standard SQLAlchemy query
Person.query

Example Setup

from sqlalchemy import Column, Integer, String, create_engine
from sqlalchemy.orm import declarative_base, sessionmaker
from sqlalchemy_lightening import LighteningBase


# create base sqlalchemy model
Base = declarative_base()

# extend LighteningBase mixin
class Person(LighteningBase, Base):
    id = Column(Integer, primary_key=True)
    name = Column(String(250))

engine = create_engine('sqlite:///:memory:')
session = sessionmaker(bind=engine)()

Base.metadata.create_all(engine)

# wire things up
LighteningBase.query_class = session.query

# good to go
Person.winning

installs

Release files for sqlalchemy-lightening 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sqlalchemy-lightening 0.7.0
File Size Uploaded
sqlalchemy_lightening-0.7.0.tar.gz 13.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sqlalchemy-lightening 0.7.0
File Interpreter ABI Platform
sqlalchemy_lightening-0.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 23.6 kB

Release files / sqlalchemy_lightening-0.7.0.tar.gz

Download URL sqlalchemy_lightening-0.7.0.tar.gz
Size 13.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a66b46c0aac17cf149e1c7764dddb9ac655b913efbed990d0474b6e3bbfb9300
BLAKE2b-256 checksum
How to use checksums
6f153ad77e6352ed51e161a109836c44b62cf963782e4236636c6a701110723e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 14, 2026.

Transparency log

Release files / sqlalchemy_lightening-0.7.0-py3-none-any.whl

Download URL sqlalchemy_lightening-0.7.0-py3-none-any.whl
Size 10.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5d785427330fa993531f0d956558cb9d3f7e08e83185ad9a6817ca23c5e92c5d
BLAKE2b-256 checksum
How to use checksums
4fc18c21a9325d68a3a3ae066bab0af67e670486119e4519c76824e6e8b497cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 14, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.7.0 This release

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.1

1 release file

0.1.0

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page