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.52.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.52-py3-none-any.whl (3.2 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: genpypress-0.1.52.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.52.tar.gz
Algorithm Hash digest
SHA256 2965fe47708eca5706eed3af28015975dfcce37732f1f504d63cdc2393a43134
MD5 7f2eb306164399ae1e8e3b8d2139d16c
BLAKE2b-256 b83bd0a7bc2308bc6fed9ddee40f9fa9e22e61af4a5809336515f1172e6cb3bf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: genpypress-0.1.52-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.52-py3-none-any.whl
Algorithm Hash digest
SHA256 00aa8686968f7a810facc5818e082580eb836a0c8e09c21cb6119ea4558f9ed3
MD5 e0ca320f2f25f835c28b74eead119704
BLAKE2b-256 6d40b99076a7c197a65bfe1929c94d5266a6eb55efa3c55065251c9b53133c8e

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