No project description provided
Project description
plapperkasten
Coding
Style
Docstrings are formatted according to the Google Style Guide.
All other formatting tries to adhere to PEP8 and is enforced by YAPF.
Log entries use lazy evaluation, i.e., logger.debug('start %s', name)
, start with a lower-case letter and do not end with a full stop.
Raised errors on the other hand use f-strings (if necessary) and contain whole sentences, i.e. ValueError(f'{variable} did not match XXXX.')
.
Linting / Checking
Code should be checked by pylint and mypy.
Paths
All path representations should be pathlib.Path
-objects instead of strings.
Logging
Logging uses a wrapper (plapperkasten.plapperkastenlogging
) around the logging
module to cover logging from multiple processes.
Import a logger using:
from plapperkasten.plapperkastenlogging import plapperkastenlogging
logger: plapperkastenlogging.PlapperkastenLogger = plapperkastenlogging.get_logger(__name__)
# your code here
Setup
Requirements
Python >= 3.9
as it uses typehinting only available beginning with 3.9.
Semi-optional:
libgpiod
withpython3-libgpiod
andgpiodmonitor>=1.0.0
if you plan to use theinputgpiod
-plugin. Alternatively you may implement the functionality usingRPi.GPIO
or any library of your choice.
Recommendations
-
pipenv
to create a virtual environment with a defined python versionpip3 install pipenv
Example setup using pipenv
git clone git@github.com:randomchars42/plapperkasten.git
cd plapperkasten
# consider adding this to your .bashrc / equivalent for your shell:
# `export PIPENV_VENV_IN_PROJECT=1`
# this leads to a folder `.venv` being created at the project root
# otherwise you might need to tweak the `[tool.mypy]`` path in
# `pyproject.toml` (depending on your editor setup).
# setup a virtual environment with set python version
# set the version to >= 3.9
pipenv --python 3.9
# install development dependencies
pipenv install --dev
# activate venv
pipenv shell
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
File details
Details for the file plapperkasten-0.2.0.tar.gz
.
File metadata
- Download URL: plapperkasten-0.2.0.tar.gz
- Upload date:
- Size: 3.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/37.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.8.2 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6568dc928765210db5c70e965b361e38ea6c85f5658bdacfbd83ced6d6c1058b |
|
MD5 | ea9683374b814ff3b056b346c509a882 |
|
BLAKE2b-256 | e93e7a26ac54db4ed54ddf015b38699e36ee51e4fd0e42814916782fa1936816 |
File details
Details for the file plapperkasten-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: plapperkasten-0.2.0-py3-none-any.whl
- Upload date:
- Size: 6.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/37.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.8.2 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 282d7cc78d4975ea6ace3212ac1cfd4dbc7418be7363b1577c44bdea6b02a07c |
|
MD5 | 61937dd7f17cd6f2b9286dd1e8a67e91 |
|
BLAKE2b-256 | 4210f3f42a9fbea7c6d332e9bdfb38f46fbdc54e3dc5cba05ffa447564000069 |