Skip to content

feat(dataframe): as_blob(fmt) — Tabelle als Blob-Asset (RFC 0004, Option C)#75

Merged
lepy merged 1 commit into
masterfrom
feat/dataframe-as-blob
Jun 29, 2026
Merged

feat(dataframe): as_blob(fmt) — Tabelle als Blob-Asset (RFC 0004, Option C)#75
lepy merged 1 commit into
masterfrom
feat/dataframe-as-blob

Conversation

@lepy

@lepy lepy commented Jun 29, 2026

Copy link
Copy Markdown
Owner

Was

DataFrame.as_blob(fmt="parquet"|"csv"|"arrow"|"feather") -> Blob — die lebende
Tabelle wird in einem gewählten Format zu einem bytes-Content-Blob
gerendert. Komposition statt Vererbung (RFC 0004, Option C): eine Tabelle
ist kein einzelner Blob, kann aber on-demand als binäres Asset ausgegeben werden.

Mehrwert

Über den Blob erbt die Tabelle indirekt alle Blob-Fähigkeiten in einem
gewählten Format: sha256/size/verify, write(uri)/open(), Sidecar.

  • _BLOB_FORMATS-Registry: fmt -> (builder, filetype, mime_type)
  • Name/Description von der Tabelle geerbt; mime_type gesetzt; update_checksum
    ausgeführt → blob.verify() funktioniert sofort
  • Unbekanntes fmtValueError

Tests / CI

tests/test_sclass_dataframe_as_blob.py (7): default-parquet, checksum/verify,
parquet-Round-Trip, csv, arrow+feather, name-override, unsupported-format.

Kanonische CI: 549 passed, 7 skipped, dataframe.py 368/368 100 %,
TOTAL 100 %, mkdocs build --strict grün.

Kompatibilität

Strikt additiv: keine Änderung an to_dict/from_dict, keine Basisklasse, keine
bestehenden Artefakte betroffen. Schließt RFC 0004 (Option B + C umgesetzt).

…ion C)

DataFrame.as_blob(fmt="parquet"|"csv"|"arrow"|"feather") rendert die lebende
Tabelle in einem gewählten Format zu einem bytes-Content-Blob. Damit erbt die
Tabelle indirekt alle Blob-Faehigkeiten (Hash/verify/size/write/open/Sidecar)
ueber Komposition statt Vererbung — strikt additiv, ohne to_dict-Bruch.

- _BLOB_FORMATS-Registry: fmt -> (builder, filetype, mime_type)
- Name/Description von der Tabelle geerbt; mime_type gesetzt; update_checksum
  ausgefuehrt, sodass blob.verify() sofort funktioniert
- Unbekanntes fmt -> ValueError
- RFC 0004 Status: Option B + C implementiert

tests/test_sclass_dataframe_as_blob.py: parquet/csv/arrow/feather, checksum/verify,
parquet-Roundtrip, name-override, unsupported-format. dataframe.py 368/368 100%.
@lepy lepy merged commit 1783735 into master Jun 29, 2026
1 check passed
@lepy lepy deleted the feat/dataframe-as-blob branch June 29, 2026 13:26
@codacy-production

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 28 high · 19 medium · 53 minor

Alerts:
⚠ 100 issues (≤ 0 issues of at least minor severity)

Results:
100 new issues

Category Results
UnusedCode 1 medium
1 minor
BestPractice 2 medium
1 minor
ErrorProne 3 high
Security 1 medium
25 high
CodeStyle 51 minor
Complexity 15 medium

View in Codacy

🟢 Metrics 438 complexity · 5 duplication

Metric Results
Complexity 438
Duplication 5

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant