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.2.0.tar.gz (11.3 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.2.0-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for gravi_model_client-0.2.0.tar.gz
Algorithm Hash digest
SHA256 6869e8c8ccba9f3a853c76f838101b804ac8c1f26ea67a6def983692be13ca65
MD5 66f1d6c3b4e4517c9d519b9d45d916d9
BLAKE2b-256 359e452ea483f4c9b372d531ac65dbf5bd3ffc1bbb1f1625cd81ac344eefa13b

See more details on using hashes here.

Provenance

The following attestation bundles were made for gravi_model_client-0.2.0.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.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for gravi_model_client-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 76e7ed8d9cf627b7fca76559784f0776ced3735d0db8355651c0e1b68d8c0d65
MD5 45507a2d43f14b69c592c2a5b8c6adf0
BLAKE2b-256 45bef5ec4981f6aa85c0f1e33e9d41338ab8cfb502d98d32032b4b3310f67839

See more details on using hashes here.

Provenance

The following attestation bundles were made for gravi_model_client-0.2.0-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