serialdatalog


Nameserialdatalog JSON
Version 0.1.7 PyPI version JSON
download
home_page
SummaryLogs data coming from a serial port
upload_time2023-05-31 10:46:31
maintainer
docs_urlNone
authorAlex
requires_python>=3.10,<4.0
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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.

```python
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
)
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "serialdatalog",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Alex",
    "author_email": "adrysdale@protonmail.com",
    "download_url": "https://files.pythonhosted.org/packages/2d/af/9a0a17c3df148dd87da468bb1dedf4d094de1d84152fa8a5231b4af0943f/serialdatalog-0.1.7.tar.gz",
    "platform": null,
    "description": "# Serial Data Logger\n\nA 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.\nSerial data logger expects the serial inputs to be comma separated.\n\n## Install\n\n```\npip install serialdatalog\n```\n\n## Usage\n\nHere's an example using a Finometer pressure sensor.\n\n```python\nimport logging\nimport serialdatalog as sdl\n\nlogging.basicConfig(level=logging.INFO)\n# table_dict is formed of key : value pairs consisting of:\n#   sql_header : sql_data_type\n# If the number of headers is different to that read from the serial input then the input is not\n# logged.\ntable_dict = {\n    \"Elapsed_Time\" : \"REAL\",\n    \"Finger_Pressure\" : \"REAL\",\n    \"Height\" : \"REAL\",\n    \"Arm_Pressure\" : \"REAL\",\n    \"Finger_Plethysmogram\" : \"REAL\",\n}\nsdl.logger(\n    table_dict,\n    source=\"/dev/ttyACM0\",\n    dest=\"datalog.sqlite3\",\n    encoding='utf-8',\n    timeout=10\n)\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Logs data coming from a serial port",
    "version": "0.1.7",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a71f77f082f969eafdcd87044da8d5adc807fcec836beeb2196c4585dd568cd8",
                "md5": "33e450abc98c073d0c84b87c79341f03",
                "sha256": "0643362ac4cdc8670084c305eaa0bf670b172281e603719c6a970697993c7f48"
            },
            "downloads": -1,
            "filename": "serialdatalog-0.1.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "33e450abc98c073d0c84b87c79341f03",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10,<4.0",
            "size": 3691,
            "upload_time": "2023-05-31T10:46:29",
            "upload_time_iso_8601": "2023-05-31T10:46:29.295980Z",
            "url": "https://files.pythonhosted.org/packages/a7/1f/77f082f969eafdcd87044da8d5adc807fcec836beeb2196c4585dd568cd8/serialdatalog-0.1.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2daf9a0a17c3df148dd87da468bb1dedf4d094de1d84152fa8a5231b4af0943f",
                "md5": "1b8f9b9a18efe314188140fc129b22a7",
                "sha256": "ba82ce2b12feb9fbebc397c72b0f14da5cea4458ef3c0497fcadaeec02a06761"
            },
            "downloads": -1,
            "filename": "serialdatalog-0.1.7.tar.gz",
            "has_sig": false,
            "md5_digest": "1b8f9b9a18efe314188140fc129b22a7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10,<4.0",
            "size": 3099,
            "upload_time": "2023-05-31T10:46:31",
            "upload_time_iso_8601": "2023-05-31T10:46:31.150565Z",
            "url": "https://files.pythonhosted.org/packages/2d/af/9a0a17c3df148dd87da468bb1dedf4d094de1d84152fa8a5231b4af0943f/serialdatalog-0.1.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-31 10:46:31",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "serialdatalog"
}
        
Elapsed time: 0.13361s