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.49.tar.gz (3.1 MB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: genpypress-0.1.49.tar.gz
  • Upload date:
  • Size: 3.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.11.0-105009-tuxedo

File hashes

Hashes for genpypress-0.1.49.tar.gz
Algorithm Hash digest
SHA256 2b6888121c80ec1b64cb6f0400b7eccd8ffb1e7b2ecfe406a244295ed5811d53
MD5 e804502a2808c8e492b01fba122b8a37
BLAKE2b-256 78dc970cf74c7c118cec47a93e96707a492f15d956bc59d2661079a323972153

See more details on using hashes here.

File details

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

File metadata

  • Download URL: genpypress-0.1.49-py3-none-any.whl
  • Upload date:
  • Size: 3.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.11.0-105009-tuxedo

File hashes

Hashes for genpypress-0.1.49-py3-none-any.whl
Algorithm Hash digest
SHA256 649249c4d681c4ac07364687891fa2d4e7745ecc87758826e4c65cb3f3e1f9fb
MD5 5f17f4ad25cbc1d58c90c9b60de797ec
BLAKE2b-256 de7f4e8da284b00ded081a5cbf28c161d3e46a9e982b14177e90771170530520

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page