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.3.tar.gz (40.1 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.3-py3-none-any.whl (32.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: netboot-0.1.3.tar.gz
  • Upload date:
  • Size: 40.1 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.3.tar.gz
Algorithm Hash digest
SHA256 52a6ab75b20addfca06e629fc76553d5d67d545b5c2fef54e73873212623488b
MD5 153b37e6da738666a7036e7b40df77c1
BLAKE2b-256 fc70d4387583dd0d65226c8780ac402fd630511b4c62461c79dc49c831642c88

See more details on using hashes here.

Provenance

The following attestation bundles were made for netboot-0.1.3.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.3-py3-none-any.whl.

File metadata

  • Download URL: netboot-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 93678cfe3a3ffaa6b91ce643b9a5c6d3cc9c49de2009a67294a8d7897a20653f
MD5 e16dd3b9a135f8343f0236da19a7d6ef
BLAKE2b-256 018525dbf2cc76bc3c107782fa681dc386b15f430cb69bc97acc03b4f50d40ca

See more details on using hashes here.

Provenance

The following attestation bundles were made for netboot-0.1.3-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

This release

0.1.3 This release

2 files

0.1.2

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