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.18.tar.gz (15.7 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.18-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: spark_advisor_models-0.1.18.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","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.18.tar.gz
Algorithm Hash digest
SHA256 9e073f08a26adc9b2a6ba06ad98c18f6b28ab6d7297eea80c0c8b765f0af6de0
MD5 aef2c67742038b79f4315fcd95516144
BLAKE2b-256 a24ec388b7b93849cb4c180a1dfa0f5de7a32056880881ef5c6919548e039888

See more details on using hashes here.

File details

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

File metadata

  • Download URL: spark_advisor_models-0.1.18-py3-none-any.whl
  • Upload date:
  • Size: 18.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","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.18-py3-none-any.whl
Algorithm Hash digest
SHA256 afbdb83b2274c3aadb793fd660f506591ae0bbc62d8a08bf98aea7a1aa258009
MD5 2037bd79a558c6e2d17d4731002568cc
BLAKE2b-256 f41843f56ecbe06722d948d30ba7e1a5f625b0f6dc357180dea6e48b15c58ab0

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