Skip to main content

netboot

PyPI Python versions License: MIT Docs CI

PXE provisioning management: describe your netboot targets, images and DHCP zones in config, and let netboot render the per-target boot artifacts and arm (or disarm) DHCP for a machine as it enters and leaves the install process.

netboot is a small, hook-driven engine. A YAML config declares targets (host/MAC/IP), images (what to boot), dhcp zones (the network a target lives on) and content repos (where artifacts are fetched/served from). For a given target netboot builds a render context and produces netboot files from Jinja2 or shell-style templates, resolving names by MAC, hostname or IP with sensible fallbacks. Backends and behaviour are extensible through an event-hook system and pluggable DhcpServer handlers.

Install

pip install netboot            # provides the `pixie` command
# or, from a checkout:
pip install .

Optional extras:

Extra Enables
netboot[config] YAML config loading for the CLI (pyyaml)
netboot[dns] The dnspython resolver backend (best coverage; without it hostname targets still resolve via the system/nslookup fallbacks)
netboot[docs] Build the documentation site (mkdocs)

Built on duho (CLI/args/command discovery), pathlib_next (URI-aware paths), yaconfiglib (layered YAML), and Jinja2. IP/MAC/DNS helpers come from netimps, re-exported as netboot.utils.net.

CLI

The command is pixie (PXE is pronounced "pixie"); netboot is the library package it drives.

# Initiate the PXE process for a target (render artifacts + arm DHCP):
pixie initiate my-host

# Complete it (post-boot cleanup, disarm DHCP):
pixie complete my-host

Global options:

Option Purpose
-c, --config PATH Explicit config file (yaml/cfg)
--baseconfig DIR Base config directory to search (default ./config)
-l, --load-module M Import module(s) before building netboot (config/hook deps)
--cmdspath PATH Extra directories/packages to search for commands

A target is looked up by exact id, or by hostname prefix / MAC / IP.

Library

from netboot import Pixie

pixie = Pixie(**config)                  # config: the merged YAML mapping
target = pixie.lookup_target("my-host")
ctx = pixie.make_context(target)         # render context (image + dhcpzone + target)
print(ctx.render("boot.ipxe.j2"))        # render a template against the context
pixie.initialize(target)                 # arm DHCP for the target
pixie.complete(target)                   # cleanup once installed

Extending

  • Hooks. Pass hooks=[...] (callables or "module.func" import strings) to Pixie(...). Each hook f(event, netboot, value, kwargs) -> value is called for every PixieEvent and may transform the value flowing through it — used to customise lookup, context construction and the init/complete lifecycle.
  • DHCP backends. Subclass netboot.dhcp.DhcpServer; the lowercased class name is the URI scheme it handles (class dnsmasq(DhcpServer)dnsmasq://...). Import your plugin module via --load-module so it is registered before the config builds the zones.

License

MIT — see LICENSE.

Download files

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

Source Distribution

netboot-0.1.2.tar.gz (38.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

netboot-0.1.2-py3-none-any.whl (32.2 kB view details)

Uploaded Python 3

File details

Details for the file netboot-0.1.2.tar.gz.

File metadata

  • Download URL: netboot-0.1.2.tar.gz
  • Upload date:
  • Size: 38.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for netboot-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f5d95e5311776c9f6a57bc847a9eea9d80ff77f3cf0ba670caace57f01c70b0e
MD5 8b8f96b84b85dbc320f781ffa8f2aa57
BLAKE2b-256 ee72a0d63101685e6a0023befd6511bdf478561febf473614e5dfed2155cc35b

See more details on using hashes here.

Provenance

The following attestation bundles were made for netboot-0.1.2.tar.gz:

Publisher: release.yml on jose-pr/netboot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file netboot-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: netboot-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 32.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for netboot-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 50f147134f1845d848fe4f6112b5583c4a3c24924fb89e4a18ea3d6fbff6e211
MD5 fea0fd112183589812c41a8e36368800
BLAKE2b-256 bb4ab7e2a937cb682fed4cb9a51c5d19be488d29f8c9ca45130662f181354b65

See more details on using hashes here.

Provenance

The following attestation bundles were made for netboot-0.1.2-py3-none-any.whl:

Publisher: release.yml on jose-pr/netboot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.3

2 files

This release

0.1.2 This release

2 files

0.1.1

2 files

0.1.0

2 files

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