Skip to main content

A Python package to get details from OceanProtocol jobs

Project description

A Python package to get details from OceanProtocol jobs


Installation

pip install oceanprotocol-job-details

Usage

As a simple library, we only need to import the main object and use it once:

from oceanprotocol_job_details.job_details import OceanProtocolJobDetails

# Using default parameters
job_details = OceanProtocolJobDetails().load()

job_details

Advanced Usage (not recommended)

If instead of the environment variables, we want to use another kind of mapping, can pass it as a parameter and it will work as long as it has the same key values (Can be implemented in a more generic way, but there is no need right now).

from oceanprotocol_job_details.job_details import OceanProtocolJobDetails
from src.oceanprotocol_job_details.loaders.impl.environment import Keys

# Fill in with values that will be used instead of env
custom_mapper = {
    Keys.ALGORITHM: " ... ",
    Keys.DIDS: " ... ",
    Keys.ROOT: " ... ",
    Keys.SECRET: " ... ",
}

job_details = OceanProtocolJobDetails(mapper=custom_mapper).load()

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

oceanprotocol_job_details-0.0.2.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

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

oceanprotocol_job_details-0.0.2-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

File details

Details for the file oceanprotocol_job_details-0.0.2.tar.gz.

File metadata

File hashes

Hashes for oceanprotocol_job_details-0.0.2.tar.gz
Algorithm Hash digest
SHA256 e5c601b72934a96ff632938824292f6f0bbba7fe4703d12dc179d5e682c5c392
MD5 f3b5b0ee09ec5f068da4adcf27c3a52f
BLAKE2b-256 3292a1d09ce65bf1232b04d12b100ba0adff5014148d357e1bd6f6245afa214c

See more details on using hashes here.

File details

Details for the file oceanprotocol_job_details-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for oceanprotocol_job_details-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6071f2ecfd0124a0729e85de0fa4ad9f54e93e01ff19b546cbd03ba7ae68b0ae
MD5 c62e30f6236e00f575d4e6cfebb6b7ee
BLAKE2b-256 ce7627ee5171db0d7ff0138e92dcbd63faadd768eea60faccf800b5872885a8d

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