This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

SQLAlchemy type to store aware datetime values

Project Description

SQLAlchemy-Utc

This package provides a drop-in replacement of SQLAlchemy’s built-in DateTime type with timezone=True option enabled. Although SQLAlchemy’s built-in DateTime type provides timezone=True option, since some vendors like SQLite and MySQL don’t provide timestamptz data type, the option doesn’t make any effect on these vendors.

UtcDateTime type is equivalent to the built-in DateTime with timezone=True option enabled on vendors that support timestamptz e.g. PostgreSQL, but on SQLite or MySQL, it shifts all datetime.datetime values to UTC offset before store it, and returns always aware datetime.datetime through result sets.

Long story short, UtcDateTime does:

  • take only aware datetime.datetime,
  • return only aware datetime.datetime,
  • never take or return naive datetime.datetime,
  • ensure timestamps in database always to be encoded in UTC, and
  • work as you’d expect.

Written by Hong Minhee at Spoqa, and distributed under MIT license.

Changelog

0.9.0

First version. Released on June 21, 2016.

Release History

Release History

This version
History Node

0.9.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
SQLAlchemy_Utc-0.9.0-py2.py3-none-any.whl (4.6 kB) Copy SHA256 Checksum SHA256 3.5 Wheel Jun 21, 2016
SQLAlchemy-Utc-0.9.0.tar.gz (3.0 kB) Copy SHA256 Checksum SHA256 Source Jun 21, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting