Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stencilpy-0.4.4.tar.gz (20.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stencilpy-0.4.4-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file stencilpy-0.4.4.tar.gz.

File metadata

  • Download URL: stencilpy-0.4.4.tar.gz
  • Upload date:
  • Size: 20.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for stencilpy-0.4.4.tar.gz
Algorithm Hash digest
SHA256 05932c10c7b1396df07aaff96a92710381cf3a61e31da85d59baf2e4a9c0d263
MD5 b90493f4b78986f2cd2e151e7028be45
BLAKE2b-256 cd81467c42920ac039fc0ea5f4174f3863d85779e27fb8ec70505b932ce9f35a

See more details on using hashes here.

Provenance

The following attestation bundles were made for stencilpy-0.4.4.tar.gz:

Publisher: publish.yml on phlohouse/stencil

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file stencilpy-0.4.4-py3-none-any.whl.

File metadata

  • Download URL: stencilpy-0.4.4-py3-none-any.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for stencilpy-0.4.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0cc3d5bd31f573be7c9cd0f602be33c784a37373e604225a577f6206b8387c4f
MD5 d14bc5bfd9a0e77d659fd36515abff05
BLAKE2b-256 a31ae5e75b5fef90a6abd881311940231fc6d9201a5c2c29d6be4e05d469c6cf

See more details on using hashes here.

Provenance

The following attestation bundles were made for stencilpy-0.4.4-py3-none-any.whl:

Publisher: publish.yml on phlohouse/stencil

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page