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 import JobDetails
# Having no algorithm input parameters
job_details = JobDetails.load()
If our algorithm has custom input parameters and we want to load them into our algorithm, we can do it as follows:
from dataclasses import dataclass
from oceanprotocol_job_details import JobDetails
@dataclass
class InputParameters:
name: str
age: int
job_details: JobDetails[InputParameters] = JobDetails.load(InputParameters)
# Usage (is type hinted)
job_details.input_parameters.name
job_details.input_parameters.age
Assumes the directory structure of OceanProtocol algorithms.
Core functionalities
Given the Ocean Protocol job details structure, parses the passed algorithm parameters into an object to use in your algorithms.
- Input parameter JSON parsing and validation
- Metadata and service extraction from the directory structure.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file oceanprotocol_job_details-0.2.5.tar.gz.
File metadata
- Download URL: oceanprotocol_job_details-0.2.5.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e90142149255d75873729eb896c30c64f1b91446ff6e64506a980b476f1fa15
|
|
| MD5 |
114b8ed1522d0658c37782f235f466b9
|
|
| BLAKE2b-256 |
5a36e3a8af2c28544847283c7c9f9d089fa773cea6dc3bb9f4760129468e8ace
|
File details
Details for the file oceanprotocol_job_details-0.2.5-py3-none-any.whl.
File metadata
- Download URL: oceanprotocol_job_details-0.2.5-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb1af9b66b8e34a88c6b322281d10ab405e1e7397a2120c8c933976393c13aeb
|
|
| MD5 |
86e761b9f5913bef89d2d05f3c564f8e
|
|
| BLAKE2b-256 |
1b47f28d81762bcfa0ae6e746c22d5311a63d47302fbbbd3834b7d70fd692406
|