leapseconds


Nameleapseconds JSON
Version 2023.4.0 PyPI version JSON
download
home_page
SummaryData for official leap seconds, provided as a tuple of Unix timestamps
upload_time2023-04-09 19:02:21
maintainer
docs_urlNone
author
requires_python>=3.7
license
keywords iers leap seconds
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # leapseconds

[![PyPi Version][pypi-img]][pypi-url]
[![License][license-img]][license-url]
[![Continuous Integration][ci-img]][ci-url]
[![Code Coverage][coverage-img]][coverage-url]
[![Python Versions][python-img]][python-url]

[pypi-img]: https://img.shields.io/pypi/v/leapseconds.svg
[pypi-url]: https://pypi.org/project/leapseconds
[license-img]:  https://img.shields.io/github/license/jamielinux/leapseconds.svg
[license-url]: https://github.com/jamielinux/leapseconds/blob/main/LICENSE
[ci-img]: https://github.com/jamielinux/leapseconds/actions/workflows/ci.yml/badge.svg
[ci-url]: https://github.com/jamielinux/leapseconds/actions/workflows/ci.yml
[coverage-img]: https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/jamielinux/7c0026bdbd4a00863dcd6878e5e3b943/raw/leapseconds.covbadge.json
[coverage-url]: https://github.com/jamielinux/leapseconds/actions/workflows/ci.yml
[python-img]: https://img.shields.io/pypi/pyversions/leapseconds.svg
[python-url]: https://pypi.org/project/leapseconds

---

**leapseconds** is a Python library with data on official leap seconds, provided as a
tuple of Unix timestamps.

Source data: [https://www.ietf.org/timezones/data/leap-seconds.list][0]

[0]: https://www.ietf.org/timezones/data/leap-seconds.list

## Installation

```console
pip install leapseconds
```

## Usage

```python
from leapseconds import LEAP_SECONDS

# Check if a Unix timestamp represents an officially announced leap second:
if 63072000 in LEAP_SECONDS:
    print("True")
```

- **`LEAP_SECONDS`**:
  - A `tuple` of Unix timestamps (`int`) that represent officially announced leap
    seconds in chronological order.

## License

`leapseconds` is distributed under the terms of the [MIT][license] license.

[license]: https://spdx.org/licenses/MIT.html

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "leapseconds",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "iers,leap,seconds",
    "author": "",
    "author_email": "Jamie Nguyen <j@jamielinux.com>",
    "download_url": "https://files.pythonhosted.org/packages/7f/8d/c0699181e0c17582033e7bf0f562152d16a73338d6d7b64d79c4b4c4498c/leapseconds-2023.4.0.tar.gz",
    "platform": null,
    "description": "# leapseconds\n\n[![PyPi Version][pypi-img]][pypi-url]\n[![License][license-img]][license-url]\n[![Continuous Integration][ci-img]][ci-url]\n[![Code Coverage][coverage-img]][coverage-url]\n[![Python Versions][python-img]][python-url]\n\n[pypi-img]: https://img.shields.io/pypi/v/leapseconds.svg\n[pypi-url]: https://pypi.org/project/leapseconds\n[license-img]:  https://img.shields.io/github/license/jamielinux/leapseconds.svg\n[license-url]: https://github.com/jamielinux/leapseconds/blob/main/LICENSE\n[ci-img]: https://github.com/jamielinux/leapseconds/actions/workflows/ci.yml/badge.svg\n[ci-url]: https://github.com/jamielinux/leapseconds/actions/workflows/ci.yml\n[coverage-img]: https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/jamielinux/7c0026bdbd4a00863dcd6878e5e3b943/raw/leapseconds.covbadge.json\n[coverage-url]: https://github.com/jamielinux/leapseconds/actions/workflows/ci.yml\n[python-img]: https://img.shields.io/pypi/pyversions/leapseconds.svg\n[python-url]: https://pypi.org/project/leapseconds\n\n---\n\n**leapseconds** is a Python library with data on official leap seconds, provided as a\ntuple of Unix timestamps.\n\nSource data: [https://www.ietf.org/timezones/data/leap-seconds.list][0]\n\n[0]: https://www.ietf.org/timezones/data/leap-seconds.list\n\n## Installation\n\n```console\npip install leapseconds\n```\n\n## Usage\n\n```python\nfrom leapseconds import LEAP_SECONDS\n\n# Check if a Unix timestamp represents an officially announced leap second:\nif 63072000 in LEAP_SECONDS:\n    print(\"True\")\n```\n\n- **`LEAP_SECONDS`**:\n  - A `tuple` of Unix timestamps (`int`) that represent officially announced leap\n    seconds in chronological order.\n\n## License\n\n`leapseconds` is distributed under the terms of the [MIT][license] license.\n\n[license]: https://spdx.org/licenses/MIT.html\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Data for official leap seconds, provided as a tuple of Unix timestamps",
    "version": "2023.4.0",
    "split_keywords": [
        "iers",
        "leap",
        "seconds"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cfee0aadd5c0af342539296f39c22935375b5edad2f9eecf1905d31b0f226afd",
                "md5": "b0cbe0f0fa4a3733c49b95eadbca96ce",
                "sha256": "59d38c5cbc72b70f1fc01ff1a7cd110fc4d42e7b312cce6624e5827396773026"
            },
            "downloads": -1,
            "filename": "leapseconds-2023.4.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b0cbe0f0fa4a3733c49b95eadbca96ce",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 4314,
            "upload_time": "2023-04-09T19:02:20",
            "upload_time_iso_8601": "2023-04-09T19:02:20.400972Z",
            "url": "https://files.pythonhosted.org/packages/cf/ee/0aadd5c0af342539296f39c22935375b5edad2f9eecf1905d31b0f226afd/leapseconds-2023.4.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7f8dc0699181e0c17582033e7bf0f562152d16a73338d6d7b64d79c4b4c4498c",
                "md5": "38ae2328aec27e2efa5e3d75bf78323f",
                "sha256": "5d350d2c2177132a7699f326b39d2a3e81a1fc6c418ca72d1be2ed3ff360fa36"
            },
            "downloads": -1,
            "filename": "leapseconds-2023.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "38ae2328aec27e2efa5e3d75bf78323f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 6553,
            "upload_time": "2023-04-09T19:02:21",
            "upload_time_iso_8601": "2023-04-09T19:02:21.943083Z",
            "url": "https://files.pythonhosted.org/packages/7f/8d/c0699181e0c17582033e7bf0f562152d16a73338d6d7b64d79c4b4c4498c/leapseconds-2023.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-09 19:02:21",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "leapseconds"
}
        
Elapsed time: 0.05562s