Skip to main content

Plug-In Foundation Services Collection

The Python Development Master offers various extension points.

You can either add plug-ins or signals. Some parts are not very intuitive for the experienced python developer who are used to work with python standard libraries like logging or is hard to test as there are some points that are not that easy to test.

This collection offers a set of services helping to write better plug-ins.

abstractions

This module provides three protocols, that will abstract PDM core and PDM project classes, so that they can easily mocked in unit tests.

actions

Actions are a collection of actions to run. This can be useful, if you want to add different verbal commands.

Each of this action can add options to the parser. They all can be registered in an ActionRegistry. This provides an instance method called register which can be used to decorate implementations of ActionBase.

config

The configuration section is unstable.

hook

Hooks surround actions by hooks - an action can provide an implementation of the HookGenerator protocol, that must emit instances of HookInfo, a dataclass that gives information about the HookBase class to instantiate and run before and after the action is executed itself.

logging

The logging module provides a logger based on the python standard logging facilities.

The TermUIHandler uses pdm.core.ui.echo to write data to a log. The TracingLogger is created to add a log-level called TRACE to the logging, which is later used by traced_function.

The default instance for the logging is added in the logger variable. It's default value can be set using setup_logger. The value passed is identical to the verbose level of the pdm invocation arguments.

The decorator traced_function can be used to decorate a function for tracing the sequence of events - just like set -x does in POSIX scripts.

proc

The CliRunnerMixin allows you to run child-processes from your plug-in or signal. It offers a class-var called run_process, that has the same signature like subprocess.run from the python standard library, but can be overwritten for your tests.

Metadata

Release files for pdm-pfsc 0.13.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for pdm-pfsc 0.13.3
File Interpreter ABI Platform
pdm_pfsc-0.13.3-py3-none-any.whl Python 3 none any Details

Release files / pdm_pfsc-0.13.3-py3-none-any.whl

Download URL pdm_pfsc-0.13.3-py3-none-any.whl
Size 14.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5b52ef57b5382f6533de4a7aa73cc02583fa3c12b032513c818627765fb3c26a
BLAKE2b-256 checksum
How to use checksums
86a2dbb8e8673f881e4457c76fd874f02f8bbf3ea50d97fe2a273e54d8de1e9a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release history Release notifications | RSS feed

This release

0.13.3 This release

1 release file

0.13.2

1 release file

0.13.1

1 release file

0.13.0

1 release file

0.12.3

1 release file

0.12.2

1 release file

0.12.1

1 release file

0.12.0

1 release file

0.11.3

1 release file

0.11.2

1 release file

0.11.1

1 release file

0.11.0

1 release file

0.10.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page