Smart Meter Data Collector Configurator Backend
Introduction
The backend is written with Python3 and bases on the following frameworks and libraries:
- Uvicorn: ASGI server implementation, using uvloop and httptools.
- Starlette: ASGI framework/toolkit
- Pydantic: Data validation and settings management using Python type hinting.
For managing dependency packages and virtualenv poetry is used.
Development
Requirements
- Python >= 3.10, <= 3.14
poetry- Optional software packages
- debhelper
- dh-make
Project Setup
With
poetry install
This will install all runtime and development dependencies for smartmeter-datacollector-configurator in a new virtual environment. Now you are ready to start working on the project.
Running during development
Inside the virtualenv run:
python -m smartmeter_datacollector_configurator [-c <config_path>] [-s <static_path>] [-d]
Now, the backend is running on port 8000 listening to 127.0.0.1. With the option -d hot-reloading and debug logs are enabled.
For development purposes it is possible to create an empty static folder inside the backend directory and start the application without the -s option. At the same time you start the frontend (npm run serve) in a separate shell. The API calls of the frontend, during development, are directed to a local backend to port 8000.
Command line arguments
The following command line arguments are supported:
-h, --help: Shows the help output ofsmartmeter-datacollector-configurator.-c, --config PATH: Directory path where the configuration files are read and deployed (default: Current directory./).-s,--static PATH: Directory path where the static frontend files are located. If left empty the app check if a static directory exists in the package location and falls back to the current directory./static.--host: Listening host IP (default:127.0.0.1).--port: Listening port number (default:8000).-d, --dev: Enable development mode which provides debug logging and hot reloading.
Custom commands & workflows
smartmeter-datacollector-configurator offers a few custom poetry run poe commands to simplify certain development workflows:
build_pybuilds a Python package which can be uploaded toPyPIbuild_shivbuilds a self-contained zipapp (.pyz) including dependencies (but without interpreter) usingshivbuild_debbuilds a Debian package for the current development platformbuild_srcdebbuilds a Debian source package which can be used to build a Debian (binary) package for any platformcleanremoves build output from the working directorydebianizecreates adebian/directory used to build Debian source / binary packagesformatautomatically adjusts the code to follow theautopep8code formatting rulesformat_checkchecks if the code follows theautopep8code formatting rulesisortautomatically re-orders the import statements usingisortisort_checkchecks if the order of the import statements is correct usingisortlintautomatically adjust the code to follow thepylintrules defined inpyproject.tomllint_checkchecks if the code follows thepylintrules defined inpyproject.tomltestruns all unit tests usingpytest
Make sure to run format_check / format, isort_check / isort, lint_check / lintbefore committing changes to the repository to avoid unnecessary development cycles. smartmeter-datacollector-configurator uses GitHub Actions to check if these rules apply.
Visit Wiki - Creating a Release for further documentation about contributing.
Metadata
Release files for smartmeter-datacollector-configurator 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| smartmeter_datacollector_configurator-2.0.0.tar.gz | 349.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| smartmeter_datacollector_configurator-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 700.0 kB
Release files / smartmeter_datacollector_configurator-2.0.0.tar.gz
| Download URL | smartmeter_datacollector_configurator-2.0.0.tar.gz |
|---|---|
| Size | 349.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
62cb04e4763e937c0793ac6fe310932de4e478bdb8d0a0201fe703b4c9c190a7
|
|
BLAKE2b-256 checksum How to use checksums |
43ea6df2fe029310b5fc6af8e30fd64a22440ac2750ca01c26bdc48fd9a228d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / smartmeter_datacollector_configurator-2.0.0-py3-none-any.whl
| Download URL | smartmeter_datacollector_configurator-2.0.0-py3-none-any.whl |
|---|---|
| Size | 350.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8816c7aae2c3c61d38289d3572dcf6455fbbfaa9efe194e6ba023213d9528d57
|
|
BLAKE2b-256 checksum How to use checksums |
bc13333c4a632084bb63b06f6ff13f9b84d9bf800a97efa229ad6f1a6a42bdf6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|