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 |
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)
| File | Size | Uploaded | |
|---|---|---|---|
| osdu_client-1.4.0.tar.gz | 269.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|