Skip to main content

g6-alert-core

Shared domain layer for the Guardsix Alert SDK (g6-alert).

This package provides the pure, transport-agnostic code shared between the Standalone and Fleet backends:

Module Contents
transport Target (frozen dataclass identifying one destination), Transport (ABC every backend implements)
auth Auth (ABC every backend's credential handling implements)
client AlertClient facade, TargetResult, any_failed, all_ok — the mode-agnostic API g6-alert and library callers use
exceptions Unified exception hierarchy (AlertSDKError base; FleetAlertSDKError alias; unified APIError)
security validate_yaml_path, load_yaml_rule (O_NOFOLLOW + secure_filename), path_is_within, has_traversal
discovery load_discovery_json, find_pool, get_nodes_from_pool, get_pool_summary — Fleet's discovery.json model
rules validate_yaml_rule, normalize_status, normalize_repo_field, extract_mitre_entries, minimum_guardsix_version_violation, build_rule_metadata
packs load_pack_manifest, resolve_repo_list_strict and related repo-resolution helpers
mitre Standalone's MITRE ATT&CK CSV map — ~/.g6/mitre_map.csv if present, else the CSV bundled with this package; Fleet resolves attack tags via its own live API instead
timerange parse_timerange, format_timerange — converts rule YAML's detection.timerange (e.g. "2 hr") to/from the Alert API's timerange_day/timerange_hour/timerange_minute fields, of which only one may be non-zero
version parse_version, meets_minimum_version — backs the minimum_guardsix_version rule-YAML gate (Fleet only)
formatting format_date, truncate_text, format_alert_summary, tabulate_table, print_table
jinja jinja_from_field_mapping (parameterised; reproduces both SDK variants byte-for-byte)

No HTTP or CLI concerns live here — depends only on pyyaml, tabulate, and werkzeug. transport/auth define the seam the two backends implement, but neither module makes network calls itself.


Installation

Installed automatically as a dependency when you install g6-alert:

pip install g6-alert

To install this package alone from PyPI:

pip install g6-alert-core

From source (development)

To install both packages editable from this monorepo:

pip install -e ./g6_alert_core -e ./g6-alert

To install and test this package in isolation:

pip install -e ".[dev]"
pytest -q

See the g6-alert documentation for full SDK and CLI documentation.


Contributing

External contributions are closed for now. This package is distributed through PyPI (pip install g6-alert-core), and is installed automatically with g6-alert.


License

Copyright 2026 Guardsix A/S. Licensed under the Apache License, Version 2.0. See the LICENSE and NOTICE files for the full terms.

Metadata

Release files for g6-alert-core 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for g6-alert-core 1.0.1
File Size Uploaded Provenance Actions
g6_alert_core-1.0.1.tar.gz 92.2 kB Without provenance Details for g6_alert_core-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for g6-alert-core 1.0.1
File Interpreter ABI Platform Actions
g6_alert_core-1.0.1-py3-none-any.whl Python 3 none any Details for g6_alert_core-1.0.1-py3-none-any.whl

Total release size: 163.6 kB

Release files / g6_alert_core-1.0.1.tar.gz

Download URL g6_alert_core-1.0.1.tar.gz
Size 92.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a4613051aba4bdf870161f3177a4342161dd6271b15933ffc0df2bef6ab0f824
BLAKE2b-256 checksum
How to use checksums
d5798bedd73621799f503415d8b7c6d2cb8df33a9476becd859623610a67a39e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.18

Release files / g6_alert_core-1.0.1-py3-none-any.whl

Download URL g6_alert_core-1.0.1-py3-none-any.whl
Size 71.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dc670e221fe530cc2fab31b9cbfb67ee2078cf2774c28e2e7b5c88238e5aaf41
BLAKE2b-256 checksum
How to use checksums
1bb3e4858f001d57215d4f367baf7164a490337d9a421cf9ad1a33c25badf22b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.18

Security for g6-alert-core 1.0.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page