Introduction
============
.. image:: https://readthedocs.org/projects/adafruit-circuitpython-itertools/badge/?version=latest
:target: https://docs.circuitpython.org/projects/itertools/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_IterTools/workflows/Build%20CI/badge.svg
:target: https://github.com/adafruit/Adafruit_CircuitPython_IterTools/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
Python's itertools for CircuitPython
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://github.com/adafruit/Adafruit_CircuitPython_Bundle>`_.
Usage Example
=============
.. code-block:: python
import time
import board
import busio
import adafruit_si7021
from adafruit_itertools.adafruit_itertools import count
from adafruit_itertools.adafruit_itertools_extras import repeatfunc
i2c = busio.I2C(board.SCL, board.SDA)
sensor = adafruit_si7021.SI7021(i2c)
def read_temperature():
return sensor.temperature
def now():
return time.monotonic()
datapoints = zip(count(1), repeatfunc(now), map(int, repeatfunc(read_temperature)))
while True:
print(next(datapoints))
time.sleep(20.0)
Documentation
=============
API documentation for this library can be found on `Read the Docs <https://docs.circuitpython.org/projects/itertools/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_itertools/blob/main/CODE_OF_CONDUCT.md>`_
before contributing to help this project stay welcoming.
Raw data
{
"_id": null,
"home_page": null,
"name": "adafruit-circuitpython-itertools",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "adafruit, itertools, cpython, hardware, micropython, circuitpython",
"author": null,
"author_email": "Adafruit Industries <circuitpython@adafruit.com>",
"download_url": "https://files.pythonhosted.org/packages/43/d8/05bbf01af340382bcbba346775c63fa6d98f7706e737b40031c6bb929b68/adafruit_circuitpython_itertools-2.1.1.tar.gz",
"platform": null,
"description": "Introduction\n============\n\n.. image:: https://readthedocs.org/projects/adafruit-circuitpython-itertools/badge/?version=latest\n :target: https://docs.circuitpython.org/projects/itertools/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_IterTools/workflows/Build%20CI/badge.svg\n :target: https://github.com/adafruit/Adafruit_CircuitPython_IterTools/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\nPython's itertools for CircuitPython\n\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://github.com/adafruit/Adafruit_CircuitPython_Bundle>`_.\n\n\nUsage Example\n=============\n\n.. code-block:: python\n\n import time\n import board\n import busio\n import adafruit_si7021\n from adafruit_itertools.adafruit_itertools import count\n from adafruit_itertools.adafruit_itertools_extras import repeatfunc\n\n i2c = busio.I2C(board.SCL, board.SDA)\n sensor = adafruit_si7021.SI7021(i2c)\n\n def read_temperature():\n return sensor.temperature\n\n def now():\n return time.monotonic()\n\n datapoints = zip(count(1), repeatfunc(now), map(int, repeatfunc(read_temperature)))\n\n while True:\n print(next(datapoints))\n time.sleep(20.0)\n\nDocumentation\n=============\n\nAPI documentation for this library can be found on `Read the Docs <https://docs.circuitpython.org/projects/itertools/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_itertools/blob/main/CODE_OF_CONDUCT.md>`_\nbefore contributing to help this project stay welcoming.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python's itertools for CircuitPython",
"version": "2.1.1",
"project_urls": {
"Homepage": "https://github.com/adafruit/Adafruit_CircuitPython_IterTools"
},
"split_keywords": [
"adafruit",
" itertools",
" cpython",
" hardware",
" micropython",
" circuitpython"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5b9fd5b3cc6e751b2992256a8f79e28f76316096a75f731432d3cac23192606e",
"md5": "3dcca7afcb708b1160d63bfd37e64a97",
"sha256": "68dd45f0925d85919bbed580bc2d4990d63780aaa8b89a287d5eda399f0e9764"
},
"downloads": -1,
"filename": "adafruit_circuitpython_itertools-2.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3dcca7afcb708b1160d63bfd37e64a97",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 13577,
"upload_time": "2024-04-29T15:51:33",
"upload_time_iso_8601": "2024-04-29T15:51:33.030507Z",
"url": "https://files.pythonhosted.org/packages/5b/9f/d5b3cc6e751b2992256a8f79e28f76316096a75f731432d3cac23192606e/adafruit_circuitpython_itertools-2.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "43d805bbf01af340382bcbba346775c63fa6d98f7706e737b40031c6bb929b68",
"md5": "d784d5fc31053a3c9ece7aa1e7186340",
"sha256": "468d193ced50f3402d3d1f8d5ee516be1e32cae647fc2de8b266a512c66afba3"
},
"downloads": -1,
"filename": "adafruit_circuitpython_itertools-2.1.1.tar.gz",
"has_sig": false,
"md5_digest": "d784d5fc31053a3c9ece7aa1e7186340",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 38458,
"upload_time": "2024-04-29T15:51:34",
"upload_time_iso_8601": "2024-04-29T15:51:34.381761Z",
"url": "https://files.pythonhosted.org/packages/43/d8/05bbf01af340382bcbba346775c63fa6d98f7706e737b40031c6bb929b68/adafruit_circuitpython_itertools-2.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-29 15:51:34",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "adafruit",
"github_project": "Adafruit_CircuitPython_IterTools",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "adafruit-circuitpython-itertools"
}