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.3.5.tar.gz (15.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.3.5-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: stencilpy-0.3.5.tar.gz
  • Upload date:
  • Size: 15.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.3.5.tar.gz
Algorithm Hash digest
SHA256 f78b0b571f2bedaf62a371020b3b19e8c33deee25be924593ba5cb4ea0a404de
MD5 f69debd9a3065b755a43c02096304e71
BLAKE2b-256 8520cb9c56468f652204621c97cf422cf3d4d21340b4a78fad2b8882fea716d6

See more details on using hashes here.

Provenance

The following attestation bundles were made for stencilpy-0.3.5.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.3.5-py3-none-any.whl.

File metadata

  • Download URL: stencilpy-0.3.5-py3-none-any.whl
  • Upload date:
  • Size: 14.2 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.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 8dc2383e1d30f3ba4efbd6b8fda192181ccf7a7bdda5a353856747eb720ec8a2
MD5 2050d873fd5b1e9a1c71da696cd88dbb
BLAKE2b-256 d2b6e0d4a05d1abf051bd8368558932299f861713403f335c2ad4ebe9c66c2d2

See more details on using hashes here.

Provenance

The following attestation bundles were made for stencilpy-0.3.5-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