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.8.tar.gz (170.1 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.8-py3-none-any.whl (196.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pydpm_xl-0.1.8.tar.gz
  • Upload date:
  • Size: 170.1 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.8.tar.gz
Algorithm Hash digest
SHA256 f5eccdb9432310d36d8018e38c5e7df1cacb5e2dcd9eb44a3559bec46a4e071f
MD5 1f7c1e514bd5b765678b3fc1e029b9e1
BLAKE2b-256 a56a5c46437ce09752eb98b540e5bd856fbcb7dcc7633ad19b898ca2c764952f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pydpm_xl-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 196.1 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.8-py3-none-any.whl
Algorithm Hash digest
SHA256 eb7044aaa1638f0eb9d96670400c94fecf5ca533b79c01bb6777227711862077
MD5 fa048f736e202708d8f4db69301c0a66
BLAKE2b-256 8fd1410caee9c11ccb81781a59e69d3ccbf9d0720f10e473a46cc83549945db8

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