Skip to main content

Python library for DPM-XL data processing and analysis

Project description

pyDPM

A Python library for DPM-XL (Data Point Model eXtensible Language) data processing, migration, and semantic analysis. pyDPM provides functionality to migrate Access databases to SQLite, validate DPM-XL expressions syntactically and semantically, and perform comprehensive data dictionary validation.

Features

  • Database Migration: Convert Access databases (.mdb/.accdb) to SQLite with automatic fallback support
  • Expression Validation: Three-tier validation system (syntax → semantics → data dictionary)
  • DPM-XL Support: Full language support with ANTLR4-based parsing
  • Cross-platform: Works on Linux, Windows, and macOS
  • API & CLI: Both programmatic API and command-line interface

Installation

Install dependencies using Poetry:

poetry install

Database Migration Requirements

The migration system supports multiple methods for reading Access databases:

  1. mdbtools (Linux/Unix, recommended): Install system package for better performance

    # Ubuntu/Debian
    sudo apt-get install mdbtools
    
    # macOS
    brew install mdbtools
    
  2. access_parser (Pure Python fallback): Automatically used if mdbtools unavailable

    • Cross-platform Python library
    • No external dependencies required
    • Included with pyDPM installation

Usage

Database Migration

Migrate Access database to SQLite:

poetry run pydpm migrate-access ./path-to-release.accdb

This creates a SQLite database with migrated tables and views for DPM data access.

Expression Validation

Syntax Validation

Validate DPM-XL expression syntax:

poetry run pydpm syntax "sum({Table1, row A})"

Semantic Validation

Perform comprehensive semantic analysis:

poetry run pydpm semantic "{Table1, row A} + {Table1, row B}"

Semantic validation includes:

  • Type checking and inference
  • Symbol resolution
  • Dependency analysis
  • Data dictionary consistency

DPM-XL Expression Examples

# Basic cell reference
{Table1, row A, col 1}

# Arithmetic operations
{Sales, Q1} + {Sales, Q2}

# Aggregations with grouping
sum({Revenue} group by {Country})

# Conditional expressions
if {Status} = "Active" then {Amount} else 0

# Time operations
{Sales} timeshift Q, 1

# Filtering
{Revenue}[{Country} = "US"]

# With clauses for simplification
with {FinancialData}: {Revenue} - {Costs}

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

pydpm_xl-0.1.9.tar.gz (164.0 kB view details)

Uploaded Source

Built Distribution

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

pydpm_xl-0.1.9-py3-none-any.whl (195.9 kB view details)

Uploaded Python 3

File details

Details for the file pydpm_xl-0.1.9.tar.gz.

File metadata

  • Download URL: pydpm_xl-0.1.9.tar.gz
  • Upload date:
  • Size: 164.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for pydpm_xl-0.1.9.tar.gz
Algorithm Hash digest
SHA256 13de3883b9a19cad70c1809d43b67e383458009a8000792047677f7ac23d29ec
MD5 950f47f8d247e641b725ba65d949f4d3
BLAKE2b-256 d142a9168486a8bff906de291554ba39c1a4a5e689aaba721175d7ab144a19b3

See more details on using hashes here.

File details

Details for the file pydpm_xl-0.1.9-py3-none-any.whl.

File metadata

  • Download URL: pydpm_xl-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 195.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for pydpm_xl-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 00cde326a2b010597b09ce1e0910b22301ec9cbdb02923cdc16e47b61922ed18
MD5 898062c9ce1d1967e50d1f385f829a8d
BLAKE2b-256 867c7ae541bb1d5450cd77f7e0e6b2b9e4000fc5da53042374729973f6ae0cbf

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