engel-semantic-layer
Engel-style semantic layer as a Python package.
This package lets users define metrics/modules in YAML (same shape as Engel's code reference) and compile executable BigQuery SQL for a metric query request.
Scope
- YAML loading from:
- one-module-per-file (
module:root), or - single-file semantic layer (
semantic_layer.modules+semantic_layer.cross_module_metrics)
- one-module-per-file (
- Metric types:
sumcountratiocount-distinctcustom-valuecustom-ratioderived-ratio(cross-module, metric-on-metric,join_on: time)
- Metric filters + query-time filters
- Metric slices (
slice_name) for base metrics - Time grain support: none, daily, weekly, monthly, quarterly, yearly
- Breakdowns with dimension access checks
- Governed cohort queries with independent cohort-row grains and calendar or rolling delta periods
- Relationship graph traversal across modules (
relationships, with legacyjoinPathssupport) - BigQuery SQL output
Changelog
See CHANGELOG.md for release notes.
Installation
Install from PyPI:
pip install engel-semantic-layer
Install from TestPyPI (pre-release validation):
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple engel-semantic-layer
Install from source for local development:
pip install -e .
Example
from engel_semantic_layer import QueryFilter, QueryRequest, SemanticLayer
layer = SemanticLayer.from_path("examples/model")
request = QueryRequest(
from_date="2026-01-01T00:00:00Z",
to_date="2026-01-31T23:59:59Z",
time_grain="daily",
breakdown_dimension_ids=["user_email"],
filters=[
QueryFilter(
dimension_id="user_email",
filter_values=["demo-user@example.com"],
)
],
)
sql = layer.compile_sql(metric_id="metric_event_count", request=request)
print(sql)
YAML shape
You can use either:
- one-module-per-file (
module:root), or - a single
semantic_layer.ymlwithmodulesandcross_module_metrics.
module:
schema: "analytics"
table: "records"
identifier: "records"
dimensions:
- column: "country"
type: "country"
metrics:
- identifier: "record_volume"
name: "Record volume"
ai_context:
synonyms:
- "booked value"
- "record amount"
relationships:
formulas:
- id: "record_volume_from_abv_and_bookings"
kind: "product"
expression: "ABV * # Successful Bookings"
inputs:
- metric: "abv"
- metric: "successful_bookings"
influences:
- metric: "sessions"
direction: "positive"
strength: "strong"
confidence: "medium"
note: "Session tracking is directional rather than exact."
calculation: "sum"
time: "records.recorded_at"
value: "records.amount"
dimensions:
- "this.*"
Metric relationship metadata is optional and not used in SQL compilation. It is intended for downstream AI/discovery consumers and metric-tree style tooling.
Relationship metadata fields:
relationships.formulas[].idrelationships.formulas[].kind(sum | product | ratio | difference | custom)relationships.formulas[].expressionrelationships.formulas[].inputs[].metricrelationships.formulas[].machine_expression(optional)relationships.influences[].metricrelationships.influences[].direction(positive | negative | mixed | unknown)relationships.influences[].strength(optional:weak | medium | strong)relationships.influences[].confidence(optional:low | medium | high)relationships.influences[].note(optional)
Cohort metrics
Declare the secondary cohort time on a metric. The metric's existing time remains the activity time used to calculate cohort age. Relationships govern access when the cohort time belongs to another module:
semantic_layer:
modules:
- identifier: "wide_bookings"
schema: "landfolk_prod_wide"
table: "wide_bookings"
relationships:
- to_module: "wide_listings"
from_column: "dim_listing_id"
to_column: "dim_listing_id"
relationship_type: "many-to-one"
join_type: "left"
metrics:
- identifier: "future_gbv"
name: "Future GBV"
calculation: "sum"
time: "wide_bookings.created_at"
value: "wide_bookings.gross_booking_value"
cohort:
time: "wide_listings.first_successful_booking_at"
filters:
- column: "state"
operator: "in"
expression: "confirmed,completed,cancelled"
- identifier: "wide_listings"
schema: "landfolk_prod_wide"
table: "wide_listings"
Compile monthly cohort rows with weekly lifecycle offsets:
{
"cohort": {
"startDate": "2025-09-01",
"timeGrain": "monthly",
"deltaGrain": "weekly",
"timeCalculation": "calendar"
}
}
Cohort output is always the canonical {metric, time, delta} shape:
metric: metric aggregate cast to BigQueryFLOAT64time: model-declared cohort time bucketed bycohort.timeGraindelta: activity time minus cohort time usingcohort.deltaGrainandcohort.timeCalculation; calendar mode preserves negative pre-entry offsets, while rolling mode follows BigQueryDIV/Steep semantics and truncates sub-period negative differences toward zero
timeCalculation supports two Steep-aligned modes:
calendar(default): truncate activity and cohort dates to the selecteddeltaGrain, then use BigQueryDATE_DIFF. Weekly SQL usesISOWEEK.rolling: calculate elapsed days from each entity's exact cohort date and divide by the selected period:daily=1,weekly=7,monthly=30,quarterly=90,yearly=365.
For example, rolling monthly offsets use:
CAST(DIV(DATE_DIFF(
CAST(activity_time AS DATE),
CAST(cohort_time AS DATE),
DAY
), 30) AS INT64) AS delta
Row and delta grains remain independent in either mode. Monthly rows with calendar-weekly deltas group entities by start month while preserving each entity's actual start week as the delta baseline; weekly rows with rolling-monthly deltas group by start week while measuring exact elapsed 30-day periods. startDate must align to the beginning of its cohort row grain (Monday for weekly, first day of the month/quarter/year for broader grains), preventing partial first cohorts.
Cohort relationship traversal must be fanout-safe and supports left and inner joins. Cohort requests may use metric slices and query filters, but reject ordinary date ranges, breakdowns, comparisons, targets, cumulative transforms, and period-clipping options. Compiled cohort SQL ends with LIMIT 500000; explain metadata exposes this as cohort_row_limit. Exactly 500,000 returned rows may therefore indicate truncation.
This implements Steep-aligned standard cohorts with calendar and rolling period calculations. Percentage-of-initial-value retention, dimension cohorts, advanced pre-aggregated cohorts, and drill-down queries are not included.
See the complete model in examples/cohorts.yml.
Relationships
Relationship example (use dimensions from another module safely):
module:
identifier: "orders"
schema: "analytics"
table: "orders"
dimensions:
- column: "customer_id"
type: "categorical"
relationships:
- to_module: "customers"
from_column: "customer_id"
to_column: "id"
relationship_type: "many-to-one" # one-to-one | one-to-many | many-to-one | many-to-many
join_type: "left" # left | inner | full | right
metrics:
- identifier: "orders_count"
name: "Orders"
calculation: "count"
time: "orders.created_at"
dimensions:
- "customers.country"
Cross-module derived ratio in single-file mode:
semantic_layer:
modules:
- identifier: "wide_metric_count_a"
project: "demo-project-123456"
schema: "analytics_wide"
table: "wide_metric_count_a"
metrics:
- identifier: "metric_actual_primary"
name: "Primary Metric, Actual"
calculation: "sum"
time: "wide_metric_count_a.fulfilled_at"
value: "wide_metric_count_a.value_primary_amount"
filters:
- column: "settled_at"
operator: "is-not"
expression: "NULL"
- identifier: "entity_snapshots"
project: "demo-project-123456"
schema: "analytics_marts"
table: "entity_snapshots"
metrics:
- identifier: "metric_entities_active"
name: "# Active Entities"
calculation: "count-distinct"
time: "entity_snapshots.date"
distinct_on: "entity_snapshots.dim_entity_id"
filters:
- column: "is_live"
operator: "is"
expression: "true"
cross_module_metrics:
- identifier: "ratio_primary_per_entity"
name: "Primary Metric per Active Entity"
calculation: "derived-ratio"
numerator_metric: "metric_actual_primary"
denominator_metric: "metric_entities_active"
join_on: "time"
join_type: "inner" # optional: inner | left | full
relationships:
formulas:
- id: "ratio_from_primary_and_active_entities"
kind: "ratio"
expression: "Primary Metric, Actual / # Active Entities"
inputs:
- metric: "metric_actual_primary"
- metric: "metric_entities_active"
API/OpenAPI field mapping (camelCase -> YAML snake_case):
sqlExpression->sql_expressionnumeratorSql->numerator_sqldenominatorSql->denominator_sqlnumeratorMetricId->numerator_metricdenominatorMetricId->denominator_metric
Notes:
derived-ratiocurrently supportsjoin_on: time.join_typesupportsinner(default),left, andfull(FULL OUTER JOIN).- query request must include
timeGrainfor cross-module metrics; usetimeGrain: noneto aggregate each component over the exact requested period before calculating the ratio. - requested breakdowns must be available on both numerator and denominator metrics.
Publishing
Release asset workflow:
.github/workflows/release-assets.yml
What it does:
- Runs tests
- Builds wheel + sdist
- Uploads artifacts to the GitHub release for
v*tags - On manual dispatch, can attach to a specified tag or create a draft release
CLI
Validate your semantic model:
engel-semantic-layer validate --model-path examples/model --json
Compact summary output for CI logs:
engel-semantic-layer validate --model-path examples/model --json --summary-only
Validate that all metrics are compilable with synthetic dates (uses --time-grain monthly by default so cross-module metrics compile too):
engel-semantic-layer validate \
--model-path examples/model \
--json \
--check-compilable
Override synthetic compile time grain when needed:
engel-semantic-layer validate \
--model-path examples/semantic_layer.yml \
--check-compilable \
--time-grain weekly
Use period shortcuts instead of explicit from/to:
engel-semantic-layer validate \
--model-path examples/model \
--check-compilable \
--period "last 12 months"
Write a full validation report artifact for CI (includes warning summary, compile failures, and per-metric validation statuses):
engel-semantic-layer validate \
--model-path examples/model \
--check-compilable \
--report /tmp/semantic-validate-report.json
Fail on semantic warnings:
engel-semantic-layer validate \
--model-path examples/model \
--warnings-as-errors
Validate with strict column linting for all metrics:
engel-semantic-layer validate \
--model-path examples/model \
--json \
--strict-column-lint \
--column-registry /tmp/registry.json
Fail on potential fanout-risk relationship traversals during compile checks:
engel-semantic-layer validate \
--model-path examples/model \
--check-compilable \
--strict-relationships
List metrics:
engel-semantic-layer metrics --model-path examples/model
Machine-readable list + filters:
engel-semantic-layer metrics \
--model-path examples/model \
--format json \
--module fact_records \
--calculation sum
Generate a browser-friendly HTML metrics catalog:
Installed CLI:
engel-semantic-layer catalog \
--model-path examples/model \
--output /tmp/metrics-catalog.html \
--open
From source during local development:
uv run engel-semantic-layer catalog \
--model-path examples/model \
--output /tmp/metrics-catalog.html \
--open
--model-path accepts either:
- a directory of YAML files (for example
examples/model), or - a single semantic layer file (for example
examples/semantic_layer.yml)
What the catalog includes:
- search
- module / calculation / category filters
- grouped metric list
- metric detail pane
- expandable sample compiled SQL preview
- joins overview
- links back to source YAML files
Notes:
- the generated HTML is self-contained
--openopens the generated file in your default browser- source links are local
file://links, so they work on the machine that generated the catalog
Inspect module join graph:
engel-semantic-layer joins --model-path examples/model --format json
Compile SQL from a metric + request payload:
engel-semantic-layer compile \
--model-path examples/model \
--metric-id metric_event_count \
--request /tmp/request.json \
--format sql
Compile a cross-module derived ratio from single-file semantic layer:
engel-semantic-layer compile \
--model-path examples/semantic_layer.yml \
--metric-id ratio_primary_per_entity \
--request /tmp/request.json \
--period "last 12 months" \
--format sql
Compile a governed cohort request (no ordinary fromDate/toDate is required):
engel-semantic-layer compile \
--model-path examples/cohorts.yml \
--metric-id future_gbv \
--request /tmp/cohort-request.json \
--format sql
Get compiler explain output (resolved metadata + source files):
engel-semantic-layer compile \
--model-path examples/model \
--metric-id metric_event_count \
--request /tmp/request.json \
--format explain
Validate request compatibility without returning SQL:
engel-semantic-layer compile \
--model-path examples/model \
--metric-id metric_event_count \
--request /tmp/request.json \
--dry-run-validate
Use period shortcuts in compile:
engel-semantic-layer compile \
--model-path examples/model \
--metric-id metric_event_distinct_count \
--request /tmp/request.json \
--period "Q1 2025"
Supported period formats:
last x yearslast x monthslast x quarterslast x weekslast x dayscurrent year(YTD)
last x weeks returns full Monday-Sunday week buckets ending with the current week.
Example: last 52 weeks on 2026-02-15 resolves to 2025-02-17 through 2026-02-15.
last x days uses an inclusive lookback window: from today - x days through today.
Example: last 30 days returns 31 daily buckets when today is included, and 30 when excludeToday is enabled.
current month(MTD)QX YYYY(e.g.Q2 2025)YYYY(e.g.2025)MM-YYYY(e.g.02-2025)
Time comparison options in request payload (timeComparison):
- Percentage comparisons:
YoY,MoM - Comparison values:
Last Year,Last Month - Daily-only percentage comparison:
YoY (Match Weekday)
YoY (Match Weekday) requires timeGrain: daily and compares to 364 days prior.
With timeGrain: none, comparisons are done as full-window totals (e.g. YTD vs last YTD).
Target comparison options in request payload:
targetSeries(e.g.budget_current,stretch_target)targetComparisonMode:both(default),value,percentage
Target output matrix:
| targetComparisonMode | target_value |
target_comparison_percentage |
|---|---|---|
both |
✅ | ✅ |
value |
✅ | ❌ |
percentage |
❌ | ✅ |
Example request snippets:
{ "targetSeries": "budget_current", "targetComparisonMode": "both" }
{ "targetSeries": "budget_current", "targetComparisonMode": "value" }
{ "targetSeries": "budget_current", "targetComparisonMode": "percentage" }
Period handling options in request payload:
excludeOpenPeriod(true|false)excludeToday(true|false)
When excludeOpenPeriod is true, the compiler excludes the currently open period bucket
for the selected timeGrain (e.g. current month for monthly, current day for daily).
When excludeToday is true, the compiler clips toDate by one day before other period logic.
Cumulative options in request payload:
cumulativeMode:mtd,ytd,rolling_days,rolling_monthsrollingDays: positive integer (required only forrolling_days)rollingMonths: positive integer (required only forrolling_months)
Validation rules:
mtdrequirestimeGrain: dailyrolling_daysrequirestimeGrain: dailyrolling_monthsrequirestimeGrain: monthlyytdworks with daily/weekly/monthly/quarterly/yearly grains- cumulative modes require a time grain (not
none) - cumulative + targets requires
targetComparisonModeto include values (valueorboth)
Output columns for cumulative mode:
metric_base(original bucket metric)metric(cumulative metric)- if
targetSeriesis set:target_value_base+ cumulativetarget_value
rolling_months builds trailing monthly time series such as L12M/L6M/L3M. For additive metrics it sums bucket values in the trailing window. For ratio, custom-ratio, and cross-module derived-ratio metrics it recomputes the ratio from rolling numerator and denominator sums, so metrics such as take rate compile as trailing revenue / trailing GBV rather than an average of monthly rates. With timeComparison, comparison values are joined after rolling, so YoY compares L12M-to-L12M rather than raw month-to-raw month. With targetSeries, monthly targets are joined over the expanded window and the trailing-N-month rolling sum is applied to both metric and target_value, mirroring how ytd/mtd cumulate joined targets. Custom-ratio numerator/denominator SQL must be additive across monthly buckets for this to be semantically correct.
Named metric variants can bake these request transforms into the semantic model without duplicating the base metric SQL:
- identifier: gbv_ttm
name: GBV TTM
calculation: metric-variant
base_metric: future_gbv
query_defaults:
time_grain: monthly
cumulative_mode: rolling_months
rolling_months: 12
Compiling gbv_ttm applies those defaults automatically. Request-level fields such as timeComparison: yoy can still be added on top; conflicting request transforms (for example rollingMonths: 6) are rejected.
When targetSeries is provided, the compiler joins aggregated targets from
demo-project-123456.analytics_prod.fct_targets_monthly by metric identifier,
selected date range, and breakdown dimensions (if any), and returns target columns
based on targetComparisonMode (both by default):
target_valuetarget_comparison_percentage
Breaking contract: format: percentage controls presentation metadata only. Compiled metric values and target_value use canonical ratios everywhere: a custom ratio with numerator 5536 and denominator 10000 compiles to unscaled SAFE_DIVIDE(...), yielding 0.5536, which consumers present as 55.36%. The compiler never multiplies percentage-formatted actuals or targets by 100, including direct ratio/custom-ratio metrics, exact-period and cohort metrics, same-module and cross-module derived ratios, metric variants, and cumulative or rolling transforms. comparison_percentage and target_comparison_percentage remain percentage-scaled relative-change outputs, so comparing 0.377 with 0.4 returns -5.75, not -0.0575.
Consumers upgrading from percentage-point output must multiply metric and target_value by 100 when rendering percentages. Stored direct percentage targets must be ratios too; migrate 40 to 0.4. Component targets used to derive ratios keep their native additive units because their quotient already produces a ratio. Metrics without format: percentage are unchanged.
For cross-module derived-ratio metrics, and same-module ratio metrics where the numerator and denominator can be mapped unambiguously to additive component metrics in the same module, target comparison is built from the component targets instead of a dedicated ratio target row:
- numerator target uses the numerator metric's
target_name(or identifier) - denominator target uses the denominator metric's
target_name(or identifier) - returned
target_valueis the rationumerator_target / denominator_target, including when the ratio metric usesformat: percentage
This means ratio targets stay dimension-safe as long as the component targets are
additive, so you do not need weighted target rows for every breakdown combination. Same-module ratio target derivation falls back to the dedicated ratio target row when the numerator or denominator component metric cannot be inferred unambiguously.
Target source can be overridden in CLI with:
--target-project--target-schema--target-table
With --strict-column-lint, target columns used for series/metric/time/value,
breakdowns, and dimension filters are validated against the column registry.
End-to-end request example (comparison + target + cumulative + period clipping):
{
"fromDate": "2026-01-01T00:00:00Z",
"toDate": "2026-12-31T23:59:59Z",
"timeGrain": "monthly",
"timeComparison": "YoY",
"targetSeries": "budget_current",
"targetComparisonMode": "both",
"cumulativeMode": "ytd",
"excludeOpenPeriod": true,
"excludeToday": true,
"breakdownDimensionIds": ["segment_group"],
"filters": [
{
"dimensionId": "segment_group",
"filterValues": ["SegmentA"]
}
]
}
You can also pipe request JSON through stdin:
echo '{"fromDate":"2026-01-01T00:00:00Z","toDate":"2026-01-31T23:59:59Z"}' | \
engel-semantic-layer compile \
--model-path examples/model \
--metric-id metric_event_distinct_count \
--request -
Compile with strict column linting:
engel-semantic-layer compile \
--model-path examples/model \
--metric-id metric_actual_secondary \
--request /tmp/request.json \
--strict-column-lint \
--column-registry /tmp/registry.json
Compile with strict relationship checks (fails on potential fanout-risk traversals):
engel-semantic-layer compile \
--model-path examples/model \
--metric-id metric_actual_secondary \
--request /tmp/request.json \
--strict-relationships
Optional strict column linting
You can enforce table+column existence checks during compile by providing a column registry.
from engel_semantic_layer import ColumnRegistry, QueryRequest, SemanticLayer
registry = ColumnRegistry.from_dict(
{
"analytics_wide": {
"wide_metric_count_a": ["recorded_at", "fulfilled_at", "value_secondary_amount", "status"]
}
}
)
layer = SemanticLayer.from_path(
"examples/model",
strict_column_lint=True,
column_registry=registry,
)
sql = layer.compile_sql(
"metric_actual_secondary",
QueryRequest(from_date="2026-01-01T00:00:00Z", to_date="2026-01-31T23:59:59Z"),
)
You can also construct the registry from INFORMATION_SCHEMA.COLUMNS rows using
ColumnRegistry.from_information_schema_rows(...).
CLI helper:
engel-semantic-layer registry from-information-schema \
--input /tmp/information_schema_rows.json \
--output /tmp/registry.json
Input supports both:
- JSON array (
[ {...}, {...} ]) - JSONL (one JSON object per line)
Testing
The test suite includes SQL snapshot tests for representative metrics. Run:
uv run --extra dev pytest -q
If SQL output intentionally changes, update snapshot files in tests/snapshots/.
CLI exit codes:
0success2validation/parse/compile input error
For machine-readable failures, use --json-errors:
engel-semantic-layer --json-errors compile ...
Notes
- This compiler focuses on BigQuery SQL generation.
- Output aims to be Engel-like SQL, but this is an independent implementation.
- Strict validation is enabled for basics: duplicate IDs, unsupported operators/calculations, invalid metric field combinations, and disallowed breakdown/filter dimensions.
- Custom SQL metric expressions are normalized for BigQuery string literals (double-quoted strings are converted to single-quoted literals).
- Custom SQL reference linting is enabled: dotted references in custom expressions are validated and unknown table references fail at compile time.
- Query compilation guards against invalid breakdown requests (max 2 dimensions, no duplicates, no alias collisions).
- Cohort compilation derives
deltain governed SQL from bucketed activity and cohort dates; clients do not reconstruct cohorts from raw timestamps. - Missing join-path errors are actionable and include metric + module context plus reference sources (which fields caused the dependency).
Metadata
Release files for engel-semantic-layer 0.5.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| engel_semantic_layer-0.5.2.tar.gz | 77.4 kB | With provenance | Details for engel_semantic_layer-0.5.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| engel_semantic_layer-0.5.2-py3-none-any.whl | Python 3 | none | any | Details for engel_semantic_layer-0.5.2-py3-none-any.whl |
Total release size: 133.7 kB
Release files / engel_semantic_layer-0.5.2.tar.gz
| Download URL | engel_semantic_layer-0.5.2.tar.gz |
|---|---|
| Size | 77.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
379e32e164c0ac0262757322857c7e05fbd0ef47a03da8af061e77930e2791f6
|
|
BLAKE2b-256 checksum How to use checksums |
92096aea5243ca15d7e0b2e43a090802520e1f295e474ca7984d5842122df253
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.
Transparency logRelease files / engel_semantic_layer-0.5.2-py3-none-any.whl
| Download URL | engel_semantic_layer-0.5.2-py3-none-any.whl |
|---|---|
| Size | 56.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0204a54d23b7aafce3be1abb9d04109f8108a7892a094b80ff752a52cc4dac61
|
|
BLAKE2b-256 checksum How to use checksums |
90f72f4158823acf2cc5ade742babefc8afff5da1a1b4bc01b8d3b70799d3bd2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.
Transparency logSecurity for engel-semantic-layer 0.5.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for engel_semantic_layer-0.5.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.