adafruit-circuitpython-datetime


Nameadafruit-circuitpython-datetime JSON
Version 1.2.7 PyPI version JSON
download
home_page
SummarySubset of CPython datetime module
upload_time2023-12-09 17:44:04
maintainer
docs_urlNone
author
requires_python
licenseMIT
keywords adafruit blinka circuitpython micropython datetime date time timedelta tzinfo timezone
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Introduction
============

.. image:: https://readthedocs.org/projects/datetime/badge/?version=latest
    :target: https://docs.circuitpython.org/projects/datetime/en/latest/
    :alt: Documentation Status

.. image:: https://raw.githubusercontent.com/adafruit/Adafruit_CircuitPython_Bundle/main/badges/adafruit_discord.svg
    :target: https://adafru.it/discord
    :alt: Discord

.. image:: https://github.com/adafruit/Adafruit_CircuitPython_datetime/workflows/Build%20CI/badge.svg
    :target: https://github.com/adafruit/Adafruit_CircuitPython_datetime/actions
    :alt: Build Status

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
    :target: https://github.com/psf/black
    :alt: Code Style: Black

Basic date and time types. Implements a subset of the `CPython datetime module <https://docs.python.org/3/library/datetime.html>`_.

NOTE: This library has a large memory footprint and is intended for hardware such as the SAMD51, ESP32-S2, and nRF52.

Dependencies
=============
This driver depends on:

* `Adafruit CircuitPython <https://github.com/adafruit/circuitpython>`_

Please ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloading
`the Adafruit library and driver bundle <https://circuitpython.org/libraries>`_.

Installing from PyPI
=====================
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
PyPI <https://pypi.org/project/adafruit-circuitpython-datetime/>`_. To install for current user:

.. code-block:: shell

    pip3 install adafruit-circuitpython-datetime

To install system-wide (this may be required in some cases):

.. code-block:: shell

    sudo pip3 install adafruit-circuitpython-datetime

To install in a virtual environment in your current project:

.. code-block:: shell

    mkdir project-name && cd project-name
    python3 -m venv .venv
    source .venv/bin/activate
    pip3 install adafruit-circuitpython-datetime

Usage Example
=============

.. code-block:: python

    # Example of working with a `datetime` object
    # from https://docs.python.org/3/library/datetime.html#examples-of-usage-datetime
    from adafruit_datetime import datetime, date, time

    # Using datetime.combine()
    d = date(2005, 7, 14)
    print(d)
    t = time(12, 30)
    print(datetime.combine(d, t))

    # Using datetime.now()
    print("Current time (GMT +1):", datetime.now())

    # Using datetime.timetuple() to get tuple of all attributes
    dt = datetime(2006, 11, 21, 16, 30)
    tt = dt.timetuple()
    for it in tt:
        print(it)

    print("Today is: ", dt.ctime())

    iso_date_string = "2020-04-05T05:04:45.752301"
    print("Creating new datetime from ISO Date:", iso_date_string)
    isodate = datetime.fromisoformat(iso_date_string)
    print("Formatted back out as ISO Date: ", isodate.isoformat())


Documentation
=============

API documentation for this library can be found on `Read the Docs <https://docs.circuitpython.org/projects/datetime/en/latest/>`_.

For information on building library documentation, please check out `this guide <https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs#sphinx-5-1>`_.

Contributing
============

Contributions are welcome! Please read our `Code of Conduct
<https://github.com/adafruit/Adafruit_CircuitPython_datetime/blob/main/CODE_OF_CONDUCT.md>`_
before contributing to help this project stay welcoming.

License
=======
See LICENSE/ for details.

Copyright (c) 2001-2021 Python Software Foundation. All rights reserved.

Copyright (c) 2000 BeOpen.com. All rights reserved.

Copyright (c) 1995-2001 Corporation for National Research Initiatives. All rights reserved.

Copyright (c) 1991-1995 Stichting Mathematisch Centrum. All rights reserved.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "adafruit-circuitpython-datetime",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "adafruit,blinka,circuitpython,micropython,datetime,date,time,timedelta,tzinfo,timezone",
    "author": "",
    "author_email": "Adafruit Industries <circuitpython@adafruit.com>",
    "download_url": "https://files.pythonhosted.org/packages/62/b2/8f27fdb0ecfa655b5fc3a4ffbdb188b7fcf43fa5e449d0916734722d184c/adafruit-circuitpython-datetime-1.2.7.tar.gz",
    "platform": null,
    "description": "Introduction\n============\n\n.. image:: https://readthedocs.org/projects/datetime/badge/?version=latest\n    :target: https://docs.circuitpython.org/projects/datetime/en/latest/\n    :alt: Documentation Status\n\n.. image:: https://raw.githubusercontent.com/adafruit/Adafruit_CircuitPython_Bundle/main/badges/adafruit_discord.svg\n    :target: https://adafru.it/discord\n    :alt: Discord\n\n.. image:: https://github.com/adafruit/Adafruit_CircuitPython_datetime/workflows/Build%20CI/badge.svg\n    :target: https://github.com/adafruit/Adafruit_CircuitPython_datetime/actions\n    :alt: Build Status\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n    :target: https://github.com/psf/black\n    :alt: Code Style: Black\n\nBasic date and time types. Implements a subset of the `CPython datetime module <https://docs.python.org/3/library/datetime.html>`_.\n\nNOTE: This library has a large memory footprint and is intended for hardware such as the SAMD51, ESP32-S2, and nRF52.\n\nDependencies\n=============\nThis driver depends on:\n\n* `Adafruit CircuitPython <https://github.com/adafruit/circuitpython>`_\n\nPlease ensure all dependencies are available on the CircuitPython filesystem.\nThis is easily achieved by downloading\n`the Adafruit library and driver bundle <https://circuitpython.org/libraries>`_.\n\nInstalling from PyPI\n=====================\nOn supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from\nPyPI <https://pypi.org/project/adafruit-circuitpython-datetime/>`_. To install for current user:\n\n.. code-block:: shell\n\n    pip3 install adafruit-circuitpython-datetime\n\nTo install system-wide (this may be required in some cases):\n\n.. code-block:: shell\n\n    sudo pip3 install adafruit-circuitpython-datetime\n\nTo install in a virtual environment in your current project:\n\n.. code-block:: shell\n\n    mkdir project-name && cd project-name\n    python3 -m venv .venv\n    source .venv/bin/activate\n    pip3 install adafruit-circuitpython-datetime\n\nUsage Example\n=============\n\n.. code-block:: python\n\n    # Example of working with a `datetime` object\n    # from https://docs.python.org/3/library/datetime.html#examples-of-usage-datetime\n    from adafruit_datetime import datetime, date, time\n\n    # Using datetime.combine()\n    d = date(2005, 7, 14)\n    print(d)\n    t = time(12, 30)\n    print(datetime.combine(d, t))\n\n    # Using datetime.now()\n    print(\"Current time (GMT +1):\", datetime.now())\n\n    # Using datetime.timetuple() to get tuple of all attributes\n    dt = datetime(2006, 11, 21, 16, 30)\n    tt = dt.timetuple()\n    for it in tt:\n        print(it)\n\n    print(\"Today is: \", dt.ctime())\n\n    iso_date_string = \"2020-04-05T05:04:45.752301\"\n    print(\"Creating new datetime from ISO Date:\", iso_date_string)\n    isodate = datetime.fromisoformat(iso_date_string)\n    print(\"Formatted back out as ISO Date: \", isodate.isoformat())\n\n\nDocumentation\n=============\n\nAPI documentation for this library can be found on `Read the Docs <https://docs.circuitpython.org/projects/datetime/en/latest/>`_.\n\nFor information on building library documentation, please check out `this guide <https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs#sphinx-5-1>`_.\n\nContributing\n============\n\nContributions are welcome! Please read our `Code of Conduct\n<https://github.com/adafruit/Adafruit_CircuitPython_datetime/blob/main/CODE_OF_CONDUCT.md>`_\nbefore contributing to help this project stay welcoming.\n\nLicense\n=======\nSee LICENSE/ for details.\n\nCopyright (c) 2001-2021 Python Software Foundation. All rights reserved.\n\nCopyright (c) 2000 BeOpen.com. All rights reserved.\n\nCopyright (c) 1995-2001 Corporation for National Research Initiatives. All rights reserved.\n\nCopyright (c) 1991-1995 Stichting Mathematisch Centrum. All rights reserved.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Subset of CPython datetime module",
    "version": "1.2.7",
    "project_urls": {
        "Homepage": "https://github.com/adafruit/Adafruit_CircuitPython_datetime"
    },
    "split_keywords": [
        "adafruit",
        "blinka",
        "circuitpython",
        "micropython",
        "datetime",
        "date",
        "time",
        "timedelta",
        "tzinfo",
        "timezone"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f64456408bf14a70c4363eed2531bf53486cb60457941fbd91c97e2df206ecbe",
                "md5": "d32182d9fe288db3dd5084f599a0c044",
                "sha256": "150184d13f34e2424e47028049b5aeeea3348cb0a8b306798556cb5f7118138e"
            },
            "downloads": -1,
            "filename": "adafruit_circuitpython_datetime-1.2.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d32182d9fe288db3dd5084f599a0c044",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 17548,
            "upload_time": "2023-12-09T17:44:03",
            "upload_time_iso_8601": "2023-12-09T17:44:03.655173Z",
            "url": "https://files.pythonhosted.org/packages/f6/44/56408bf14a70c4363eed2531bf53486cb60457941fbd91c97e2df206ecbe/adafruit_circuitpython_datetime-1.2.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "62b28f27fdb0ecfa655b5fc3a4ffbdb188b7fcf43fa5e449d0916734722d184c",
                "md5": "c28aa3ddda4f983fe73e3ee171a79509",
                "sha256": "4176cf45a2519dce3a7ad4121d57a9759a1813482b4bea557ace0fcdb9c817cd"
            },
            "downloads": -1,
            "filename": "adafruit-circuitpython-datetime-1.2.7.tar.gz",
            "has_sig": false,
            "md5_digest": "c28aa3ddda4f983fe73e3ee171a79509",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 59459,
            "upload_time": "2023-12-09T17:44:04",
            "upload_time_iso_8601": "2023-12-09T17:44:04.977408Z",
            "url": "https://files.pythonhosted.org/packages/62/b2/8f27fdb0ecfa655b5fc3a4ffbdb188b7fcf43fa5e449d0916734722d184c/adafruit-circuitpython-datetime-1.2.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-09 17:44:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "adafruit",
    "github_project": "Adafruit_CircuitPython_datetime",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "adafruit-circuitpython-datetime"
}
        
Elapsed time: 0.19067s