Skip to main content

Serial Data Logger

A simple python script that logs the input received from a serial (USB) input to an SQLite database along with logging the time stamp (in the format YYMMDDHHMMSS) of the received message. Serial data logger expects the serial inputs to be comma separated.

Install

pip install serialdatalog

Usage

Here's an example using a Finometer pressure sensor.

import logging
import serialdatalog as sdl

logging.basicConfig(level=logging.INFO)
# table_dict is formed of key : value pairs consisting of:
#   sql_header : sql_data_type
# If the number of headers is different to that read from the serial input then the input is not
# logged.
table_dict = {
    "Elapsed_Time" : "REAL",
    "Finger_Pressure" : "REAL",
    "Height" : "REAL",
    "Arm_Pressure" : "REAL",
    "Finger_Plethysmogram" : "REAL",
}
sdl.logger(
    table_dict,
    source="/dev/ttyACM0",
    dest="datalog.sqlite3",
    encoding='utf-8',
    timeout=10
)

Metadata

Release files for serialdatalog 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for serialdatalog 0.1.7
File Size Uploaded Provenance Actions
serialdatalog-0.1.7.tar.gz 3.1 kB Without provenance Details for serialdatalog-0.1.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for serialdatalog 0.1.7
File Interpreter ABI Platform Actions
serialdatalog-0.1.7-py3-none-any.whl Python 3 none any Details for serialdatalog-0.1.7-py3-none-any.whl

Total release size: 6.8 kB

Release files / serialdatalog-0.1.7.tar.gz

Download URL serialdatalog-0.1.7.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
ba82ce2b12feb9fbebc397c72b0f14da5cea4458ef3c0497fcadaeec02a06761
BLAKE2b-256 checksum
How to use checksums
2daf9a0a17c3df148dd87da468bb1dedf4d094de1d84152fa8a5231b4af0943f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.0 CPython/3.10.10 Linux/6.1.27-gentoo-dist

Release files / serialdatalog-0.1.7-py3-none-any.whl

Download URL serialdatalog-0.1.7-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0643362ac4cdc8670084c305eaa0bf670b172281e603719c6a970697993c7f48
BLAKE2b-256 checksum
How to use checksums
a71f77f082f969eafdcd87044da8d5adc807fcec836beeb2196c4585dd568cd8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.0 CPython/3.10.10 Linux/6.1.27-gentoo-dist

Security for serialdatalog 0.1.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page