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()

Assumes the following directory structure:

<ROOT_FOLDER>
└───data
    ├───ddos
    ├───inputs
    └───logs

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 oceanprotocol_job_details.loaders.impl.environment import Keys

# Fill in with values that will be used instead of env
custom_mapper = {
    Keys.ROOT_FOLDER: " ... ", # Use when you don't want the algorithm to take '/' as base Path
    Keys.ALGORITHM: " ... ",
    Keys.DIDS: " ... ",
    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.9.tar.gz (4.8 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.9-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for oceanprotocol_job_details-0.0.9.tar.gz
Algorithm Hash digest
SHA256 96e08f67900f71128cda94b7433ed0a3e6aa18832ae3d95426df6e73a85f0a60
MD5 a31c079e11ff5f58a924c7bfb8cb9086
BLAKE2b-256 d4eabb65e0f4d5429ade18c0ab3c31d46af8a3798405a6d1bf0509e253f284ed

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oceanprotocol_job_details-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 43a39a63f17ea3c70476f822860a5b10084d68fca1a95abe6f9a138b1b283e92
MD5 94bf4184ee94991b172957bdacbb9d27
BLAKE2b-256 3686f91fe2fa031c4e3ba3b940a3128550d9856fef53cbc45404de41ec8b6e94

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