Build PDFs in Python easily using a component-based structure.
Project description
An easy to use, component-based PDF creator for Python built on top of ReportLab
Features • Quickstart • Installation • Docs • TO-DO • Credits
Features
This tool allows you to easily build PDF documents using a component-based architecture, similar to frameworks like Streamlit.
It uses a simple syntax that let's you iterate through prototypes fast, so you can easily adjust the PDFs to your liking.
Quickstart
An example of how to create a basic document using Scriber:
from scriber import pdf, ui
with pdf.document("quickstart.pdf") as doc:
ui.text("Quarterly Overview")
ui.text("A minimal report built with plain text, labeled separators, and tables")
ui.labeled_separator("Key Metrics")
ui.table(
[
{"Metric": "Revenue", "Q2 FY24": "$1.8M", "Δ vs Q1": "+5%"},
{"Metric": "Active Users", "Q2 FY24": "12,430", "Δ vs Q1":"+7%"},
{"Metric": "Churn", "Q2 FY24": "3.2%", "Δ vs Q1": "-0.4%"},
],
columns=["Metric", "Q2 FY24", "Δ vs Q1"],
zebra=True,
)
ui.labeled_separator("Notes")
ui.text("• Metrics pulled from the analytics warehouse on 2024-07-05.")
ui.text("• Refresh the report by rerunning this script after the nextdata sync.")
This code will create the following PDF:
Installation
-- Working on uploading Scriber to Python Package Index --
Components
Containers
- row — Horizontal container with configurable gap and justification.
- column — Vertical stack with optional gap and growth hints.
- card — Padded container with optional radius and grow props.
Typography & Numbers
- text — Body or muted paragraph text with variant overrides.
- h1 — Large heading styled via theme tokens.
- h2 — Medium heading variant.
- h3 — Smaller heading variant.
- number — Formats numeric values (currency, percent, etc.) using document settings.
UI Elements
- badge — Pill-style label supporting variants.
- button — Action button with variant-driven styling.
Layout & Spacing
- separator — Horizontal rule with thickness, color, and margin controls.
- labeled_separator — Separator with centered label and configurable gap/ margins.
- spacer — Vertical whitespace helper using spacing tokens.
Data & Media
- table — Tabular data renderer with alignment and zebra striping options, supports Pandas and Polars dataframes.
- figure — Embeds Matplotlib/Plotly/Altair/Plotnine figures with sizing and captions
- image — Embeds local or remote images with fit, alignment, and caching
Document Structure
- cover — Full-page cover with title, subtitle, and metadata rows
- toc — Generated table of contents with depth and dot leader controls
Docs
TO-DO
Credits
ReportLab - Used for rendering the PDFs.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scriber_pdf-0.1.0.tar.gz.
File metadata
- Download URL: scriber_pdf-0.1.0.tar.gz
- Upload date:
- Size: 60.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e562e5e4fc7a6e0198767921753409c78255c933acaaa3de4a9949664a7a331
|
|
| MD5 |
e652bb06417cd5223783e66c5537c166
|
|
| BLAKE2b-256 |
8c67e6f8af2ddc5b66e972bfe8f76f72531829a008a44b745a2d83941bca6bc8
|
Provenance
The following attestation bundles were made for scriber_pdf-0.1.0.tar.gz:
Publisher:
publish.yml on FabianUB/scriber
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scriber_pdf-0.1.0.tar.gz -
Subject digest:
9e562e5e4fc7a6e0198767921753409c78255c933acaaa3de4a9949664a7a331 - Sigstore transparency entry: 565536650
- Sigstore integration time:
-
Permalink:
FabianUB/scriber@424535e510e9cf13fbe990c8e0db86e5f9c88392 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/FabianUB
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@424535e510e9cf13fbe990c8e0db86e5f9c88392 -
Trigger Event:
release
-
Statement type:
File details
Details for the file scriber_pdf-0.1.0-py3-none-any.whl.
File metadata
- Download URL: scriber_pdf-0.1.0-py3-none-any.whl
- Upload date:
- Size: 35.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0dd569a706928fb6a0322e6309ccb6840b41bcff0432355b126d08cadc99510a
|
|
| MD5 |
d5742bd87516eba5377efeee0de7cfd8
|
|
| BLAKE2b-256 |
27b6363b0b36d3751c5b8b641ef11a2fad267c5fb08f41be6d7054c38cb22fbd
|
Provenance
The following attestation bundles were made for scriber_pdf-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on FabianUB/scriber
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scriber_pdf-0.1.0-py3-none-any.whl -
Subject digest:
0dd569a706928fb6a0322e6309ccb6840b41bcff0432355b126d08cadc99510a - Sigstore transparency entry: 565536662
- Sigstore integration time:
-
Permalink:
FabianUB/scriber@424535e510e9cf13fbe990c8e0db86e5f9c88392 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/FabianUB
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@424535e510e9cf13fbe990c8e0db86e5f9c88392 -
Trigger Event:
release
-
Statement type: