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.11.tar.gz (11.8 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.11-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: spark_advisor_models-0.1.11.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","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.11.tar.gz
Algorithm Hash digest
SHA256 a0825763768ec106771a36b07f3ff171ec9c4ebfb6d7d4951143a423f3f72c6e
MD5 d50d5f56ea4dd24265bd06a49e396d78
BLAKE2b-256 c89b5d4d6b9013e8b21b4e53538438432d82d23e8b8af5ef52880161df201fbf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: spark_advisor_models-0.1.11-py3-none-any.whl
  • Upload date:
  • Size: 14.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","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.11-py3-none-any.whl
Algorithm Hash digest
SHA256 cf65645f075a92dd76d7252d36995c85f7f59de9c735e041bf76e83187d34a9c
MD5 0ce90113df98bd8689d44fe768f9f717
BLAKE2b-256 65a6a30612fe011cd4acb62b156e344305604b26b0d07a8cdd6a8b39162c0998

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