Skip to main content

Python SDK helpers for the whitson+ external API.

Project description

whitson+ Connect SDK

Python SDK for the whitson+ external API.

Use this package to authenticate with whitson+, read well and production data, upload production data, update wells, and connect whitson+ to database workflows.

Install

Install it with:

pip install whitson-plus-connect

For Databricks SQL connector workflows:

pip install "whitson-plus-connect[databricks]"

For Snowflake workflows:

pip install "whitson-plus-connect[snowflake]"

For SQL Server or other ODBC workflows:

pip install "whitson-plus-connect[odbc]"

Usage

Set your API credentials as environment variables:

export WHITSON_CLIENT_NAME="your_domain"
export WHITSON_CLIENT_ID="your_client_id"
export WHITSON_CLIENT_SECRET="your_client_secret"
export WHITSON_PROJECT_ID="123"

Values set with export are available only in that terminal session and to programs started from that terminal.

import os

from whitson_plus_connect import WhitsonClient

client = WhitsonClient.from_env().authenticate()
wells = client.wells.list(int(os.environ["WHITSON_PROJECT_ID"]))
well = client.wells.get(well_id=123)

Existing whitson_connect workflows can keep using WhitsonConnection directly:

from whitson_plus_connect import WhitsonConnection

whitson_connection = WhitsonConnection(
    client_name="your_domain",
    client_id="your_client_id",
    client_secret="your_client_secret",
)
whitson_connection.authenticate()

When using WhitsonClient, the underlying WhitsonConnection is still available as client.connection for scripts that need the original Whitson Connect method names.

Database integrations

Database helpers are available through the SDK client:

client.snowflake.connect(...)
client.snowflake.query_to_dataframe(...)

client.databricks.connect_sql(...)
client.databricks.connect(...)
client.databricks.connect_oauth2(...)

client.prodman.get_wells(...)
client.prodman.get_production(...)

Install the matching optional dependency before using these helpers:

pip install "whitson-plus-connect[snowflake]"
pip install "whitson-plus-connect[databricks]"
pip install "whitson-plus-connect[odbc]"

Documentation

See the whitson+ external API manual for setup steps and workflow examples:

https://manual.whitson.com/external_api/sdk/

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

whitson_plus_connect-0.1.0.tar.gz (49.2 kB view details)

Uploaded Source

Built Distribution

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

whitson_plus_connect-0.1.0-py3-none-any.whl (59.1 kB view details)

Uploaded Python 3

File details

Details for the file whitson_plus_connect-0.1.0.tar.gz.

File metadata

  • Download URL: whitson_plus_connect-0.1.0.tar.gz
  • Upload date:
  • Size: 49.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for whitson_plus_connect-0.1.0.tar.gz
Algorithm Hash digest
SHA256 987052310d967d9d84337c95e9648067c8d0ac9f6c501d24e495df6bbd65b72a
MD5 c46d5b669d0fb1291d603a3d6bc479de
BLAKE2b-256 28311172fb61004e1ead0189bfa5db0a16defa3b7ab24c2db3d197e2c36d8424

See more details on using hashes here.

File details

Details for the file whitson_plus_connect-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for whitson_plus_connect-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bbbda8e57fa6e4ccbfc0c6fa86541146c3b167c0920fe4fb41732553d75ac107
MD5 eb423bbde31511f9b3a8d9f6e54e5722
BLAKE2b-256 bebcd1ff1962f863ff3e2f777e849212df6fc0e0301519e9efe04de9d50e9e01

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