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
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 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 | |
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
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 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 | |
write_config
¶
Seed selected config directories and refresh generated Homepage cards.
Existing application files are preserved; README seeds may be refreshed.
Homepage services.yaml is always rendered from selected source fragments.
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. |