Skip to main content

A small simple python client for interacting with the OSDU API.

Project description

osdupy

A simple python client for the OSDU data platform.

Usage

Installation

pip install osdupy

Example

sample.py

from getpass import getpass()
from osdu import client

password = getpass()
osdu = client.init(api_url, client_id, user, password)

# Search for records by query.
query = {
    "kind": f"opendes:osdu:*:*"
}
result = osdu.search.query_with_cursor(query, max_results=10)

# Get a record.
record_id = 'opendes:doc:01255650acef4930a04048dbb4b559d0'
result = osdu.storage.get_record(record_id)

See tests for more copmrehensive usage examples.

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

osdupy-0.0.1.tar.gz (3.6 kB view hashes)

Uploaded Source

Built Distribution

osdupy-0.0.1-py3-none-any.whl (6.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page