Skip to main content

Introduction

pypi

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     |

Metadata

Release files for osdu-client 1.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for osdu-client 1.4.0
File Size Uploaded
osdu_client-1.4.0.tar.gz 269.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for osdu-client 1.4.0
File Interpreter ABI Platform
osdu_client-1.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 592.8 kB

Release files / osdu_client-1.4.0.tar.gz

Download URL osdu_client-1.4.0.tar.gz
Size 269.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e8bbbb37092ca8ef6a857a578fb7c08b41b66ac3196ca18612f38a8f1c88354a
BLAKE2b-256 checksum
How to use checksums
cd969fe2641b8bf6e544cc78d0810a8662eb132ac3541d27ad4cd962a121d953
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.8.18 Linux/6.5.0-1025-azure

Release files / osdu_client-1.4.0-py3-none-any.whl

Download URL osdu_client-1.4.0-py3-none-any.whl
Size 323.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d30488784a3f9393e1e802e0f175bb436b8839eb9a1802476c09f535eef7db56
BLAKE2b-256 checksum
How to use checksums
6fa243c70b4ed18305310a160c7d232ba2b5ec749f9e05a0add13f6fe0a43b43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.8.18 Linux/6.5.0-1025-azure

Release history Release notifications | RSS feed

This release

1.4.0 This release

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page