skillfed

oslo.db

Oslo Database library

oslo-db v18.1.0 467.9K downloads/30d#6,496 on PyPI
Permissive license Apache-2.0 Active released

What it is and what it does

oslo.db is an OpenStack library that abstracts database connectivity and provides common patterns for ORM-based applications. It wraps SQLAlchemy and alembic to offer a unified interface for database operations across different backends, handling session management, migrations, and helper utilities that OpenStack services rely on.

The library is production-stable and actively maintained, with support for Python 3.11, 3.12, 3.13, and 3.14. It's primarily designed for OpenStack projects but can be used by any application needing structured database abstraction with alembic-based schema management. Its runtime dependencies are well-established libraries (SQLAlchemy, alembic, oslo.config, stevedore), making it a straightforward addition to projects already using those tools.

Use it for:

  • Building OpenStack services that need consistent database connectivity patterns and schema versioning.
  • Abstracting database backend differences in multi-tenant or multi-database applications using SQLAlchemy.
  • Managing database migrations in large projects via alembic with oslo.db's helper utilities.
  • Implementing session and connection pooling strategies for OpenStack-compatible applications.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

oslo.db provides database connectivity and ORM utilities for OpenStack applications, abstracting backend differences and offering migration, session management, and database helper functions.

Yes, if you are building OpenStack services or applications that benefit from its database abstraction patterns. The library is production-stable, actively maintained, has low install friction, and carries a permissive Apache-2.0 license. No known security vulnerabilities. Install only if you need its specific patterns; it is not a general-purpose ORM replacement.

Install

oslo-db on PyPI

pip

pip install oslo-db

uv

uv add oslo-db

poetry

poetry add oslo-db

Installing oslo.db

Before you install

Low install friction with a pure-Python wheel distribution. Active maintenance with a release 35 days ago. Depends on well-established libraries including SQLAlchemy, alembic, and oslo.config.

License in practice

Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most deployment contexts.

Quickstart

pip install oslo.db

from oslo_db.sqlalchemy import models
from sqlalchemy import Column, String

class MyModel(models.ModelBase):
    name = Column(String)

Requires Python 3.11 or later; SQLAlchemy must be installed and configured with a supported database backend.

Verify before relying

  • Specific database backends supported and any version constraints for each.
  • Whether oslo.db is required for non-OpenStack projects or primarily intended for OpenStack ecosystem use.
  • Performance characteristics or scalability limits for high-throughput database operations.

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.11)
Install friction low — pure-Python wheel
Runtime dependencies 9 — alembic, debtcollector, oslo.i18n, oslo.config, oslo.utils, SQLAlchemy, stevedore, testresources, testscenarios
Maintenance actively maintained — 35 days since the last release
First released
Downloads 467,937/month — #6,496 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: oslo_db-18.1.0-py3-none-any.whl

Development Status :: 5 - Production/StableEnvironment :: OpenStackIntended Audience :: Information TechnologyIntended Audience :: System AdministratorsOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPython

Tags

openstack database librarysqlalchemy orm utilitiesdatabase migration managementmulti-backend database abstractionopenstack db connectivityalembic database migrationsoslo database patterns
openstacksqlalchemy-patternsschema-migration

More Database packages