Skip to main content

Shared Pydantic contracts for spark-advisor microservices

Project description

spark-advisor-models

Shared Pydantic models and configuration for the spark-advisor ecosystem.

Install

pip install spark-advisor-models

What's inside

  • Spark job metrics — stages, executors, tasks, quantile distributions (model/metrics.py)
  • Analysis output — recommendations, severity levels, causal chains (model/output.py)
  • AI tool schemas — input/output models for Claude API, generated from Pydantic (model/input.py)
  • Spark config wrapper — typed access to spark.* properties (model/spark_config.py)
  • Shared configuration — rule thresholds, AI settings, NATS settings (config.py, settings.py)
  • Structured loggingconfigure_logging(), bind_nats_context(), nats_handler_context() (logging.py)
  • Distributed tracing — OpenTelemetry W3C Traceparent propagation via NATS headers (tracing.py)
  • Utilities — byte formatting, statistics helpers (util/)

Usage

from spark_advisor_models.model.metrics import JobAnalysis, StageMetrics
from spark_advisor_models.config import Thresholds, AiSettings

Links

License

Apache 2.0

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

spark_advisor_models-0.1.16.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spark_advisor_models-0.1.16-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file spark_advisor_models-0.1.16.tar.gz.

File metadata

  • Download URL: spark_advisor_models-0.1.16.tar.gz
  • Upload date:
  • Size: 13.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for spark_advisor_models-0.1.16.tar.gz
Algorithm Hash digest
SHA256 4b666d53edce67ec85bf97db3ddee135e6834b6ac39526d15fc2b7c4fe2e8f51
MD5 931ae8816accdcfaddb041e1a19280d4
BLAKE2b-256 3dd28133e45b714223c9809dff2912c964eb0e63524464f60d9e6758116adbdd

See more details on using hashes here.

File details

Details for the file spark_advisor_models-0.1.16-py3-none-any.whl.

File metadata

  • Download URL: spark_advisor_models-0.1.16-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for spark_advisor_models-0.1.16-py3-none-any.whl
Algorithm Hash digest
SHA256 a2ab492069e386075547851177dd09b98f3e8341a91f37fa048dc6b1e1a21a47
MD5 5cd8044296243dd1bdabc691c8de8ec3
BLAKE2b-256 327435c7d2ddef73ce8a7f3633573879afb238e61d44fe2cd606c745d1376f14

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