Extract structured data from Excel files using YAML schema definitions
Project description
stencilpy
Extract structured data from Excel files using YAML schema definitions into dynamically-generated Pydantic models.
Installation
pip install stencilpy
Quick Start
from stencilpy import Stencil
# Load a schema
lab = Stencil("lab_report.stencil.yaml")
# Extract data — version auto-detected via discriminator
report = lab.extract("january_lab.xlsx")
print(report.patient_name)
print(report.model_dump())
Schema Format
Create a .stencil.yaml file:
name: lab_report
description: Monthly lab report
discriminator:
cells:
- A1
versions:
"v2.0":
fields:
patient_name:
cell: B3
sample_date:
cell: B4
type: datetime
readings:
range: D5:D
type: list[float]
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 stencilpy-0.4.2.tar.gz.
File metadata
- Download URL: stencilpy-0.4.2.tar.gz
- Upload date:
- Size: 17.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db7fefc5890c9ce171e84f9151a107f76951f25f85d3aeea04a34259e13b484c
|
|
| MD5 |
e59c6a664c558b5f089809d0922cdb96
|
|
| BLAKE2b-256 |
5e7f652cecd66433462e95d4c0c6052e63bced2b9667238009dd6bd1bba998a1
|
Provenance
The following attestation bundles were made for stencilpy-0.4.2.tar.gz:
Publisher:
publish.yml on phlohouse/stencil
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
stencilpy-0.4.2.tar.gz -
Subject digest:
db7fefc5890c9ce171e84f9151a107f76951f25f85d3aeea04a34259e13b484c - Sigstore transparency entry: 1073311112
- Sigstore integration time:
-
Permalink:
phlohouse/stencil@3a33b3066799b3bb4e2c0d55fb8efa9635b7a040 -
Branch / Tag:
refs/tags/v0.4.2 - Owner: https://github.com/phlohouse
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3a33b3066799b3bb4e2c0d55fb8efa9635b7a040 -
Trigger Event:
push
-
Statement type:
File details
Details for the file stencilpy-0.4.2-py3-none-any.whl.
File metadata
- Download URL: stencilpy-0.4.2-py3-none-any.whl
- Upload date:
- Size: 16.0 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 |
18214c1191ecaff47aa95e7bb7df689195b3710ac912ab393122d23e2445c083
|
|
| MD5 |
dd8738edb1c448e57ac8442f99e75673
|
|
| BLAKE2b-256 |
970f7b87f9138fbb3727bbf28215f4a69f6ac34b0a94f0416f59f9b8129ff408
|
Provenance
The following attestation bundles were made for stencilpy-0.4.2-py3-none-any.whl:
Publisher:
publish.yml on phlohouse/stencil
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
stencilpy-0.4.2-py3-none-any.whl -
Subject digest:
18214c1191ecaff47aa95e7bb7df689195b3710ac912ab393122d23e2445c083 - Sigstore transparency entry: 1073311218
- Sigstore integration time:
-
Permalink:
phlohouse/stencil@3a33b3066799b3bb4e2c0d55fb8efa9635b7a040 -
Branch / Tag:
refs/tags/v0.4.2 - Owner: https://github.com/phlohouse
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3a33b3066799b3bb4e2c0d55fb8efa9635b7a040 -
Trigger Event:
push
-
Statement type: