Unofficial library to handle data from a Technische Alternative D-LOGG device.
Project description
Unofficial python package to read data from a Technische Alternative D-LOGG device (using dlogg-driver) and upload it to a database.
Installation
sudo apt install libmysqlclient-dev
pip install dlogg-db
Usage
from dlogg_driver import DLoggDevice
from dlogg_db import DLoggDbUpload, DLoggDbDownload
# upload
with DLoggDevice("/dev/ttyUSB0") as device:
with DLoggDbUpload('db-host', 3306, 'db-name', 'db-user', 'db-pw') as upload:
upload.update_tables_format()
upload.insert_current_data(device.get_current_data())
# download
with DLoggDbDownload('db-host', 3306, 'db-name', 'db-user', 'db-pw') as download:
end = datetime.datetime.utcnow()
start = end - datetime.timedelta(minutes=10)
print download.fetch_data_range(start, end)
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
dlogg-db-0.3.1.tar.gz
(4.3 kB
view details)
Built Distribution
File details
Details for the file dlogg-db-0.3.1.tar.gz
.
File metadata
- Download URL: dlogg-db-0.3.1.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 573b619b67451301c9cad5fb68f1a1bd9cd7a7cfc49d79c90165473822198490 |
|
MD5 | 5ef23ee4c54f3af672eb3cf681e8e8eb |
|
BLAKE2b-256 | 1703571ebad1dc284df0547b0bca0e924de73e26760869e79fbaa83a36f25084 |
File details
Details for the file dlogg_db-0.3.1-py2-none-any.whl
.
File metadata
- Download URL: dlogg_db-0.3.1-py2-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e2d17fb20a84257001a8bd0cca207c88993aa53857436281d8dd389b764fed2 |
|
MD5 | 6f46fc0a9d8f0756db47952ae0b8b951 |
|
BLAKE2b-256 | 612cc567373ef7c1ccc59ff8a4de58ced8a808878a23377225fc4f66decc43c5 |