PYPI PACKAGE AUDIT v0.2.2 Verbesserungsbedarf

ahi-sql

Kleine, abhängigkeitsarme SQL-Helfer für AHI (sichere Bezeichner, Platzhalter).

PyPkgScore ahi-sql
Methodik & Kriterien ♥ Donate
455 / 1000
Schnellinstallation
pip install ahi-sql
1. Governance
50/200
2. PEP-Metadaten
150/200
3. Sicherheit
100/200
4. Doku & SEO
155/200
5. CI-Engineering
0/200
📣 Prüfung teilen: Teilen Sie diesen Bericht und die Vorschau in der aktuellen Sprache
Advertisement
PYPI-TELEMETRIE

Downloads & Community-Verbreitung

Letzte 30 Tage (ohne Spiegelserver)
Letzte 7 Tage
178
Letzte 30 Tage
486
Gesamt (180 Tage)
486
Metrik / Ökosystem Status / Wert Quelle
Downloads (30d / 180d) — PyPI Stats (without mirrors)
Trusted Publishing (PEP 740) ✕ Not detected PyPI Integrity / Sigstore
Django Packages — djangopackages.org
PyTech / PyPkgScore 455 / 1000 PyPkgScore Engine

Gesundheits- & Engineering-Analyse (5 Säulen)

1. Governance & Community50 / 200 ▾
LICENSE✓ 50 pts
SECURITY.md✕ 0 pts
CONTRIBUTING.md✕ 0 pts
CODE_OF_CONDUCT.md✕ 0 pts
2. PEP-Metadaten & Paketierung150 / 200 ▾
Wheel (.whl)✓ 50 pts
pyproject.toml✓ 50 pts
Project URLs✓ 50 pts
Trove Classifiers✕ 0 pts
3. Sicherheit & Lieferkette100 / 200 ▾
Null CVEs (OSV)✓ 60 pts
Trusted Publishing (OIDC)✕ 0 pts
Snyk / Audit Link✓ 40 pts
HTTPS-Repository✕ 0 pts
4. Dokumentation, SEO & Ökosystem155 / 200 ▾
Strukturierte README✓ 60 pts
Read the Docs✓ 50 pts
Django Packages✕ 0 pts
Webseite / Fachartikel✓ 45 pts
5. Engineering, CI & Qualität0 / 200 ▾
Automatisierte Tests✕ 0 pts
GitHub Actions CI✕ 0 pts
CHANGELOG.md✕ 0 pts
Env & Lockfile (uv/rye/poetry/pdm/hatch)✕ 0 pts
Advertisement
README & DOCS

Offizielle Dokumentation & Nutzungsleitfaden — ahi-sql

PyPI Metadata v0.2.2
Vollständige Originaldokumentation anzeigen (Englisches README) ▾

ahi-sql

Small, dependency-light SQL helpers — the bits people otherwise hand-roll and get subtly wrong: quoting identifiers, generating bind placeholders, and building the DDL for a staged lookup table.

from ahi.sql import quote_identifier, placeholders

quote_identifier("user table")  # '"user table"'
placeholders(3, style="qmark")  # '?, ?, ?'   (Athena)
placeholders(3, style="named")  # ':1, :2, :3' (Redshift Data API)

Quote identifiers with quote_identifier. Quote values by passing them as bind parameters to your driver — never by string-formatting them in.

It also builds the DDL behind a staged lookup table — text only, so you can read and adapt the statement without running anything:

from ahi.sql import create_external_id_table, drop_table

create_external_id_table(
    "ahi_ids_a1b2c3d4",  # table
    "s3://my-bucket/scratch/ahi_ids_a1b2c3d4/",  # location
    "encounter_id",  # column
    database="scratch",
)
# CREATE EXTERNAL TABLE `scratch`.`ahi_ids_a1b2c3d4` ( `encounter_id` bigint ) ...

drop_table("ahi_ids_a1b2c3d4", database="scratch")
# DROP TABLE IF EXISTS `scratch`.`ahi_ids_a1b2c3d4`

Athena escapes identifiers with backticks in DDL (Hive) and double quotes in SELECT (Trino). The builders emit backticks; qualify defaults to double quotes for the query side.

ahi.aws.stage_id_table runs these for you; see the ahi-aws README.

Part of ahi-python-packages.