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.7.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.7.tar.gz.

File metadata

File hashes

Hashes for adafruit_circuitpython_itertools-2.1.7.tar.gz
Algorithm Hash digest
SHA256 2752ead09e3f95381eaf75ee88eb8e2e6224bed5ad76f434724ff20d9096f47e
MD5 2412336c906bed6d2c9fe8a4aab4e2de
BLAKE2b-256 e47f220fb26073c7e6ed20b3023a7ebedfbc999ea8fc58b917f446376e369a96

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adafruit_circuitpython_itertools-2.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 59f6afd43849cb7801917dcbf446d8fcceb8f98dd8df8fa2bb97bd9cca231dcb
MD5 5ad073e55b40b3fe53864164c60f31f9
BLAKE2b-256 d8f2faa60697bdb0cfe408dcff5c93ba774075c8a8dc665a7a6f22aa837ed5a0

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