OSDU API Client
Project description
Introduction
osdu-client
is a python library implementing a simple OSDU client with an abstracted-out authorization backend.
Instalation
pip install osdu-client
Example
OSDU API client can be adjusted to specific OSDU deployment by defining auth backend according to AuthBackendInterface
methods.
from osdu_client import OSDUAPI
from osdu_client.auth import AuthBackendInterface
class AuthSession(AuthBackendInterface):
base_url = "https://base.url"
default_data_partition_id = "osdu"
authorization_header = {"Authorization": "Bearer access_token"}
def get_sd_connection_params(self):
return {}
auth_backend = AuthSession(
headers={"Authorization": "Bearer XYZ"},
base_url="https://exmaple.com"
)
storage_client = OSDUAPI.client('storage', auth_backend=auth_backend)
response = storage_client.get_record_versions(id="123")
Available services
from osdu_client.client import OSDUAPI
OSDUAPI.print_available_services()
| Name | Versions |
===================================
| dataset | latest |
| entitlements | latest |
| file | latest |
| indexer | latest |
| legal | latest |
| notification | latest |
| partition | latest |
| policy | latest |
| pws | latest |
| rafs | v1, v2 |
| register | latest |
| schema | latest |
| sdms | latest |
| search | latest |
| secret | latest |
| storage | latest |
| wellbore | v2, v3 |
| welldelivery | latest |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
osdu_client-1.3.0.tar.gz
(269.3 kB
view hashes)
Built Distribution
osdu_client-1.3.0-py3-none-any.whl
(323.4 kB
view hashes)
Close
Hashes for osdu_client-1.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30b749b055b09b87c3acd95a647536b380303d951c6152ff7532b16fffc8b6ff |
|
MD5 | 8da8a5df740d5818159dceafc8eb97b7 |
|
BLAKE2b-256 | 79857a24baad6dd5bf4ac4f8483f42cf04c42b9e3e591fdbf1a84f5d358b9fc6 |