nagerapi


Namenagerapi JSON
Version 0.3.1 PyPI version JSON
download
home_pagehttps://github.com/meisnate12/NagerAPI
SummaryPython wrapper for Nager API https://date.nager.at/Api
upload_time2024-01-02 19:50:02
maintainer
docs_urlNone
authorNathan Taggart
requires_python>=3.6
licenseMIT License
keywords nagerapi nager wrapper api
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
Welcome to Nager Public Holiday API's documentation!
==========================================================

.. image:: https://img.shields.io/github/actions/workflow/status/meisnate12/NagerAPI/tests.yml?branch=master&style=plastic
    :target: https://app.travis-ci.com/meisnate12/NagerAPI
    :alt: Build Testing

.. image:: https://img.shields.io/codecov/c/github/meisnate12/NagerAPI?color=greenred&style=plastic
    :target: https://codecov.io/gh/meisnate12/NagerAPI
    :alt: Build Coverage

.. image:: https://img.shields.io/readthedocs/nagerapi?style=plastic
    :target: https://nagerapi.metamanager.wiki
    :alt: Read the Docs

.. image:: https://img.shields.io/github/v/release/meisnate12/NagerAPI?style=plastic
    :target: https://github.com/meisnate12/NagerAPI/releases
    :alt: GitHub release (latest by date)

.. image:: https://img.shields.io/pypi/v/NagerAPI?style=plastic
    :target: https://pypi.org/project/nagerapi/
    :alt: PyPI

.. image:: https://img.shields.io/pypi/dm/nagerapi.svg?style=plastic
    :target: https://pypi.org/project/nagerapi/
    :alt: Downloads

.. image:: https://img.shields.io/github/commits-since/meisnate12/NagerAPI/latest?style=plastic
    :target: https://github.com/meisnate12/NagerAPI/commits/master
    :alt: GitHub commits since latest release (by date) for a branch

.. image:: https://img.shields.io/badge/-Sponsor_or_Donate-blueviolet?style=plastic
    :target: https://github.com/sponsors/meisnate12
    :alt: GitHub Sponsor

Overview
----------------------------------------------------------
Unofficial Python bindings for the `Nager Public Holiday API <https://date.nager.at/Api>`_. The goal is to make interaction with the API as easy as possible.


Installation & Documentation
----------------------------------------------------------

.. code-block:: python

    pip install nagerapi

Documentation_ can be found at Read the Docs.

.. _Documentation: https://nagerapi.metamanager.wiki


Connecting to Nager
==========================================================

Getting a NagerObjectAPI Instance
----------------------------------------------------------

To connect to the `Nager Public Holiday API <https://date.nager.at/Api>`_ you use the `~nagerapi.NagerObjectAPI` object.

.. code-block:: python

    from nagerapi import NagerObjectAPI

    nager = NagerObjectAPI()


.. code-block:: python

    import nagerapi

    nager = nagerapi.NagerObjectAPI()

Usage Examples
==========================================================

Example: List all 2022 US Holidays.

In this one we get the ``US`` `~nagerapi.Country` Object and call ``public_holidays`` from that object.

.. code-block:: python

    from nagerapi import NagerObjectAPI

    nager = NagerObjectAPI()
    country = nager.country("US")

    for holiday in country.public_holidays(2022):
        print(f"{holiday.name} is on {holiday.date.strftime('%Y-%m-%d')}")

Alternatively you can call ``public_holidays`` from the `~nagerapi.NagerObjectAPI` object directly providing the country code.

.. code-block:: python

    from nagerapi import NagerObjectAPI

    nager = NagerObjectAPI()

    for holiday in nager.public_holidays(2022, "US"):
        print(f"{holiday.name} is on {holiday.date.strftime('%Y-%m-%d')}")


Hyperlinks
----------------------------------------------------------

* `Nager API Docs <https://date.nager.at/swagger/index.html>`_


Usage & Contributions
----------------------------------------------------------
* Source is available on the `Github Project Page <https://github.com/meisnate12/NagerAPI>`_.
* Contributors to NagerAPI own their own contributions and may distribute that code under
  the `MIT license <https://github.com/meisnate12/NagerAPI/blob/master/LICENSE.txt>`_.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/meisnate12/NagerAPI",
    "name": "nagerapi",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "nagerapi,nager,wrapper,api",
    "author": "Nathan Taggart",
    "author_email": "meisnate12@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/43/84/59d1a5892f0d2e512ebbe971635fd7bfb43098d504d9cbbba617fd44bcac/nagerapi-0.3.1.tar.gz",
    "platform": null,
    "description": "\nWelcome to Nager Public Holiday API's documentation!\n==========================================================\n\n.. image:: https://img.shields.io/github/actions/workflow/status/meisnate12/NagerAPI/tests.yml?branch=master&style=plastic\n    :target: https://app.travis-ci.com/meisnate12/NagerAPI\n    :alt: Build Testing\n\n.. image:: https://img.shields.io/codecov/c/github/meisnate12/NagerAPI?color=greenred&style=plastic\n    :target: https://codecov.io/gh/meisnate12/NagerAPI\n    :alt: Build Coverage\n\n.. image:: https://img.shields.io/readthedocs/nagerapi?style=plastic\n    :target: https://nagerapi.metamanager.wiki\n    :alt: Read the Docs\n\n.. image:: https://img.shields.io/github/v/release/meisnate12/NagerAPI?style=plastic\n    :target: https://github.com/meisnate12/NagerAPI/releases\n    :alt: GitHub release (latest by date)\n\n.. image:: https://img.shields.io/pypi/v/NagerAPI?style=plastic\n    :target: https://pypi.org/project/nagerapi/\n    :alt: PyPI\n\n.. image:: https://img.shields.io/pypi/dm/nagerapi.svg?style=plastic\n    :target: https://pypi.org/project/nagerapi/\n    :alt: Downloads\n\n.. image:: https://img.shields.io/github/commits-since/meisnate12/NagerAPI/latest?style=plastic\n    :target: https://github.com/meisnate12/NagerAPI/commits/master\n    :alt: GitHub commits since latest release (by date) for a branch\n\n.. image:: https://img.shields.io/badge/-Sponsor_or_Donate-blueviolet?style=plastic\n    :target: https://github.com/sponsors/meisnate12\n    :alt: GitHub Sponsor\n\nOverview\n----------------------------------------------------------\nUnofficial Python bindings for the `Nager Public Holiday API <https://date.nager.at/Api>`_. The goal is to make interaction with the API as easy as possible.\n\n\nInstallation & Documentation\n----------------------------------------------------------\n\n.. code-block:: python\n\n    pip install nagerapi\n\nDocumentation_ can be found at Read the Docs.\n\n.. _Documentation: https://nagerapi.metamanager.wiki\n\n\nConnecting to Nager\n==========================================================\n\nGetting a NagerObjectAPI Instance\n----------------------------------------------------------\n\nTo connect to the `Nager Public Holiday API <https://date.nager.at/Api>`_ you use the `~nagerapi.NagerObjectAPI` object.\n\n.. code-block:: python\n\n    from nagerapi import NagerObjectAPI\n\n    nager = NagerObjectAPI()\n\n\n.. code-block:: python\n\n    import nagerapi\n\n    nager = nagerapi.NagerObjectAPI()\n\nUsage Examples\n==========================================================\n\nExample: List all 2022 US Holidays.\n\nIn this one we get the ``US`` `~nagerapi.Country` Object and call ``public_holidays`` from that object.\n\n.. code-block:: python\n\n    from nagerapi import NagerObjectAPI\n\n    nager = NagerObjectAPI()\n    country = nager.country(\"US\")\n\n    for holiday in country.public_holidays(2022):\n        print(f\"{holiday.name} is on {holiday.date.strftime('%Y-%m-%d')}\")\n\nAlternatively you can call ``public_holidays`` from the `~nagerapi.NagerObjectAPI` object directly providing the country code.\n\n.. code-block:: python\n\n    from nagerapi import NagerObjectAPI\n\n    nager = NagerObjectAPI()\n\n    for holiday in nager.public_holidays(2022, \"US\"):\n        print(f\"{holiday.name} is on {holiday.date.strftime('%Y-%m-%d')}\")\n\n\nHyperlinks\n----------------------------------------------------------\n\n* `Nager API Docs <https://date.nager.at/swagger/index.html>`_\n\n\nUsage & Contributions\n----------------------------------------------------------\n* Source is available on the `Github Project Page <https://github.com/meisnate12/NagerAPI>`_.\n* Contributors to NagerAPI own their own contributions and may distribute that code under\n  the `MIT license <https://github.com/meisnate12/NagerAPI/blob/master/LICENSE.txt>`_.\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "Python wrapper for Nager API https://date.nager.at/Api",
    "version": "0.3.1",
    "project_urls": {
        "Documentation": "https://nagerapi.metamanager.wiki",
        "Funding": "https://github.com/sponsors/meisnate12",
        "Homepage": "https://github.com/meisnate12/NagerAPI",
        "Issues": "https://github.com/meisnate12/NagerAPI/issues",
        "Source": "https://github.com/meisnate12/NagerAPI"
    },
    "split_keywords": [
        "nagerapi",
        "nager",
        "wrapper",
        "api"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "278b7febf08093ae07e653df9b11f553f9997120753567436a3a9ed5dcec5926",
                "md5": "ef6087d3b8ed27864b2896efb1eb4771",
                "sha256": "0a1518a52cde15f43969ce605496355103e3bbad56bceea335c445b5e9a5e2ee"
            },
            "downloads": -1,
            "filename": "nagerapi-0.3.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ef6087d3b8ed27864b2896efb1eb4771",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 6678,
            "upload_time": "2024-01-02T19:50:00",
            "upload_time_iso_8601": "2024-01-02T19:50:00.324502Z",
            "url": "https://files.pythonhosted.org/packages/27/8b/7febf08093ae07e653df9b11f553f9997120753567436a3a9ed5dcec5926/nagerapi-0.3.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "438459d1a5892f0d2e512ebbe971635fd7bfb43098d504d9cbbba617fd44bcac",
                "md5": "118665bc442bbcef32ca6bb63396eb50",
                "sha256": "71a50e39df221c2e7778276df48073bff99185fd70e5092cea64015aa502be04"
            },
            "downloads": -1,
            "filename": "nagerapi-0.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "118665bc442bbcef32ca6bb63396eb50",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 7740,
            "upload_time": "2024-01-02T19:50:02",
            "upload_time_iso_8601": "2024-01-02T19:50:02.882455Z",
            "url": "https://files.pythonhosted.org/packages/43/84/59d1a5892f0d2e512ebbe971635fd7bfb43098d504d9cbbba617fd44bcac/nagerapi-0.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-02 19:50:02",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "meisnate12",
    "github_project": "NagerAPI",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "nagerapi"
}
        
Elapsed time: 0.18722s