Skip to main content

Shared schemas, frameworks and extraction for structured concept templates (ADR-147)

Project description

iil-concept-templates

Shared schemas, frameworks and extraction for structured concept templates.

ADR-147 — see docs/adr/ADR-147-v2-concept-templates-package.md

Installation

# Core (schemas, frameworks, registry, validators, export)
pip install iil-concept-templates

# With PDF extraction
pip install iil-concept-templates[pdf]

# With LLM analysis (via outlinefw)
pip install iil-concept-templates[llm]

# Everything
pip install iil-concept-templates[full]

Quick Start

from concept_templates import ConceptScope, ConceptTemplate
from concept_templates.registry import get_framework, list_frameworks
from concept_templates.export import to_markdown

# List available frameworks
frameworks = list_frameworks()
# {'brandschutz_mbo': ..., 'exschutz_trgs720': ..., 'ausschreibung_vob': ...}

# Get a specific framework
template = get_framework("brandschutz_mbo")

# Export as Markdown
print(to_markdown(template))

# Register a custom framework
from concept_templates.registry import register_framework

custom = ConceptTemplate(
    name="Mein Konzept",
    scope=ConceptScope.BRANDSCHUTZ,
    framework="custom_bs",
)
register_framework("custom_bs", custom)

Built-in Frameworks

Key Name Scope Sections
brandschutz_mbo Brandschutzkonzept §14 MBO brandschutz 6
exschutz_trgs720 Explosionsschutzkonzept TRGS 720ff explosionsschutz 7
ausschreibung_vob Ausschreibung nach VOB/A ausschreibung 8

File Validation

from concept_templates.validators import validate_upload_file, FileValidationError

try:
    validate_upload_file("plan.pdf", size_bytes=1_000_000)
except FileValidationError as e:
    print(f"Invalid: {e}")

Allowed: .pdf, .docx, .doc, .xlsx, .xls, .dxf, .dwg, .jpg, .jpeg, .png, .tiff, .txt, .csv Max size: 50 MB

Development

pip install -e ".[dev]"
pytest -v --cov=concept_templates
ruff check .

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

iil_concept_templates-0.5.0.tar.gz (39.1 kB view details)

Uploaded Source

Built Distribution

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

iil_concept_templates-0.5.0-py3-none-any.whl (33.2 kB view details)

Uploaded Python 3

File details

Details for the file iil_concept_templates-0.5.0.tar.gz.

File metadata

  • Download URL: iil_concept_templates-0.5.0.tar.gz
  • Upload date:
  • Size: 39.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for iil_concept_templates-0.5.0.tar.gz
Algorithm Hash digest
SHA256 4836c92d2c20226962d9a1c4ff7a25b1d8a772a63780aed0f007314bfcd2de7e
MD5 f57424a2f842127ffa404b7b81f60426
BLAKE2b-256 3e85440d890911e1169ee8a429daee55286a8346f3f167b4f407e2d32c69a543

See more details on using hashes here.

File details

Details for the file iil_concept_templates-0.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for iil_concept_templates-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dcaca8ac0d80adfbb68e8b7f180a00845fa2b3d99ed1ea05844d89b57c43ef20
MD5 a461d9c5f2b7983caede3a3ba1ae039a
BLAKE2b-256 5213337d2e593958f22d6e38cdfad66dadfb6502afafb401c1e61c7ce00f0040

See more details on using hashes here.

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