Registry / database / atlas-provider-sqlalchemy

atlas-provider-sqlalchemy

JSON →
library0.5.0pypypiunverified

Load SQLAlchemy models into an Atlas project for schema migration inspection and planning. Compatible with SQLAlchemy 1.4+ and 2.0+. Currently at version 0.5.0, released monthly.

pip install atlas-provider-sqlalchemy
INSTALL
IMPORT
SIG · ATLAS-PROVIDER-SQL
A
atlas-provider-sqlalchemy
databasepythonv0.5.0
Install
7.2s avg
Import
Disk
81MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.5.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
build_error
glibc
py 3.103.95 runs
installs and imports cleanly · install 7.2s · import 0.000s · 79MB
81MB installed
● package 81MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

get_provider
from atlas_provider_sqlalchemy import get_provider
from atlas_provider_sqlalchemy import get_provider

Creates an Atlas provider from a SQLAlchemy declarative base.

import os from sqlalchemy import create_engine from sqlalchemy.orm import declarative_base from atlas_provider_sqlalchemy import get_provider Base = declarative_base() class User(Base): __tablename__ = 'users' id = Column(Integer, primary_key=True) name = Column(String(50)) # Use a sample URL; in production, set via environment variable engine = create_engine(os.environ.get('DATABASE_URL', 'sqlite:///:memory:')) Base.metadata.create_all(engine) provider = get_provider(Base.metadata) print(provider.schema) # Prints the schema as HCL for Atlas
Debug
Known issues
breakingIn version 0.4.0, the function signature changed from `get_provider(engine)` to `get_provider(metadata)`. Directly passing an engine will raise a TypeError.
fix
Use `get_provider(Base.metadata)` instead of `get_provider(engine)`.
affects: >=0.4.0
gotchaThe provider only reflects tables defined in the passed metadata object. If you have models imported but not associated with a common Base, they will be missing.
fix
Ensure all model classes inherit from the same declarative base instance.
affects: all
gotchaAtlas expects a single HCL schema file. Multiple providers or multiple metadata objects are not supported. Merge all models into one metadata.
fix
Use `Base.metadata` that includes all model classes.
affects: all
deprecatedThe `atlas-provider-sqlalchemy` package was previously named `ariga-atlas-provider-sqlalchemy`. The old package is deprecated and will not receive updates.
fix
Uninstall the old package and install `atlas-provider-sqlalchemy`.
affects: <0.3.0
Upgrade
Version history
0.5.0latest on PyPI · released Dec 14, 2025
Audit
Dependencies
sqlalchemyrequiredCore dependency to load models.
atlas-sdkrequiredRequired to interface with Atlas CLI.
Agent activity
16 hits · last 30 days
node
14
OpenAI (training)
1
Resources
atlas-provider-sqlalchemy — pip install atlas-provider-sqlalchemy · libregistry