Skip to main content

Python's itertools for CircuitPython

Project description

Introduction

Documentation Status Discord Build Status Code Style: Ruff

Python’s itertools for CircuitPython

Dependencies

This driver depends on:

Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading the Adafruit library and driver bundle.

Usage Example

 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.

For information on building library documentation, please check out this guide.

Contributing

Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

adafruit_circuitpython_itertools-2.1.6.tar.gz (35.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file adafruit_circuitpython_itertools-2.1.6.tar.gz.

File metadata

File hashes

Hashes for adafruit_circuitpython_itertools-2.1.6.tar.gz
Algorithm Hash digest
SHA256 9a0c6f7fe4e83f3f1bd8af88e9245558c25796eb6888740fa71b342f31cb4b3c
MD5 2541a875e4c0ecad0118b93d1c9c216c
BLAKE2b-256 e43a5e1d41229a649e7d6c7ba9edccbf8a610c31b46b5eafca796ec45afe1bbf

See more details on using hashes here.

File details

Details for the file adafruit_circuitpython_itertools-2.1.6-py3-none-any.whl.

File metadata

File hashes

Hashes for adafruit_circuitpython_itertools-2.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 4e62355d769cd612f0512ca367771a23911bce5f8b474224794318d94fbd0e29
MD5 f90b3be65055d2acb6126d140d24610f
BLAKE2b-256 f67d5829d70fe1e60d5a2b9e7413c0675d1bb16d3aa66c97cfbe4af6ed58e300

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page