Skip to content

new.package.python-library

Create a python library: a typed module, its tests, a pyproject.toml uv builds, and with --command a script on PATH.

Writes the package-base seeds, then the files of the template python-library, into packages/, with the distribution named - and the contract listing the template's extensions. Each option's answer is checked before anything is written, and renders the files; nothing stores it.

A creation installs nothing: a template that needs an extension the workspace's lists do not hold, or that no installed distribution declares yet, refuses before anything is written, naming each. Then the runner the workspace's environment holds wires the member, run as new.wire <name>: it writes the project files again, and locks and syncs the environment and the tools.

fm new.package.python-library <name> [--command=VALUE]
Parameter Type Default Description
<name> required directory name under packages/ (e.g. scratch)
--command=VALUE "" the name of a script on PATH that runs the package's main(); none by default

Example

$ fm new.package.python-library <name>