{"id":13936250,"url":"https://github.com/spoqa/sqlalchemy-utc","last_synced_at":"2025-04-06T06:12:04.720Z","repository":{"id":37382036,"uuid":"61645373","full_name":"spoqa/sqlalchemy-utc","owner":"spoqa","description":"SQLAlchemy type to store aware datetime values","archived":false,"fork":false,"pushed_at":"2022-08-17T07:28:12.000Z","size":40,"stargazers_count":101,"open_issues_count":5,"forks_count":19,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-03-30T05:07:23.261Z","etag":null,"topics":["databases","datetime","orm","python","sqlalchemy","timezone","utc"],"latest_commit_sha":null,"homepage":"https://pypi.python.org/pypi/SQLAlchemy-Utc","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spoqa.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-21T15:28:44.000Z","updated_at":"2024-11-07T09:37:20.000Z","dependencies_parsed_at":"2022-07-08T07:39:55.774Z","dependency_job_id":null,"html_url":"https://github.com/spoqa/sqlalchemy-utc","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spoqa%2Fsqlalchemy-utc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spoqa%2Fsqlalchemy-utc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spoqa%2Fsqlalchemy-utc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spoqa%2Fsqlalchemy-utc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spoqa","download_url":"https://codeload.github.com/spoqa/sqlalchemy-utc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247441057,"owners_count":20939239,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["databases","datetime","orm","python","sqlalchemy","timezone","utc"],"created_at":"2024-08-07T23:02:31.213Z","updated_at":"2025-04-06T06:12:04.691Z","avatar_url":"https://github.com/spoqa.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"SQLAlchemy-Utc\n==============\n\n.. image:: https://badge.fury.io/py/SQLAlchemy-Utc.svg?\n   :target: https://pypi.python.org/pypi/SQLAlchemy-Utc\n.. image:: https://travis-ci.com/spoqa/sqlalchemy-utc.svg?branch=master\n   :target: https://travis-ci.com/spoqa/sqlalchemy-utc\n.. image:: https://codecov.io/github/spoqa/sqlalchemy-utc/coverage.svg?branch=master\n   :target: https://codecov.io/github/spoqa/sqlalchemy-utc?branch=master\n\nThis package provides a drop-in replacement of SQLAlchemy's built-in `DateTime`_\ntype with ``timezone=True`` option enabled.  Although SQLAlchemy's built-in\n``DateTime`` type provides ``timezone=True`` option, since some vendors like\nSQLite and MySQL don't provide ``timestamptz`` data type, the option doesn't\nmake any effect on these vendors.\n\n``UtcDateTime`` type is equivalent to the built-in ``DateTime`` with\n``timezone=True`` option enabled on vendors that support ``timestamptz``\ne.g. PostgreSQL, but on SQLite or MySQL, it shifts all ``datetime.datetime``\nvalues to UTC offset before store them, and returns always aware\n``datetime.datetime`` values through result sets.\n\nLong story short, ``UtcDateTime`` does:\n\n- take only aware ``datetime.datetime``,\n- return only aware ``datetime.datetime``,\n- never take or return naive ``datetime.datetime``,\n- ensure timestamps in database always to be encoded in UTC, and\n- work as you'd expect.\n\nA SQLAlchemy helper function, ``utcnow()``, is provided as an alternative\nto ``func.now()`` for generating ``UtcDateTime`` values on the server. For\nexample: ``Column('time', UtcDateTime(), default=utcnow())``.\n\nWritten by `Hong Minhee`_ at Spoqa_, and distributed under MIT license.\n\n.. _DateTime: http://docs.sqlalchemy.org/en/latest/core/type_basics.html#sqlalchemy.types.DateTime\n.. _Hong Minhee: https://hongminhee.org/\n.. _Spoqa: http://www.spoqa.com/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspoqa%2Fsqlalchemy-utc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspoqa%2Fsqlalchemy-utc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspoqa%2Fsqlalchemy-utc/lists"}