adafruit / Adafruit_CircuitPython_AdafruitIO

Adafruit IO for CircuitPython
http://io.adafruit.com
MIT License
49 stars 33 forks source link

Add list of dicts support to send_batch_data #125

Closed tyeth closed 1 month ago

tyeth commented 1 month ago

This adds support for passing a list of dicts to send_batch_data, previously it only accepted namedtuple-like things (requiring_asdict() method). To avoid breaking people who use this uncommon method, the implementation switches on whether a list of dicts was passed, or not (namedtuples).

An example has been added to allow people to quickly test it via cpython. It generates 5 datapoints at 1second intervals in the past then batch sends and shows a url to view the feed graph/data.

github-actions[bot] commented 1 month ago

👋 Thanks for this pull request! Unfortunately, it looks like the automated continuous integration (CI) test(s) failed. These can be tricky to fix so we've written a guide on how to fix them locally. It has pages about running pre-commit locally and another about building the docs locally with sphinx. Thanks for contributing to CircuitPython! If you have more questions, feel free to join the Adafruit Discord and post in #circuitpython-dev.

tyeth commented 1 month ago

@brentru this is ready for review