{ "info": { "author": "Mango Health", "author_email": "opensource@mangohealth.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": ".. image:: https://img.shields.io/travis/mangohealth/awaredatetime.svg\n :alt: Build Status\n :target: https://travis-ci.org/mangohealth/awaredatetime/\n.. image:: https://img.shields.io/coveralls/mangohealth/awaredatetime.svg\n :alt: Code Coverage\n :target: https://coveralls.io/github/mangohealth/awaredatetime\n.. image:: https://img.shields.io/pypi/v/awaredatetime.svg\n :alt: PyPi Version\n :target: https://pypi.python.org/pypi/awaredatetime/\n.. image:: https://img.shields.io/pypi/pyversions/awaredatetime.svg\n :alt: Supported Python Versions\n :target: https://pypi.python.org/pypi/awaredatetime/\n.. image:: https://img.shields.io/pypi/implementation/awaredatetime.svg\n :alt: Supported Python Implementations\n :target: https://pypi.python.org/pypi/awaredatetime\n\n=============\nawaredatetime\n=============\n| Module providing a timezone aware ``datetime.datetime`` compatible object.\n| Supports CPython 2.6 - 3.5 and PyPy.\n\n--------\nFeatures\n--------\n- Drop-in replacement for ``datetime.datetime``\n- Simple implementation that leverages the built-in ``datetime`` module as much as possible\n- Excellent test coverage\n\n----------\nMotivation\n----------\n| ``datetime.datetime`` objects aren't aware by default.\n| New projects should always use timezone aware ``datetime.datetime`` objects, but the Python standard library doesn't make that easy.\n ``AwareDatetime`` is here to help!\n|\n| You may also have existing code that needs to become timezone aware and migrating code to become timezone aware is tricky.\n| Using ``AwareDatetime`` will help you track what code has been migrated to support timezone.\n\n---------------------------\nawaredatetime.AwareDatetime\n---------------------------\nA drop-in replacement for ``datetime.datetime`` that always provide timezone aware objects.\n\nExample Usage\n=============\n.. code:: python\n\n >>> from awaredatetime import AwareDatetime\n >>> AwareDatetime(2016, 1, 1)\n AwareDatetime(2016, 1, 1, 0, 0, tzinfo=)\n >>> import datetime\n >>> AwareDatetime.from_datetime(datetime.datetime(2016, 1, 1))\n AwareDatetime(2016, 1, 1, 0, 0, tzinfo=)\n >>>\n\n-----------------------\nawaredatetime.AwareTime\n-----------------------\n| Not implemented since times with a timezone don't make sense.\n| e.g. What's the expected behavior for coverting ``24:00:00+00:00`` to positive UTC offset?\n\n============\nDependencies\n============\nThe only dependency is ``pytz``. We recommend that you use the latest version of ``pytz``, but this package will not force that upon you.\n\n=======================\nMigrating Existing Code\n=======================\n\n\n============\nSimilar work\n============\n- `datetime_tz`_\n - Another timezone aware drop-in replacement for the ``datetime`` module, but overrides more datetime behavior\n- `arrow`_\n - An API-compatible re-write of the ``datetime`` module\n\n.. _`datetime_tz`: https://github.com/mithro/python-datetime-tz\n.. _`arrow`: https://github.com/crsmithdev/arrow\n\n============\nContributing\n============\n\n----------\nGuidelines\n----------\n- Do not change the CHANGELOG file or ``__version__`` in ``awaredatetime/__init__.py``. This is the responsibility of the repo and package owners.\n- Before adding a dependency, open an `issue `_ to discuss why the dependency is needed.\n- Follow the `Google Python Style Guide `_.\n\n-----\nSteps\n-----\n\n#. Setup the development environment\n\n .. code:: bash\n\n pip install -U -r requirements.dev.txt\n\n#. Make your changes\n\n#. Add unittests for your changes\n\n#. Run tests, which will also check the coding style\n\n .. code:: bash\n\n coverage run --source=awaredatetime setup.py test_dev\n\n#. Once tests pass, ensure that your changes have proper test coverage\n\n .. code:: bash\n\n coverage html && ls htmlcov/index.html\n\n#. Open a `PR `_\n\n=========\nChangelog\n=========\n\n------------------\n0.0.2 (2016-06-20)\n------------------\n- Change how package versioning is determined\n\n------------------\n0.0.1 (2016-06-20)\n------------------\n- Initial commit\n\n - AwareDatetime is compatible with all known datetime.datetime methods and constants", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mangohealth/awaredatetime", "keywords": "python datetime timezone aware awaredatetime utc", "license": "Apache 2.0", "maintainer": "", "maintainer_email": "", "name": "awaredatetime", "package_url": "https://pypi.org/project/awaredatetime/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/awaredatetime/", "project_urls": { "Homepage": "https://github.com/mangohealth/awaredatetime" }, "release_url": "https://pypi.org/project/awaredatetime/0.0.2/", "requires_dist": [ "pytz" ], "requires_python": "", "summary": "Drop-in replacement for timezone aware datetime objects", "version": "0.0.2" }, "last_serial": 2188811, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "4b83570e543e0d0f4b5fd26ad96f3b16", "sha256": "9636fa550ee9442aa26797ef88e0fed5497fa5f6a06940185751f7b0b652d810" }, "downloads": -1, "filename": "awaredatetime-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4b83570e543e0d0f4b5fd26ad96f3b16", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6614, "upload_time": "2016-06-20T09:16:52", "url": "https://files.pythonhosted.org/packages/e7/f3/f8cb89ea179fd4794f605de7a5957f26aa37f4c1b1bcf49d3813bc918e02/awaredatetime-0.0.1-py2.py3-none-any.whl" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "817a9e08732c227b306904164ef3369a", "sha256": "7b07d8b97613832ef4208a9bc9989071320545ba675a942f262bd9d8c1ff3e2f" }, "downloads": -1, "filename": "awaredatetime-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "817a9e08732c227b306904164ef3369a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6743, "upload_time": "2016-06-21T00:39:09", "url": "https://files.pythonhosted.org/packages/d2/7e/25e4f1e14e8bc629467d867558956b75b43626cb863f63985e41afa1044e/awaredatetime-0.0.2-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "817a9e08732c227b306904164ef3369a", "sha256": "7b07d8b97613832ef4208a9bc9989071320545ba675a942f262bd9d8c1ff3e2f" }, "downloads": -1, "filename": "awaredatetime-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "817a9e08732c227b306904164ef3369a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6743, "upload_time": "2016-06-21T00:39:09", "url": "https://files.pythonhosted.org/packages/d2/7e/25e4f1e14e8bc629467d867558956b75b43626cb863f63985e41afa1044e/awaredatetime-0.0.2-py2.py3-none-any.whl" } ] }