Skip to main content

CircuitPython helper library for working with CSV files

Project description

Introduction

Documentation Status Discord Build Status Code Style: ruff License: MIT License: PSF-2.0 Maintained: Yes

CircuitPython helper library for working with CSV files

Dependencies

This driver depends on:

You can find which Adafruit boards have the re library here.

Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading the Adafruit library and driver bundle or individual libraries can be installed using circup.

Installing to a Connected CircuitPython Device with Circup

Make sure that you have circup installed in your Python environment. Install it with the following command if necessary:

pip3 install circup

With circup installed and your CircuitPython device connected use the following command to install:

circup install circuitpython-csv

Or the following command to update an existing version:

circup update

Installing from PyPI

On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally from PyPI. To install for current user:

pip3 install circuitpython-csv

To install system-wide (this may be required in some cases):

sudo pip3 install circuitpython-csv

To install in a virtual environment in your current project:

mkdir project-name && cd project-name
python3 -m venv .venv
source .venv/bin/activate
pip3 install circuitpython-csv

Usage Example

import board
import sdcardio
import storage
import circuitpython_csv as csv

# Initialize SD card
spi = board.SPI()
sdcard = sdcardio.SDCard(spi, board.D10)
vfs = storage.VfsFat(sdcard)
storage.mount(vfs, "/sd")

# Write the CSV file!
with open("/sd/testwrite.csv", mode="w", encoding="utf-8") as writablefile:
    csvwriter = csv.writer(writablefile)
    csvwriter.writerow(["I", "love", "CircuitPython", "!"])
    csvwriter.writerow(["Spam"] * 3)

Contributing

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

Documentation

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

Attribution

Some code contained here is ported from CPython, dual licensed by the Python Software Foundation under the PSF License verion 2 and the Zero-Clause BSD license.

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

circuitpython_csv-2.0.3.post0.tar.gz (25.1 kB view details)

Uploaded Source

Built Distribution

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

circuitpython_csv-2.0.3.post0-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file circuitpython_csv-2.0.3.post0.tar.gz.

File metadata

  • Download URL: circuitpython_csv-2.0.3.post0.tar.gz
  • Upload date:
  • Size: 25.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for circuitpython_csv-2.0.3.post0.tar.gz
Algorithm Hash digest
SHA256 99da21af314bba0ecde6167e7a01e9e8ef719813b872002b0ad035334d16d923
MD5 06bd5b3722d5addde7debe8bd0456852
BLAKE2b-256 e60c03087906fa31f95505f52c52ab95d3b88aa84decf6a2f22b39ad86b334bd

See more details on using hashes here.

File details

Details for the file circuitpython_csv-2.0.3.post0-py3-none-any.whl.

File metadata

File hashes

Hashes for circuitpython_csv-2.0.3.post0-py3-none-any.whl
Algorithm Hash digest
SHA256 c1666d7a075f96e4f44e9a2cdb3209b5d6b9bc5e2b1fce02f22f0bd8f2393f71
MD5 bb3ee404dd233a0491b42e252e3eb52b
BLAKE2b-256 bc27dc95ff9c20c0718638b5da3d726930d755fa25f8329cc68d57a626061db5

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