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

File metadata

File hashes

Hashes for adafruit_circuitpython_itertools-2.1.8.tar.gz
Algorithm Hash digest
SHA256 ecc831c1872118782aaf069fc732579ea7f7aac89dd04bcfcda75cc58860f71b
MD5 a8f4fed908bd0b3209702ca677f46854
BLAKE2b-256 142ec7e8d648343eda5ff2a9c3b21adfb74284ece713941a460d238f5519bbdf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adafruit_circuitpython_itertools-2.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 e46cba17b287db6917c87c852ad7fb4fd887649995731e5df8910e2ecd5983c0
MD5 40285208f23324f90414c42b1b14d954
BLAKE2b-256 3501716dc0ac0b6cc6470f545d88be2adcfe0d7acba44b5ef14d9a2456db0e7c

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