Skip to main content

Python client for Gravitate's Demand & Supply optimization models

Project description

gravi-model-client

Python client for Gravitate's demand and supply optimization models.

Installation

pip install gravi-model-client

Usage

from gravi_model_client import GraviModelClient, ModelRunRequest, OptimizationInput

async with GraviModelClient(api_key="your-api-key", base_url="https://...") as client:
    # Health check
    await client.health_check()

    # Run demand model
    result = await client.run_demand_model(request)

    # Run TSD (supply) model
    result = await client.run_tsd_model(optimization)

Models

This package is the single source of truth for all pydantic models used by both the client and the server. Import models directly:

from gravi_model_client.demand import ModelRunRequest, StoreRequest, TankRequest, VolumeRange
from gravi_model_client.tsd import OptimizationInput, Directive, Site, Tank

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

gravi_model_client-0.1.4.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

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

gravi_model_client-0.1.4-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file gravi_model_client-0.1.4.tar.gz.

File metadata

  • Download URL: gravi_model_client-0.1.4.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gravi_model_client-0.1.4.tar.gz
Algorithm Hash digest
SHA256 8018c06550a0c155ec30a73f1639c53b874878cc308792888c8098dafdd1d14b
MD5 9a9c1703942b7a29f03792f7e89fbdce
BLAKE2b-256 e0e3ffac0c48d236abeb3361dbb6c8d8fea3cd3e3cecf486678206cf3fdb5819

See more details on using hashes here.

Provenance

The following attestation bundles were made for gravi_model_client-0.1.4.tar.gz:

Publisher: publish-gravi-model-client.yml on gravitate-energy/demand_only_model

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gravi_model_client-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for gravi_model_client-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ab6ab2ad1812777737e565638cc6b2a45d5f942810fea5de4f0c4569fc182e84
MD5 a036882e26cb9c524ddc68340dc17802
BLAKE2b-256 dda065acc91c568c03764581f91b703dc764681a968406cd4eff3a56db0b8904

See more details on using hashes here.

Provenance

The following attestation bundles were made for gravi_model_client-0.1.4-py3-none-any.whl:

Publisher: publish-gravi-model-client.yml on gravitate-energy/demand_only_model

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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