pr0cks-extension
The base package for extensions to pr0cks to inherit from.
Extensions are discovered using setuptools' entrypoint feature. They can also be declared in poetry.
For now the only type of extension that exists is a CLI extension.
It allows adding parameters to the pr0cks CLI.
Writing a basic extension
The easiest way is to start a project with poetry using poetry init.
It would be convention to prefix the project name with pr0cks-.
For this example let's call it pr0cks-debug which will have the sole task
of adding the --debug param and thus alias --verbose.
import argparse
import logging
from pr0cks_extension.cli import Pr0cksCommand
class DebugCommand(Pr0cksCommand):
NAME = "debug" # Will be used as the name of argparse group
def _add_args(self):
"""Adds arguments to the argparse group"""
self.arg_group.add_argument(
"--debug",
action="store_true",
help="Activate debug logging"
)
def execute(self, args: argparse.Namespace, bind_address: str):
"""Activates debug logging for pr0cks"""
logging.getLogger().setLevel(logging.DEBUG)
Metadata
Release files for pr0cks-extension 0.1.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 | Provenance | |
|---|---|---|---|---|
| pr0cks_extension-0.1.0.tar.gz | 14.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pr0cks_extension-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.9 kB
Release files / pr0cks_extension-0.1.0.tar.gz
| Download URL | pr0cks_extension-0.1.0.tar.gz |
|---|---|
| Size | 14.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
82e929f406daf45b123420fd3236d4da2b505f8bdd9cdb4ff7e02db80eccd7dd
|
|
BLAKE2b-256 checksum How to use checksums |
ea93770a2029f58f55d19d84f72761079ad037c17460fe22835b6ad717bc5ded
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.5 CPython/3.6.9 Linux/4.15.0-100-generic
|
Release files / pr0cks_extension-0.1.0-py3-none-any.whl
| Download URL | pr0cks_extension-0.1.0-py3-none-any.whl |
|---|---|
| Size | 15.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7f420f450780cfae0bc2521e1c1f919519ef51e1c17b89f8ef5691aa19bd84f4
|
|
BLAKE2b-256 checksum How to use checksums |
79abcd1fc8a3016317757953ae6d125baa72314ca65525420881aeb3c341af9a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.5 CPython/3.6.9 Linux/4.15.0-100-generic
|
Security for pr0cks-extension 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.