Pytzdata
########
.. image:: https://travis-ci.org/sdispater/pytzdata.png
:alt: Pytzdata Build status
:target: https://travis-ci.org/sdispater/pytzdata
The Olson timezone database for Python.
Supports Python **2.7+** and **3.5+**.
Installation
============
pip install pytzdata
Usage
=====
You can access the content of a specific timezone file by using the `tz_file()` function:
.. code-block:: python
from pytzdata import tz_file
with tz_file('Europe/Paris') as f:
# Do something with the file
If you just want to know the path to a specific timezone file, you may use the `tz_path()` function:
.. code-block:: python
from pytzdata import tz_path
tz_path('Europe/Paris')
By default, ``pytzdata`` will use the bundled timezone database, however you can set
a custom directory that holds the timezone files using the ``set_directory`` function:
.. code-block:: python
import pytzdata
pytzdata.set_directory('/custom/zoneinfo')
You can also set the ``PYTZDATA_TZDATADIR`` environment variable to set a custom directory.
Release
=======
To make a new release just follow these steps:
- ``make data``
- Update version numbers in ``pytzdata/version.py`` and ``tests/test_version.py``
- ``make tox``
Resources
=========
* `Issue Tracker <https://github.com/sdispater/pytzdata/issues>`_
Raw data
{
"_id": null,
"home_page": "https://github.com/sdispater/pytzdata",
"name": "pytzdata",
"maintainer": "",
"docs_url": null,
"requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
"maintainer_email": "",
"keywords": "",
"author": "S\u00e9bastien Eustace",
"author_email": "sebastien@eustace.io",
"download_url": "https://files.pythonhosted.org/packages/67/62/4c25435a7c2f9c7aef6800862d6c227fc4cd81e9f0beebc5549a49c8ed53/pytzdata-2020.1.tar.gz",
"platform": "",
"description": "Pytzdata\n########\n\n.. image:: https://travis-ci.org/sdispater/pytzdata.png\n :alt: Pytzdata Build status\n :target: https://travis-ci.org/sdispater/pytzdata\n\nThe Olson timezone database for Python.\n\nSupports Python **2.7+** and **3.5+**.\n\n\nInstallation\n============\n\n pip install pytzdata\n\n\nUsage\n=====\n\nYou can access the content of a specific timezone file by using the `tz_file()` function:\n\n.. code-block:: python\n\n from pytzdata import tz_file\n\n with tz_file('Europe/Paris') as f:\n # Do something with the file\n\nIf you just want to know the path to a specific timezone file, you may use the `tz_path()` function:\n\n.. code-block:: python\n\n from pytzdata import tz_path\n\n tz_path('Europe/Paris')\n\nBy default, ``pytzdata`` will use the bundled timezone database, however you can set\na custom directory that holds the timezone files using the ``set_directory`` function:\n\n.. code-block:: python\n\n import pytzdata\n\n pytzdata.set_directory('/custom/zoneinfo')\n\nYou can also set the ``PYTZDATA_TZDATADIR`` environment variable to set a custom directory.\n\n\nRelease\n=======\n\nTo make a new release just follow these steps:\n\n- ``make data``\n- Update version numbers in ``pytzdata/version.py`` and ``tests/test_version.py``\n- ``make tox``\n\n\nResources\n=========\n\n* `Issue Tracker <https://github.com/sdispater/pytzdata/issues>`_\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "The Olson timezone database for Python.",
"version": "2020.1",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "c39635a70d5ac6ee08ae57eb08aeaed8",
"sha256": "e1e14750bcf95016381e4d472bad004eef710f2d6417240904070b3d6654485f"
},
"downloads": -1,
"filename": "pytzdata-2020.1-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "c39635a70d5ac6ee08ae57eb08aeaed8",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
"size": 489958,
"upload_time": "2020-07-13T10:42:10",
"upload_time_iso_8601": "2020-07-13T10:42:10.122147Z",
"url": "https://files.pythonhosted.org/packages/e0/4f/4474bda990ee740a020cbc3eb271925ef7daa7c8444240d34ff62c8442a3/pytzdata-2020.1-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "3f8cd323fad2748f08c54a317bd81bc5",
"sha256": "3efa13b335a00a8de1d345ae41ec78dd11c9f8807f522d39850f2dd828681540"
},
"downloads": -1,
"filename": "pytzdata-2020.1.tar.gz",
"has_sig": false,
"md5_digest": "3f8cd323fad2748f08c54a317bd81bc5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
"size": 281719,
"upload_time": "2020-07-13T10:42:12",
"upload_time_iso_8601": "2020-07-13T10:42:12.083824Z",
"url": "https://files.pythonhosted.org/packages/67/62/4c25435a7c2f9c7aef6800862d6c227fc4cd81e9f0beebc5549a49c8ed53/pytzdata-2020.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2020-07-13 10:42:12",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "sdispater",
"github_project": "pytzdata",
"travis_ci": true,
"coveralls": false,
"github_actions": false,
"tox": true,
"lcname": "pytzdata"
}