Smart Meter Data Collector Configurator
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file smartmeter_datacollector_configurator-1.3.0.tar.gz.
File metadata
- Download URL: smartmeter_datacollector_configurator-1.3.0.tar.gz
- Upload date:
- Size: 1.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7112e7635fc716c1e7c97315d2ef8e1129eae5cfe8957378c27a05c36f9c10cb
|
|
| MD5 |
2d6899cfe9d44fd0de61794279ffff3b
|
|
| BLAKE2b-256 |
4ef34b898fb2d598425a3d75d7809f5e3596cb9398112b6ca98d0748791d7138
|
File details
Details for the file smartmeter_datacollector_configurator-1.3.0-py3-none-any.whl.
File metadata
- Download URL: smartmeter_datacollector_configurator-1.3.0-py3-none-any.whl
- Upload date:
- Size: 1.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db72ab40aeb89b6b2cf40f4173e924b671c8b7d66ae55f8571b2d6b5e10b68bd
|
|
| MD5 |
d00668bcf770ae406cae3705965036a0
|
|
| BLAKE2b-256 |
00168eece327f84817293af9e3c764c540515993af7f347eb5ae0e50537f9192
|