{ "info": { "author": "Adafruit Industries", "author_email": "circuitpython@adafruit.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Libraries", "Topic :: System :: Hardware" ], "description": "Introduction\n============\n\n.. image:: https://readthedocs.org/projects/adafruit-circuitpython-ds1307/badge/?version=latest\n :target: https://circuitpython.readthedocs.io/projects/ds1307/en/latest/\n :alt: Documentation Status\n\n.. image :: https://img.shields.io/discord/327254708534116352.svg\n :target: https://discord.gg/nBQh6qu\n :alt: Discord\n\n.. image:: https://travis-ci.com/adafruit/Adafruit_CircuitPython_DS1307.svg?branch=master\n :target: https://travis-ci.com/adafruit/Adafruit_CircuitPython_DS1307\n :alt: Build Status\n\nThis is a great battery-backed real time clock (RTC) that allows your\nmicrocontroller project to keep track of time even if it is reprogrammed,\nor if the power is lost. Perfect for datalogging, clock-building,\ntime stamping, timers and alarms, etc. The DS1307 is the most popular\nRTC - but it requires 5V power to work.\n\nThe DS1307 is simple and inexpensive but not a high precision device. It may\nlose or gain up to two seconds a day. For a high-precision, temperature\ncompensated alternative, please check out the\n`DS3231 precision RTC `_.\nIf you do not need a DS1307, or you need a 3.3V-power/logic capable RTC\nplease check out our affordable\n`PCF8523 RTC breakout `_.\n\n.. image:: ../docs/_static/3296-00.jpg\n :alt: DS1307\n\nDependencies\n=============\nThis driver depends on:\n\n* `Adafruit CircuitPython `_\n* `Bus Device `_\n* `Register `_\n\nPlease ensure all dependencies are available on the CircuitPython filesystem.\nThis is easily achieved by downloading\n`the Adafruit library and driver bundle `_.\n\nInstalling from PyPI\n=====================\nOn supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from\nPyPI `_. To install for current user:\n\n.. code-block:: shell\n\n pip3 install adafruit-circuitpython-ds1307\n\nTo install system-wide (this may be required in some cases):\n\n.. code-block:: shell\n\n sudo pip3 install adafruit-circuitpython-ds1307\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 .env\n source .env/bin/activate\n pip3 install adafruit-circuitpython-ds1307\n\nUsage Notes\n===========\n\nOf course, you must import the library to use it:\n\n.. code:: python\n\n import busio\n import adafruit_ds1307\n import time\n\nAll the Adafruit RTC libraries take an instantiated and active I2C object\n(from the ``busio`` library) as an argument to their constructor. The way to\ncreate an I2C object depends on the board you are using. For boards with labeled\nSCL and SDA pins, you can:\n\n.. code:: python\n\n from board import *\n\nYou can also use pins defined by the onboard ``microcontroller`` through the\n``microcontroller.pin`` module.\n\nNow, to initialize the I2C bus:\n\n.. code:: python\n\n myI2C = busio.I2C(SCL, SDA)\n\nOnce you have created the I2C interface object, you can use it to instantiate\nthe RTC object:\n\n.. code:: python\n\n rtc = adafruit_ds1307.DS1307(myI2C)\n\nTo set the time, you need to set ``datetime`` to a `time.struct_time` object:\n\n.. code:: python\n\n rtc.datetime = time.struct_time((2017,1,9,15,6,0,0,9,-1))\n\nAfter the RTC is set, you retrieve the time by reading the ``datetime``\nattribute and access the standard attributes of a struct_time such as ``tm_year``,\n``tm_hour`` and ``tm_min``.\n\n.. code:: python\n\n t = rtc.datetime\n print(t)\n print(t.tm_hour, t.tm_min)\n\nContributing\n============\n\nContributions are welcome! Please read our `Code of Conduct\n`_\nbefore contributing to help this project stay welcoming.\n\nBuilding locally\n================\n\nTo build this library locally you'll need to install the\n`circuitpython-build-tools `_ package.\n\n.. code-block:: shell\n\n python3 -m venv .env\n source .env/bin/activate\n pip install circuitpython-build-tools\n\nOnce installed, make sure you are in the virtual environment:\n\n.. code-block:: shell\n\n source .env/bin/activate\n\nThen run the build:\n\n.. code-block:: shell\n\n circuitpython-build-bundles --filename_prefix adafruit-circuitpython-ds1307 --library_location .\n\nSphinx documentation\n-----------------------\n\nSphinx is used to build the documentation based on rST files and comments in the code. First,\ninstall dependencies (feel free to reuse the virtual environment from above):\n\n.. code-block:: shell\n\n python3 -m venv .env\n source .env/bin/activate\n pip install Sphinx sphinx-rtd-theme\n\nNow, once you have the virtual environment activated:\n\n.. code-block:: shell\n\n cd docs\n sphinx-build -E -W -b html . _build/html\n\nThis will output the documentation to ``docs/_build/html``. Open the index.html in your browser to\nview them. It will also (due to -W) error out on any warning like Travis will. This is a good way to\nlocally verify it will pass.", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/adafruit/Adafruit_CircuitPython_DS1307", "keywords": "adafruit real time clock rtc breakout hardware micropython circuitpython", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "adafruit-circuitpython-ds1307", "package_url": "https://pypi.org/project/adafruit-circuitpython-ds1307/", "platform": "", "project_url": "https://pypi.org/project/adafruit-circuitpython-ds1307/", "project_urls": { "Homepage": "https://github.com/adafruit/Adafruit_CircuitPython_DS1307" }, "release_url": "https://pypi.org/project/adafruit-circuitpython-ds1307/2.0.1/", "requires_dist": null, "requires_python": "", "summary": "CircuitPython library for DS1307 real time clock.", "version": "2.0.1" }, "last_serial": 5881249, "releases": { "1.3.0": [ { "comment_text": "", "digests": { "md5": "209108379526978f362a2975a88fd667", "sha256": "76ccb15c3709f1948baf25bda5d3ca480541212c03abe906db43e28cc81b1ac2" }, "downloads": -1, "filename": "adafruit-circuitpython-ds1307-1.3.0.tar.gz", "has_sig": false, "md5_digest": "209108379526978f362a2975a88fd667", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 273261, "upload_time": "2018-08-04T00:07:35", "url": "https://files.pythonhosted.org/packages/50/76/5f27767739d995700f52f9da54a5cd9167fb0543bbb8d8a01ec62b177bae/adafruit-circuitpython-ds1307-1.3.0.tar.gz" } ], "1.3.1": [ { "comment_text": "", "digests": { "md5": "19b401d021c34f4b7639e97bb89571de", "sha256": "5e5f55801f17d35d6d3b343cc686ce2e0bb62583f31e03b472a3bf8d2db1a219" }, "downloads": -1, "filename": "adafruit-circuitpython-ds1307-1.3.1.tar.gz", "has_sig": false, "md5_digest": "19b401d021c34f4b7639e97bb89571de", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 273264, "upload_time": "2018-11-12T17:19:30", "url": "https://files.pythonhosted.org/packages/ca/58/67a8745b23acdb9c3760a8d06836dc03b23535f6791b97620b36d96ab346/adafruit-circuitpython-ds1307-1.3.1.tar.gz" } ], "1.3.2": [ { "comment_text": "", "digests": { "md5": "e465113c16fb0d1e2d182a1a08561e30", "sha256": "91ed263163a29f5cca6e7bfa3f9d233e5d2b267ec6ffe34b08d2e1848adac64c" }, "downloads": -1, "filename": "adafruit-circuitpython-ds1307-1.3.2.tar.gz", "has_sig": false, "md5_digest": "e465113c16fb0d1e2d182a1a08561e30", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 271105, "upload_time": "2018-12-29T00:11:54", "url": "https://files.pythonhosted.org/packages/d3/ab/9780103b76f5b28d33fb6cf666dfd83bff5ef1cf4bd61b6226a56a193a4b/adafruit-circuitpython-ds1307-1.3.2.tar.gz" } ], "1.3.3": [ { "comment_text": "", "digests": { "md5": "ec0a764a916fbfe6b1019fb984ab6d61", "sha256": "92bba29e43a8f445666697b6b13ef8c8ca805ebb29db61a22dd4a31b2988ac3a" }, "downloads": -1, "filename": "adafruit-circuitpython-ds1307-1.3.3.tar.gz", "has_sig": false, "md5_digest": "ec0a764a916fbfe6b1019fb984ab6d61", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 271111, "upload_time": "2019-02-25T22:17:42", "url": "https://files.pythonhosted.org/packages/d4/34/271f314be41167a0a7f0a55cb405c672b01663a5dc5eb5bef3fdeae4edd0/adafruit-circuitpython-ds1307-1.3.3.tar.gz" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "55f6f8aae95919fffde3d601018f3bf8", "sha256": "6f30069c9a0b51e6d5769a0aa2488d9b6fe8a6f2b9ea32cb69d182c49dc61916" }, "downloads": -1, "filename": "adafruit-circuitpython-ds1307-2.0.0.tar.gz", "has_sig": false, "md5_digest": "55f6f8aae95919fffde3d601018f3bf8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 271056, "upload_time": "2019-08-27T18:23:50", "url": "https://files.pythonhosted.org/packages/b2/3c/42f5aee22ebe4a3071df497ce0fa842ddeca12a27a054c0bf33c8a794469/adafruit-circuitpython-ds1307-2.0.0.tar.gz" } ], "2.0.1": [ { "comment_text": "", "digests": { "md5": "7a5df924f5d783c8879c939480d56aa5", "sha256": "996bd50fb7179c223326b82294f61c44fe084bd729565c459130c1472ed8a0cc" }, "downloads": -1, "filename": "adafruit-circuitpython-ds1307-2.0.1.tar.gz", "has_sig": false, "md5_digest": "7a5df924f5d783c8879c939480d56aa5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 271396, "upload_time": "2019-09-24T18:20:23", "url": "https://files.pythonhosted.org/packages/cf/d4/12b9dfd55c8f01355ce1899badbbf44aa5d0f8170e5629d6bde9866c6126/adafruit-circuitpython-ds1307-2.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7a5df924f5d783c8879c939480d56aa5", "sha256": "996bd50fb7179c223326b82294f61c44fe084bd729565c459130c1472ed8a0cc" }, "downloads": -1, "filename": "adafruit-circuitpython-ds1307-2.0.1.tar.gz", "has_sig": false, "md5_digest": "7a5df924f5d783c8879c939480d56aa5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 271396, "upload_time": "2019-09-24T18:20:23", "url": "https://files.pythonhosted.org/packages/cf/d4/12b9dfd55c8f01355ce1899badbbf44aa5d0f8170e5629d6bde9866c6126/adafruit-circuitpython-ds1307-2.0.1.tar.gz" } ] }