Skip to main content

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.plklogging) around the logging module to cover logging from multiple processes.

Import a logger using:

from plapperkasten.plklogging import plklogging

logger: plklogging.PlkLogger = plklogging.get_logger(__name__)

# your code here

Setup as an isolated app integrated into the system (e.g. on a remote box)

Please see https://github.com/randomchars42/plapperkasten-setup for detailed instructions and an easy installer.

Setup for development

Requirements

  • Python >= 3.9 as it uses typehinting only available beginning with 3.9.

Semi-optional:

  • libgpiod with python3-libgpiod and gpiodmonitor>=1.0.0 if you plan to use the inputgpiod-plugin. Alternatively you may implement the functionality using RPi.GPIO or any library of your choice.

Recommendations

  • pipenv to create a virtual environment with a defined python version

    pip3 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

plapperkasten-0.3.1.tar.gz (3.2 MB view details)

Uploaded Source

Built Distribution

plapperkasten-0.3.1-py3-none-any.whl (3.2 MB view details)

Uploaded Python 3

File details

Details for the file plapperkasten-0.3.1.tar.gz.

File metadata

  • Download URL: plapperkasten-0.3.1.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

Hashes for plapperkasten-0.3.1.tar.gz
Algorithm Hash digest
SHA256 f0ebe5efafa2f2a8801af98e87ba27937b8d4a2769510880659f2526aae7dc85
MD5 ec326e3e28c8c66c87624a22d8f9633e
BLAKE2b-256 7406553959b89b0a064626e983820eccf47bf6137abd8cda7c9b2782fa5f22d1

See more details on using hashes here.

File details

Details for the file plapperkasten-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: plapperkasten-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 3.2 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

Hashes for plapperkasten-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 96b338e9c0dbd658fa0872e6acd088a9b2ffc7b87dbe9f22249c1e84bd054b20
MD5 ad7eb48377bd67d81f480fdd082fa7f5
BLAKE2b-256 18a832b55d40369080c5559a13b88b93d25f21b81aaab502ec63f02255d2493d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page