carconnectivity-plugin-database 0.1a4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of carconnectivity-plugin-database might be problematic. Click here for more details.
- carconnectivity_plugin_database-0.1a4/.flake8 +2 -0
- carconnectivity_plugin_database-0.1a4/.github/ISSUE_TEMPLATE/bug_report.md +33 -0
- carconnectivity_plugin_database-0.1a4/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- carconnectivity_plugin_database-0.1a4/.github/dependabot.yml +7 -0
- carconnectivity_plugin_database-0.1a4/.github/workflows/build.yml +63 -0
- carconnectivity_plugin_database-0.1a4/.github/workflows/build_and_publish.yml +37 -0
- carconnectivity_plugin_database-0.1a4/.github/workflows/codeql-analysis.yml +58 -0
- carconnectivity_plugin_database-0.1a4/.gitignore +132 -0
- carconnectivity_plugin_database-0.1a4/LICENSE +21 -0
- carconnectivity_plugin_database-0.1a4/Makefile +18 -0
- carconnectivity_plugin_database-0.1a4/PKG-INFO +74 -0
- carconnectivity_plugin_database-0.1a4/README.md +46 -0
- carconnectivity_plugin_database-0.1a4/doc/Config.md +66 -0
- carconnectivity_plugin_database-0.1a4/pyproject.toml +56 -0
- carconnectivity_plugin_database-0.1a4/setup.cfg +4 -0
- carconnectivity_plugin_database-0.1a4/setup_requirements.txt +7 -0
- carconnectivity_plugin_database-0.1a4/src/carconnectivity_database/__init__.py +0 -0
- carconnectivity_plugin_database-0.1a4/src/carconnectivity_database/carconnectivity_database_base.py +26 -0
- carconnectivity_plugin_database-0.1a4/src/carconnectivity_plugin_database.egg-info/PKG-INFO +74 -0
- carconnectivity_plugin_database-0.1a4/src/carconnectivity_plugin_database.egg-info/SOURCES.txt +49 -0
- carconnectivity_plugin_database-0.1a4/src/carconnectivity_plugin_database.egg-info/dependency_links.txt +1 -0
- carconnectivity_plugin_database-0.1a4/src/carconnectivity_plugin_database.egg-info/entry_points.txt +2 -0
- carconnectivity_plugin_database-0.1a4/src/carconnectivity_plugin_database.egg-info/requires.txt +5 -0
- carconnectivity_plugin_database-0.1a4/src/carconnectivity_plugin_database.egg-info/top_level.txt +2 -0
- carconnectivity_plugin_database-0.1a4/src/carconnectivity_plugins/database/__init__.py +0 -0
- carconnectivity_plugin_database-0.1a4/src/carconnectivity_plugins/database/_version.py +34 -0
- carconnectivity_plugin_database-0.1a4/src/carconnectivity_plugins/database/agents/base_agent.py +2 -0
- carconnectivity_plugin_database-0.1a4/src/carconnectivity_plugins/database/agents/drive_state_agent.py +71 -0
- carconnectivity_plugin_database-0.1a4/src/carconnectivity_plugins/database/agents/state_agent.py +94 -0
- carconnectivity_plugin_database-0.1a4/src/carconnectivity_plugins/database/model/__init__.py +10 -0
- carconnectivity_plugin_database-0.1a4/src/carconnectivity_plugins/database/model/alembic.ini +100 -0
- carconnectivity_plugin_database-0.1a4/src/carconnectivity_plugins/database/model/base.py +4 -0
- carconnectivity_plugin_database-0.1a4/src/carconnectivity_plugins/database/model/carconnectivity_schema/README +1 -0
- carconnectivity_plugin_database-0.1a4/src/carconnectivity_plugins/database/model/carconnectivity_schema/__init__.py +0 -0
- carconnectivity_plugin_database-0.1a4/src/carconnectivity_plugins/database/model/carconnectivity_schema/env.py +78 -0
- carconnectivity_plugin_database-0.1a4/src/carconnectivity_plugins/database/model/carconnectivity_schema/script.py.mako +24 -0
- carconnectivity_plugin_database-0.1a4/src/carconnectivity_plugins/database/model/carconnectivity_schema/versions/__init__.py +0 -0
- carconnectivity_plugin_database-0.1a4/src/carconnectivity_plugins/database/model/connection_state.py +53 -0
- carconnectivity_plugin_database-0.1a4/src/carconnectivity_plugins/database/model/datetime_decorator.py +44 -0
- carconnectivity_plugin_database-0.1a4/src/carconnectivity_plugins/database/model/drive.py +87 -0
- carconnectivity_plugin_database-0.1a4/src/carconnectivity_plugins/database/model/drive_level.py +46 -0
- carconnectivity_plugin_database-0.1a4/src/carconnectivity_plugins/database/model/drive_range.py +49 -0
- carconnectivity_plugin_database-0.1a4/src/carconnectivity_plugins/database/model/migrations.py +24 -0
- carconnectivity_plugin_database-0.1a4/src/carconnectivity_plugins/database/model/outside_temperature.py +48 -0
- carconnectivity_plugin_database-0.1a4/src/carconnectivity_plugins/database/model/state.py +52 -0
- carconnectivity_plugin_database-0.1a4/src/carconnectivity_plugins/database/model/timedelta_decorator.py +33 -0
- carconnectivity_plugin_database-0.1a4/src/carconnectivity_plugins/database/model/vehicle.py +162 -0
- carconnectivity_plugin_database-0.1a4/src/carconnectivity_plugins/database/plugin.py +156 -0
- carconnectivity_plugin_database-0.1a4/src/carconnectivity_plugins/database/ui/plugin_ui.py +48 -0
- carconnectivity_plugin_database-0.1a4/src/carconnectivity_plugins/database/ui/templates/database/status.html +8 -0
- carconnectivity_plugin_database-0.1a4/test/integration_test/carConnectivity.json +17 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Create a report to help us improve
|
|
4
|
+
title: ''
|
|
5
|
+
labels: bug
|
|
6
|
+
assignees: tillsteinbach
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Describe the bug**
|
|
11
|
+
A clear and concise description of what the bug is.
|
|
12
|
+
|
|
13
|
+
**To Reproduce**
|
|
14
|
+
Steps to reproduce the behavior:
|
|
15
|
+
1. Go to '...'
|
|
16
|
+
2. Click on '....'
|
|
17
|
+
3. Scroll down to '....'
|
|
18
|
+
4. See error
|
|
19
|
+
|
|
20
|
+
**Expected behavior**
|
|
21
|
+
A clear and concise description of what you expected to happen.
|
|
22
|
+
|
|
23
|
+
**Screenshots**
|
|
24
|
+
If applicable, add screenshots to help explain your problem.
|
|
25
|
+
|
|
26
|
+
**Logs**
|
|
27
|
+
IF applicable logs that show the problem. Please take care to remove any confidential data from the logs (e.g. your vehicles VIN number, usernames or passwords)
|
|
28
|
+
|
|
29
|
+
- OS: [e.g. Windows, Linux, MacOS, ...]
|
|
30
|
+
- Version used [e.g. 0.6.2]
|
|
31
|
+
|
|
32
|
+
**Additional context**
|
|
33
|
+
Add any other context about the problem here.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Suggest an idea for this project
|
|
4
|
+
title: ''
|
|
5
|
+
labels: enhancement
|
|
6
|
+
assignees: tillsteinbach
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Is your feature request related to a problem? Please describe.**
|
|
11
|
+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
12
|
+
|
|
13
|
+
**Describe the solution you'd like**
|
|
14
|
+
A clear and concise description of what you want to happen.
|
|
15
|
+
|
|
16
|
+
**Describe alternatives you've considered**
|
|
17
|
+
A clear and concise description of any alternative solutions or features you've considered.
|
|
18
|
+
|
|
19
|
+
**Additional context**
|
|
20
|
+
Add any other context or screenshots about the feature request here.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
name: Build Python Package
|
|
2
|
+
|
|
3
|
+
# Controls when the action will run.
|
|
4
|
+
on:
|
|
5
|
+
# Triggers the workflow on push or pull request events but only for the master branch
|
|
6
|
+
push:
|
|
7
|
+
branches: [ main ]
|
|
8
|
+
tags:
|
|
9
|
+
- "v*"
|
|
10
|
+
paths:
|
|
11
|
+
- .github/workflows/build.yml
|
|
12
|
+
- '**.py'
|
|
13
|
+
- 'pyproject.toml'
|
|
14
|
+
pull_request:
|
|
15
|
+
paths:
|
|
16
|
+
- .github/workflows/build.yml
|
|
17
|
+
- '**.py'
|
|
18
|
+
- 'pyproject.toml'
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
build-python:
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
strategy:
|
|
24
|
+
matrix:
|
|
25
|
+
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
|
|
26
|
+
|
|
27
|
+
steps:
|
|
28
|
+
- uses: actions/checkout@v5
|
|
29
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
30
|
+
uses: actions/setup-python@v6
|
|
31
|
+
with:
|
|
32
|
+
python-version: ${{ matrix.python-version }}
|
|
33
|
+
- name: Install dependencies
|
|
34
|
+
run: |
|
|
35
|
+
python -m pip install --upgrade pip
|
|
36
|
+
if [ -f setup_requirements.txt ]; then pip install -r setup_requirements.txt; fi
|
|
37
|
+
python -m pip install build
|
|
38
|
+
- name: Build
|
|
39
|
+
run: |
|
|
40
|
+
python -m build
|
|
41
|
+
- name: Install built package
|
|
42
|
+
run: |
|
|
43
|
+
pip install dist/*.whl
|
|
44
|
+
- name: Run
|
|
45
|
+
run: |
|
|
46
|
+
set +e
|
|
47
|
+
output=$(carconnectivity test/integration_test/carConnectivity.json 2>&1 & sleep 5 ; kill $!)
|
|
48
|
+
echo "$output" | grep -q 'Database connection established successfully'
|
|
49
|
+
if [ $? -ne 0 ]; then
|
|
50
|
+
echo "$output"
|
|
51
|
+
exit 1
|
|
52
|
+
fi
|
|
53
|
+
set -e
|
|
54
|
+
- name: Lint
|
|
55
|
+
run: |
|
|
56
|
+
make lint
|
|
57
|
+
# - name: Test
|
|
58
|
+
# run: |
|
|
59
|
+
# make test
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: Build and Upload Python Package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
pypi-publish:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
environment:
|
|
12
|
+
name: pypi
|
|
13
|
+
url: https://pypi.org/p/carconnectivity-plugin-database
|
|
14
|
+
permissions:
|
|
15
|
+
id-token: write
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v5
|
|
19
|
+
with:
|
|
20
|
+
fetch-depth: 0
|
|
21
|
+
- name: Set up Python
|
|
22
|
+
uses: actions/setup-python@v6
|
|
23
|
+
with:
|
|
24
|
+
python-version: "3.x"
|
|
25
|
+
- name: Install dependencies
|
|
26
|
+
run: |
|
|
27
|
+
python -m pip install --upgrade pip
|
|
28
|
+
python -m pip install build twine
|
|
29
|
+
- name: Build
|
|
30
|
+
run: |
|
|
31
|
+
python -m build
|
|
32
|
+
- name: Publish package distributions to PyPI
|
|
33
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
name: "CodeQL"
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
paths:
|
|
6
|
+
- '**.py'
|
|
7
|
+
schedule:
|
|
8
|
+
- cron: '33 5 * * 0'
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
analyze:
|
|
12
|
+
name: Analyze
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
permissions:
|
|
15
|
+
actions: read
|
|
16
|
+
contents: read
|
|
17
|
+
security-events: write
|
|
18
|
+
|
|
19
|
+
strategy:
|
|
20
|
+
fail-fast: false
|
|
21
|
+
matrix:
|
|
22
|
+
language: [ 'python' ]
|
|
23
|
+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
|
|
24
|
+
# Learn more:
|
|
25
|
+
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
|
|
26
|
+
|
|
27
|
+
steps:
|
|
28
|
+
- name: Checkout repository
|
|
29
|
+
uses: actions/checkout@v5
|
|
30
|
+
|
|
31
|
+
# Initializes the CodeQL tools for scanning.
|
|
32
|
+
- name: Initialize CodeQL
|
|
33
|
+
uses: github/codeql-action/init@v4
|
|
34
|
+
with:
|
|
35
|
+
languages: ${{ matrix.language }}
|
|
36
|
+
# If you wish to specify custom queries, you can do so here or in a config file.
|
|
37
|
+
# By default, queries listed here will override any specified in a config file.
|
|
38
|
+
# Prefix the list here with "+" to use these queries and those in the config file.
|
|
39
|
+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
|
40
|
+
|
|
41
|
+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
|
42
|
+
# If this step fails, then you should remove it and run the build manually (see below)
|
|
43
|
+
- name: Autobuild
|
|
44
|
+
uses: github/codeql-action/autobuild@v4
|
|
45
|
+
|
|
46
|
+
# ℹ️ Command-line programs to run using the OS shell.
|
|
47
|
+
# 📚 https://git.io/JvXDl
|
|
48
|
+
|
|
49
|
+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
|
50
|
+
# and modify them (or add more) to build your code if your project
|
|
51
|
+
# uses a compiled language
|
|
52
|
+
|
|
53
|
+
#- run: |
|
|
54
|
+
# make bootstrap
|
|
55
|
+
# make release
|
|
56
|
+
|
|
57
|
+
- name: Perform CodeQL Analysis
|
|
58
|
+
uses: github/codeql-action/analyze@v4
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
pip-wheel-metadata/
|
|
24
|
+
share/python-wheels/
|
|
25
|
+
*.egg-info/
|
|
26
|
+
.installed.cfg
|
|
27
|
+
*.egg
|
|
28
|
+
MANIFEST
|
|
29
|
+
|
|
30
|
+
# PyInstaller
|
|
31
|
+
# Usually these files are written by a python script from a template
|
|
32
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
33
|
+
*.manifest
|
|
34
|
+
*.spec
|
|
35
|
+
|
|
36
|
+
# Installer logs
|
|
37
|
+
pip-log.txt
|
|
38
|
+
pip-delete-this-directory.txt
|
|
39
|
+
|
|
40
|
+
# Unit test / coverage reports
|
|
41
|
+
htmlcov/
|
|
42
|
+
.tox/
|
|
43
|
+
.nox/
|
|
44
|
+
.coverage
|
|
45
|
+
.coverage.*
|
|
46
|
+
.cache
|
|
47
|
+
nosetests.xml
|
|
48
|
+
coverage.xml
|
|
49
|
+
*.cover
|
|
50
|
+
*.py,cover
|
|
51
|
+
.hypothesis/
|
|
52
|
+
.pytest_cache/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
target/
|
|
76
|
+
|
|
77
|
+
# Jupyter Notebook
|
|
78
|
+
.ipynb_checkpoints
|
|
79
|
+
|
|
80
|
+
# IPython
|
|
81
|
+
profile_default/
|
|
82
|
+
ipython_config.py
|
|
83
|
+
|
|
84
|
+
# pyenv
|
|
85
|
+
.python-version
|
|
86
|
+
|
|
87
|
+
# pipenv
|
|
88
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
89
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
90
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
91
|
+
# install all needed dependencies.
|
|
92
|
+
#Pipfile.lock
|
|
93
|
+
|
|
94
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
|
95
|
+
__pypackages__/
|
|
96
|
+
|
|
97
|
+
# Celery stuff
|
|
98
|
+
celerybeat-schedule
|
|
99
|
+
celerybeat.pid
|
|
100
|
+
|
|
101
|
+
# SageMath parsed files
|
|
102
|
+
*.sage.py
|
|
103
|
+
|
|
104
|
+
# Environments
|
|
105
|
+
.env
|
|
106
|
+
.venv
|
|
107
|
+
env/
|
|
108
|
+
venv/
|
|
109
|
+
ENV/
|
|
110
|
+
env.bak/
|
|
111
|
+
venv.bak/
|
|
112
|
+
|
|
113
|
+
# Spyder project settings
|
|
114
|
+
.spyderproject
|
|
115
|
+
.spyproject
|
|
116
|
+
|
|
117
|
+
# Rope project settings
|
|
118
|
+
.ropeproject
|
|
119
|
+
|
|
120
|
+
# mkdocs documentation
|
|
121
|
+
/site
|
|
122
|
+
|
|
123
|
+
# mypy
|
|
124
|
+
.mypy_cache/
|
|
125
|
+
.dmypy.json
|
|
126
|
+
dmypy.json
|
|
127
|
+
|
|
128
|
+
# Pyre type checker
|
|
129
|
+
.pyre/
|
|
130
|
+
.DS_Store
|
|
131
|
+
|
|
132
|
+
_version.py
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 Till Steinbach
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
BLUE='\033[0;34m'
|
|
2
|
+
NC='\033[0m' # No Color
|
|
3
|
+
|
|
4
|
+
test:
|
|
5
|
+
@pytest
|
|
6
|
+
|
|
7
|
+
lint:
|
|
8
|
+
@echo "\n${BLUE}Running Pylint against source and test files...${NC}\n"
|
|
9
|
+
@pylint ./src
|
|
10
|
+
@echo "\n${BLUE}Running Flake8 against source and test files...${NC}\n"
|
|
11
|
+
@flake8
|
|
12
|
+
@echo "\n${BLUE}Running Bandit against source files...${NC}\n"
|
|
13
|
+
@bandit -c pyproject.toml -r .
|
|
14
|
+
|
|
15
|
+
clean:
|
|
16
|
+
rm -rf .pytest_cache .coverage .pytest_cache coverage.xml coverage_html_report
|
|
17
|
+
|
|
18
|
+
.PHONY: clean test
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: carconnectivity-plugin-database
|
|
3
|
+
Version: 0.1a4
|
|
4
|
+
Summary: CarConnectivity plugin for storing data to Databases
|
|
5
|
+
Author: Till Steinbach
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Classifier: Development Status :: 3 - Alpha
|
|
8
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
9
|
+
Classifier: Intended Audience :: System Administrators
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
16
|
+
Classifier: Topic :: Utilities
|
|
17
|
+
Classifier: Topic :: System :: Monitoring
|
|
18
|
+
Classifier: Topic :: Home Automation
|
|
19
|
+
Requires-Python: >=3.9
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
Requires-Dist: carconnectivity>=0.9.2
|
|
23
|
+
Requires-Dist: sqlalchemy~=2.0.45
|
|
24
|
+
Requires-Dist: psycopg2-binary~=2.9.11
|
|
25
|
+
Requires-Dist: alembic~=1.17.2
|
|
26
|
+
Requires-Dist: SQLAlchemy-Utc~=0.14.0
|
|
27
|
+
Dynamic: license-file
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
# CarConnectivity Plugin for Database storage
|
|
32
|
+
[](https://github.com/tillsteinbach/CarConnectivity-plugin-database/)
|
|
33
|
+
[](https://github.com/tillsteinbach/CarConnectivity-plugin-database/releases/latest)
|
|
34
|
+
[](https://github.com/tillsteinbach/CarConnectivity-plugin-database/blob/master/LICENSE)
|
|
35
|
+
[](https://github.com/tillsteinbach/CarConnectivity-plugin-database/issues)
|
|
36
|
+
[](https://pypi.org/project/carconnectivity-plugin-database/)
|
|
37
|
+
[](https://pypi.org/project/carconnectivity-plugin-database/)
|
|
38
|
+
[](https://www.paypal.com/donate?hosted_button_id=2BVFF5GJ9SXAJ)
|
|
39
|
+
[](https://github.com/sponsors/tillsteinbach)
|
|
40
|
+
|
|
41
|
+
[CarConnectivity](https://github.com/tillsteinbach/CarConnectivity) is a python API to connect to various car services. If you want to store the data collected from your vehicle to a relational database (e.g. MySQL, PostgreSQL, or SQLite) this plugin will help you.
|
|
42
|
+
|
|
43
|
+
### Install using PIP
|
|
44
|
+
If you want to use the CarConnectivity Plugin for Databases, the easiest way is to obtain it from [PyPI](https://pypi.org/project/carconnectivity-plugin-database/). Just install it using:
|
|
45
|
+
```bash
|
|
46
|
+
pip3 install carconnectivity-plugin-database
|
|
47
|
+
```
|
|
48
|
+
after you installed CarConnectivity
|
|
49
|
+
|
|
50
|
+
## Configuration
|
|
51
|
+
In your carconnectivity.json configuration add a section for the database plugin like this. A documentation of all possible config options can be found [here](https://github.com/tillsteinbach/CarConnectivity-plugin-database/tree/main/doc/Config.md).
|
|
52
|
+
```
|
|
53
|
+
{
|
|
54
|
+
"carConnectivity": {
|
|
55
|
+
"connectors": [
|
|
56
|
+
...
|
|
57
|
+
]
|
|
58
|
+
"plugins": [
|
|
59
|
+
{
|
|
60
|
+
"type": "database",
|
|
61
|
+
"config": {
|
|
62
|
+
"db_url": "sqlite:///carconnectivity.db"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Updates
|
|
71
|
+
If you want to update, the easiest way is:
|
|
72
|
+
```bash
|
|
73
|
+
pip3 install carconnectivity-plugin-database --upgrade
|
|
74
|
+
```
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
# CarConnectivity Plugin for Database storage
|
|
4
|
+
[](https://github.com/tillsteinbach/CarConnectivity-plugin-database/)
|
|
5
|
+
[](https://github.com/tillsteinbach/CarConnectivity-plugin-database/releases/latest)
|
|
6
|
+
[](https://github.com/tillsteinbach/CarConnectivity-plugin-database/blob/master/LICENSE)
|
|
7
|
+
[](https://github.com/tillsteinbach/CarConnectivity-plugin-database/issues)
|
|
8
|
+
[](https://pypi.org/project/carconnectivity-plugin-database/)
|
|
9
|
+
[](https://pypi.org/project/carconnectivity-plugin-database/)
|
|
10
|
+
[](https://www.paypal.com/donate?hosted_button_id=2BVFF5GJ9SXAJ)
|
|
11
|
+
[](https://github.com/sponsors/tillsteinbach)
|
|
12
|
+
|
|
13
|
+
[CarConnectivity](https://github.com/tillsteinbach/CarConnectivity) is a python API to connect to various car services. If you want to store the data collected from your vehicle to a relational database (e.g. MySQL, PostgreSQL, or SQLite) this plugin will help you.
|
|
14
|
+
|
|
15
|
+
### Install using PIP
|
|
16
|
+
If you want to use the CarConnectivity Plugin for Databases, the easiest way is to obtain it from [PyPI](https://pypi.org/project/carconnectivity-plugin-database/). Just install it using:
|
|
17
|
+
```bash
|
|
18
|
+
pip3 install carconnectivity-plugin-database
|
|
19
|
+
```
|
|
20
|
+
after you installed CarConnectivity
|
|
21
|
+
|
|
22
|
+
## Configuration
|
|
23
|
+
In your carconnectivity.json configuration add a section for the database plugin like this. A documentation of all possible config options can be found [here](https://github.com/tillsteinbach/CarConnectivity-plugin-database/tree/main/doc/Config.md).
|
|
24
|
+
```
|
|
25
|
+
{
|
|
26
|
+
"carConnectivity": {
|
|
27
|
+
"connectors": [
|
|
28
|
+
...
|
|
29
|
+
]
|
|
30
|
+
"plugins": [
|
|
31
|
+
{
|
|
32
|
+
"type": "database",
|
|
33
|
+
"config": {
|
|
34
|
+
"db_url": "sqlite:///carconnectivity.db"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Updates
|
|
43
|
+
If you want to update, the easiest way is:
|
|
44
|
+
```bash
|
|
45
|
+
pip3 install carconnectivity-plugin-database --upgrade
|
|
46
|
+
```
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# CarConnectivity Plugin for Database storage Config Options
|
|
2
|
+
The configuration for CarConnectivity is a .json file.
|
|
3
|
+
## General format
|
|
4
|
+
The general format is a `carConnectivity` section, followed by a list of connectors and plugins.
|
|
5
|
+
In the `carConnectivity` section you can set the global `log_level`.
|
|
6
|
+
Each connector or plugin needs a `type` attribute and a `config` section.
|
|
7
|
+
The `type` and config options specific to your connector or plugin can be found on their respective project page.
|
|
8
|
+
```json
|
|
9
|
+
{
|
|
10
|
+
"carConnectivity": {
|
|
11
|
+
"log_level": "error", // set the global log level, you can set individual log levels in the connectors and plugins
|
|
12
|
+
"connectors": [
|
|
13
|
+
{
|
|
14
|
+
"type": "skoda", // Definition for a MySkoda account
|
|
15
|
+
"config": {
|
|
16
|
+
"interval": 600, // Interval in which the server is checked in seconds
|
|
17
|
+
"username": "test@test.de", // Username of your MySkoda Account
|
|
18
|
+
"password": "testpassword123" // Password of your MySkoda Account
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"type": "volkswagen", // Definition for a Volkswagen account
|
|
23
|
+
"config": {
|
|
24
|
+
"interval": 300, // Interval in which the server is checked in seconds
|
|
25
|
+
"username": "test@test.de", // Username of your Volkswagen Account
|
|
26
|
+
"password": "testpassword123" // Username of your Volkswagen Account
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"plugins": [
|
|
31
|
+
{
|
|
32
|
+
"type": "database", // Minimal definition for the Database Connection
|
|
33
|
+
"config": {
|
|
34
|
+
"db_url": "sqlite:///carconnectivity.db" // Database URL to connect to the database
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
### Database Plugin Options
|
|
42
|
+
These are the valid options for the Database plugin
|
|
43
|
+
```json
|
|
44
|
+
{
|
|
45
|
+
"carConnectivity": {
|
|
46
|
+
"connectors": [],
|
|
47
|
+
"plugins": [
|
|
48
|
+
{
|
|
49
|
+
"type": "database", // Definition for the Database plugin
|
|
50
|
+
"disabled": false, // You can disable plugins without removing them from the config completely
|
|
51
|
+
"config": {
|
|
52
|
+
"log_level": "error", // The log level for the plugin. Otherwise uses the global log level
|
|
53
|
+
"db_url": "sqlite:///carconnectivity.db" // Database URL to connect to the database
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Connector Options
|
|
62
|
+
Valid Options for connectors can be found here:
|
|
63
|
+
* [CarConnectivity-connector-skoda Config Options](https://github.com/tillsteinbach/CarConnectivity-connector-skoda/tree/main/doc/Config.md)
|
|
64
|
+
* [CarConnectivity-connector-volkswagen Config Options](https://github.com/tillsteinbach/CarConnectivity-connector-volkswagen/tree/main/doc/Config.md)
|
|
65
|
+
* [CarConnectivity-connector-seatcupra Config Options](https://github.com/tillsteinbach/CarConnectivity-connector-seatcupra/tree/main/doc/Config.md)
|
|
66
|
+
* [CarConnectivity-connector-tronity Config Options](https://github.com/tillsteinbach/CarConnectivity-connector-tronity/tree/main/doc/Config.md)
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = [
|
|
3
|
+
"setuptools>=61.0",
|
|
4
|
+
"setuptools_scm>=8"
|
|
5
|
+
]
|
|
6
|
+
build-backend = "setuptools.build_meta"
|
|
7
|
+
|
|
8
|
+
[project]
|
|
9
|
+
name = "carconnectivity-plugin-database"
|
|
10
|
+
description = "CarConnectivity plugin for storing data to Databases"
|
|
11
|
+
dynamic = ["version"]
|
|
12
|
+
requires-python = ">=3.9"
|
|
13
|
+
authors = [
|
|
14
|
+
{ name = "Till Steinbach" }
|
|
15
|
+
]
|
|
16
|
+
dependencies = [
|
|
17
|
+
"carconnectivity>=0.9.2",
|
|
18
|
+
"sqlalchemy~=2.0.45",
|
|
19
|
+
"psycopg2-binary~=2.9.11",
|
|
20
|
+
"alembic~=1.17.2",
|
|
21
|
+
"SQLAlchemy-Utc~=0.14.0"
|
|
22
|
+
]
|
|
23
|
+
readme = "README.md"
|
|
24
|
+
license = "MIT"
|
|
25
|
+
license-files = [
|
|
26
|
+
"LICENSE",
|
|
27
|
+
]
|
|
28
|
+
classifiers = [
|
|
29
|
+
"Development Status :: 3 - Alpha",
|
|
30
|
+
"Intended Audience :: End Users/Desktop",
|
|
31
|
+
"Intended Audience :: System Administrators",
|
|
32
|
+
"Programming Language :: Python :: 3.9",
|
|
33
|
+
"Programming Language :: Python :: 3.10",
|
|
34
|
+
"Programming Language :: Python :: 3.11",
|
|
35
|
+
"Programming Language :: Python :: 3.12",
|
|
36
|
+
"Programming Language :: Python :: 3.13",
|
|
37
|
+
"Programming Language :: Python :: 3.14",
|
|
38
|
+
"Topic :: Utilities",
|
|
39
|
+
"Topic :: System :: Monitoring",
|
|
40
|
+
"Topic :: Home Automation"
|
|
41
|
+
]
|
|
42
|
+
|
|
43
|
+
[project.urls]
|
|
44
|
+
|
|
45
|
+
[project.scripts]
|
|
46
|
+
carconnectivity-database = "carconnectivity_database.carconnectivity_database_base:main"
|
|
47
|
+
|
|
48
|
+
[tool.setuptools_scm]
|
|
49
|
+
write_to = "src/carconnectivity_plugins/database/_version.py"
|
|
50
|
+
|
|
51
|
+
[tool.pylint.format]
|
|
52
|
+
max-line-length = 160
|
|
53
|
+
ignore-patterns= "_version.py"
|
|
54
|
+
|
|
55
|
+
[tool.bandit]
|
|
56
|
+
targets = "carconnectivity_plugins"
|
|
File without changes
|