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

Uploaded Python 3

File details

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

File metadata

  • Download URL: genpypress-0.1.51.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.51.tar.gz
Algorithm Hash digest
SHA256 bdbc37e72ddfba41b7a371f4ca9ac10e4f28f64a85cbed5aa87d35d5aee3a6a1
MD5 a9f1684468f8af9b8ae788a3af3ae0e9
BLAKE2b-256 abc258bd80b1f4b7882f06bc663ef39715304f93b5fcdc78b406f0c7269912ae

See more details on using hashes here.

File details

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

File metadata

  • Download URL: genpypress-0.1.51-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.51-py3-none-any.whl
Algorithm Hash digest
SHA256 1b0bc1271bd3edbf22e0bfcb49d0935641fd7ddf7f35f972de609afdd06c9172
MD5 e72260c22708c1f28e23c6e6846354eb
BLAKE2b-256 1353d4926ad5828161a6d89a7d335ecdfb15f2d8c19870f436a5fce49ab999c9

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