Rendering API¶
render
¶
Render selected services without discarding handwritten source comments.
RenderError
¶
Bases: RuntimeError
Raised when generation or Compose validation fails.
render_header
¶
render_header(plan: StackPlan) -> str
Render the established header and selected-service manifest.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
plan
|
StackPlan
|
Resolved stack plan supplying summary text and service order. |
required |
Returns:
| Type | Description |
|---|---|
str
|
Commented Compose header ending with one blank line. |
Source code in docker/src/maraudarr/render.py
render_compose
¶
Render the complete comment-rich Compose file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
catalog
|
Catalog
|
Validated source catalog containing templates and charts. |
required |
plan
|
StackPlan
|
Resolved service selection in deterministic output order. |
required |
Returns:
| Type | Description |
|---|---|
str
|
A single Compose document with unresolved environment variables and |
str
|
project-owned comments preserved. |
Raises:
| Type | Description |
|---|---|
TemplateError
|
If an owned Compose source no longer contains an expected service, foundation, footer, or comment group. |
OSError
|
If a required source file cannot be read. |
Source code in docker/src/maraudarr/render.py
render_environment
¶
render_environment(
catalog: Catalog,
plan: StackPlan,
existing_path: Path | None,
generate_secrets: bool = True,
) -> str
Render the selected environment while preserving user-managed values.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
catalog
|
Catalog
|
Validated catalog containing environment source fragments. |
required |
plan
|
StackPlan
|
Resolved service selection in deterministic output order. |
required |
existing_path
|
Path | None
|
Existing |
required |
generate_secrets
|
bool
|
Whether known first-run placeholders should receive cryptographically strong generated values. |
True
|
Returns:
| Type | Description |
|---|---|
str
|
The complete environment document with a trailing newline. |
Raises:
| Type | Description |
|---|---|
OSError
|
If a source or existing environment file cannot be read. |
Source code in docker/src/maraudarr/render.py
413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 | |
render_homepage_services
¶
Render Homepage groups and cards for selected integrations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
catalog
|
Catalog
|
Validated catalog used to locate Homepage source fragments. |
required |
plan
|
StackPlan
|
Resolved service selection controlling cards and calendar items. |
required |
Returns:
| Type | Description |
|---|---|
str
|
A complete Homepage |
Raises:
| Type | Description |
|---|---|
RenderError
|
If a required built-in card cannot be found. |
OSError
|
If a Homepage source fragment cannot be read. |
Source code in docker/src/maraudarr/render.py
564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 | |
write_config
¶
Create selected config directories without replacing application state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
catalog
|
Catalog
|
Validated catalog containing shared and service config seeds. |
required |
plan
|
StackPlan
|
Resolved service selection controlling generated directories. |
required |
output_dir
|
Path
|
Plundarr project directory that owns |
required |
Returns:
| Type | Description |
|---|---|
Path
|
Path to the generated or updated config root. |
Raises:
| Type | Description |
|---|---|
RenderError
|
If a required Homepage card cannot be rendered. |
OSError
|
If directories or seed files cannot be created or copied. |
Source code in docker/src/maraudarr/render.py
validate_compose
¶
Ask Docker Compose to validate a generated project pair.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
output_dir
|
Path
|
Directory containing |
required |
Raises:
| Type | Description |
|---|---|
RenderError
|
If an installed Docker Compose command rejects the project. |
Note
Missing Docker Compose executables are tolerated so source-only environments can still render output. Any installed command that returns failure is treated as authoritative.
Source code in docker/src/maraudarr/render.py
write_stack
¶
Generate, validate, and write a complete Plundarr project.
Compose and environment artifacts are staged and validated before their public paths are atomically replaced. Config seeds are applied afterward using preservation rules appropriate for application-owned state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
catalog
|
Catalog
|
Validated catalog providing templates and service sources. |
required |
plan
|
StackPlan
|
Resolved service selection in deterministic generation order. |
required |
output_dir
|
Path
|
Directory that receives the generated Plundarr project. |
required |
Returns:
| Type | Description |
|---|---|
tuple[Path, Path, Path]
|
Paths to |
Raises:
| Type | Description |
|---|---|
RenderError
|
If rendering requirements or Compose validation fail. |
OSError
|
If staging, writing, or replacing output files fails. |