Skip to main content

Set of tools and utilities connected with press code generator.

Project description

genpypress

This library contains several code generator helpers. It is connected to the press code generator.

This package will only run on Windows (submodule table uses external binary as dependency, the binary only exists for Windows).

Usage

Command line application

  • ph --help - zobrazí nápovědu
  • ph apatch - provede patch TPT skriptů pro asynchronní stage
  • ph cc - připraví SQL a/nebo BTEQ skripty tabulek na podmíněné nasazení

Markdown (mapping) parser

from pathlib import Path
from genpypress import mapping

# import a file in markdown format
file = Path("TGT_ACCS_METH_RLTD_906_900_915_AMR_NIC_PCR_2_M2C.md", encoding="utf-8")
map = mapping.from_markdown(file.read_text(encoding="utf-8"))

# access table mapping property
print("Type of historization:", map.etl_historization)

# access a column mapping property (case insensitive)
print("hist_type =", map["hist_type"].transformation_rule)

# nonexisting column will - of course - blow the code up
try:
    print(map["not available"])
except KeyError as err:
    print(f"error: {err}")

Table parser

Only supported on MS Windows.

from genpypress import table
filename = "ddl_script.sql"
data = table.from_file(filename)
t = data[0]

# access to table properties and/or columns
print("table name", t.name)
print("first column", t[0])
print("column by name", t["column_name"])

# deletion of columns by name and/or index
del t["another_column"]
del t[O]

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

genpypress-0.1.50.tar.gz (3.1 MB view details)

Uploaded Source

Built Distribution

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

genpypress-0.1.50-py3-none-any.whl (3.2 MB view details)

Uploaded Python 3

File details

Details for the file genpypress-0.1.50.tar.gz.

File metadata

  • Download URL: genpypress-0.1.50.tar.gz
  • Upload date:
  • Size: 3.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.14.0 Linux/6.14.0-116036-tuxedo

File hashes

Hashes for genpypress-0.1.50.tar.gz
Algorithm Hash digest
SHA256 7e8e11b4f7145c423cd9fdc1a2995d63201810ec53a093e90f74d3803d9198cc
MD5 46b2e94580fb668a924be1a930e9ff52
BLAKE2b-256 5bf1d2cc430d1e477080fcfc8924d892e6c543c823c24d22a873435db6df73e0

See more details on using hashes here.

File details

Details for the file genpypress-0.1.50-py3-none-any.whl.

File metadata

  • Download URL: genpypress-0.1.50-py3-none-any.whl
  • Upload date:
  • Size: 3.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.14.0 Linux/6.14.0-116036-tuxedo

File hashes

Hashes for genpypress-0.1.50-py3-none-any.whl
Algorithm Hash digest
SHA256 b4eb23e7bc841b8b8fb4b6041163129e6a9147743cd7e73a8fffde4c4a377d44
MD5 a37ed791f7cf9d86a314c79a19eb772c
BLAKE2b-256 8bd663933f9532147de0b239bd713bcf924e8c199ecf107726e81975560fa25a

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