SQLAlchemy-Utc
SQLAlchemy type to store aware datetime values
Decision gist · record as of 2026-08-14
Yes, with conditions. The package solves a real cross-database datetime problem and has no security vulnerabilities. However, it is abandoned (last commit August 2022, no activity for nearly four years) and only explicitly supports Python up to 3.9. Install it if you need consistent UTC datetime handling across SQLite/MySQL and PostgreSQL and are willing to maintain it yourself or pin to a stable SQLAlchemy version; avoid it if you require active maintenance or support for the latest Python versions.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with just two runtime dependencies (setuptools and SQLAlchemy).
- Package is abandoned as of August 2022 with no commits for nearly four years, though the repository remains public and the last release (0.14.0) added Pandas compatibility.
License · maintenance · safety
MIT License (permissive) — MIT License permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
last release 2021-09-24 (1785 days) · last repo commit 2022-08-17 · 103 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 197,960 downloads/mo, #9,744 on PyPI
Alternatives
Verify before relying
from sqlalchemy import Column, Integer, create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy_utc import UtcDateTime, utcnow
Base = declarative_base()
class Event(Base):
__tablename__ = 'events'
id = Column(Integer, primary_key=True)
created_at = Column(UtcDateTime(), default=utcnow())- Whether the package works reliably with current SQLAlchemy versions (last release was September 2021, no maintenance since)
- Compatibility with Python 3.10+ (classifiers only list up to 3.9)
- Whether millisecond precision on SQLite (added in 0.13.0) handles all edge cases correctly
What it is and what it does
SQLAlchemy-Utc solves the problem of inconsistent timezone handling across different database backends. SQLAlchemy's built-in DateTime type with timezone support works well on databases like PostgreSQL that have native timestamptz types, but fails silently on SQLite and MySQL, which lack native timezone support. This package provides a drop-in UtcDateTime replacement that normalizes behavior: it accepts only aware datetime objects, converts them to UTC before storage, and always returns aware UTC datetimes from queries, regardless of the underlying database.
The package also includes a utcnow() helper function as a server-side alternative to func.now() for setting default timestamps. It's designed for applications that need consistent, predictable datetime handling across multiple database backends without manual UTC conversion logic in application code.
Use it for
- Store event timestamps consistently across SQLite development and PostgreSQL production databases
- Ensure all datetime values in a multi-database application are UTC-normalized without application-level conversion
- Set server-side default timestamps using utcnow() that work identically on SQLite, MySQL, and PostgreSQL
- Build timezone-aware ORM models that return aware datetime objects from all query results
- Migrate applications from naive to timezone-aware datetimes while maintaining database compatibility
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, with conditions.
The package solves a real cross-database datetime problem and has no security vulnerabilities. However, it is abandoned (last commit August 2022, no activity for nearly four years) and only explicitly supports Python up to 3.9. Install it if you need consistent UTC datetime handling across SQLite/MySQL and PostgreSQL and are willing to maintain it yourself or pin to a stable SQLAlchemy version; avoid it if you require active maintenance or support for the latest Python versions.
Install
sqlalchemy-utc on PyPI
Before you install
Low install friction with just two runtime dependencies (setuptools and SQLAlchemy). Package is abandoned as of August 2022 with no commits for nearly four years, though the repository remains public and the last release (0.14.0) added Pandas compatibility.
License in practice
MIT License permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
Quickstart
from sqlalchemy import Column, Integer, create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy_utc import UtcDateTime, utcnow
Base = declarative_base()
class Event(Base):
__tablename__ = 'events'
id = Column(Integer, primary_key=True)
created_at = Column(UtcDateTime(), default=utcnow())
Verify before relying
- Whether the package works reliably with current SQLAlchemy versions (last release was September 2021, no maintenance since)
- Compatibility with Python 3.10+ (classifiers only list up to 3.9)
- Whether millisecond precision on SQLite (added in 0.13.0) handles all edge cases correctly
Package facts
| License | MIT License permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagessetuptoolsSQLAlchemy |
| Maintenance | Abandoned 1,785 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 197,960 / month, #9,744 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 2.7Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyProgramming Language :: Python :: Implementation :: StacklessProgramming Language :: SQLTopic :: Database :: Front-EndsTopic :: Software Development |
Evidence: SQLAlchemy_Utc-0.14.0-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “sqlalchemy datetime timezone”
- SQLAlchemy-UtcProvides a SQLAlchemy DateTime type that consistently handles…
- wheneverWhenever provides type-safe, DST-aware datetime handling for Python…
- timesTimes converts between universal (UTC) time and arbitrary timezones,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also whenever · datetype · SQLAlchemy-JSONField · pytz · airporttime · backports.zoneinfo · times · DateTime · pendulum · tempora