oceanprotocol-job-details 0.0.1__tar.gz → 0.0.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. {oceanprotocol_job_details-0.0.1 → oceanprotocol_job_details-0.0.2}/PKG-INFO +33 -1
  2. oceanprotocol_job_details-0.0.2/README.md +41 -0
  3. oceanprotocol_job_details-0.0.2/oceanprotocol_job_details/dataclasses/__pycache__/__init__.cpython-39.pyc +0 -0
  4. {oceanprotocol_job_details-0.0.1/src → oceanprotocol_job_details-0.0.2}/oceanprotocol_job_details/dataclasses/__pycache__/constants.cpython-39.pyc +0 -0
  5. {oceanprotocol_job_details-0.0.1/src → oceanprotocol_job_details-0.0.2}/oceanprotocol_job_details/dataclasses/__pycache__/job_details.cpython-39.pyc +0 -0
  6. {oceanprotocol_job_details-0.0.1/src → oceanprotocol_job_details-0.0.2}/oceanprotocol_job_details/job_details.py +3 -3
  7. oceanprotocol_job_details-0.0.2/oceanprotocol_job_details/loaders/__pycache__/__init__.cpython-39.pyc +0 -0
  8. {oceanprotocol_job_details-0.0.1/src → oceanprotocol_job_details-0.0.2}/oceanprotocol_job_details/loaders/__pycache__/loader.cpython-39.pyc +0 -0
  9. oceanprotocol_job_details-0.0.2/oceanprotocol_job_details/loaders/impl/__pycache__/__init__.cpython-39.pyc +0 -0
  10. {oceanprotocol_job_details-0.0.1/src → oceanprotocol_job_details-0.0.2}/oceanprotocol_job_details/loaders/impl/__pycache__/environment.cpython-39.pyc +0 -0
  11. {oceanprotocol_job_details-0.0.1/src → oceanprotocol_job_details-0.0.2}/oceanprotocol_job_details/loaders/impl/environment.py +3 -3
  12. {oceanprotocol_job_details-0.0.1 → oceanprotocol_job_details-0.0.2}/pyproject.toml +2 -2
  13. oceanprotocol_job_details-0.0.1/README.md +0 -9
  14. oceanprotocol_job_details-0.0.1/src/oceanprotocol_job_details/dataclasses/__pycache__/__init__.cpython-39.pyc +0 -0
  15. oceanprotocol_job_details-0.0.1/src/oceanprotocol_job_details/loaders/__pycache__/__init__.cpython-39.pyc +0 -0
  16. oceanprotocol_job_details-0.0.1/src/oceanprotocol_job_details/loaders/impl/__pycache__/__init__.cpython-39.pyc +0 -0
  17. {oceanprotocol_job_details-0.0.1 → oceanprotocol_job_details-0.0.2}/LICENSE +0 -0
  18. {oceanprotocol_job_details-0.0.1/src → oceanprotocol_job_details-0.0.2}/oceanprotocol_job_details/__init__.py +0 -0
  19. {oceanprotocol_job_details-0.0.1/src → oceanprotocol_job_details-0.0.2}/oceanprotocol_job_details/dataclasses/__init__.py +0 -0
  20. {oceanprotocol_job_details-0.0.1/src → oceanprotocol_job_details-0.0.2}/oceanprotocol_job_details/dataclasses/__pycache__/__init__.cpython-313.pyc +0 -0
  21. {oceanprotocol_job_details-0.0.1/src → oceanprotocol_job_details-0.0.2}/oceanprotocol_job_details/dataclasses/__pycache__/constants.cpython-313.pyc +0 -0
  22. {oceanprotocol_job_details-0.0.1/src → oceanprotocol_job_details-0.0.2}/oceanprotocol_job_details/dataclasses/__pycache__/job_details.cpython-313.pyc +0 -0
  23. {oceanprotocol_job_details-0.0.1/src → oceanprotocol_job_details-0.0.2}/oceanprotocol_job_details/dataclasses/constants.py +0 -0
  24. {oceanprotocol_job_details-0.0.1/src → oceanprotocol_job_details-0.0.2}/oceanprotocol_job_details/dataclasses/job_details.py +0 -0
  25. {oceanprotocol_job_details-0.0.1/src → oceanprotocol_job_details-0.0.2}/oceanprotocol_job_details/loaders/__init__.py +0 -0
  26. {oceanprotocol_job_details-0.0.1/src → oceanprotocol_job_details-0.0.2}/oceanprotocol_job_details/loaders/__pycache__/__init__.cpython-313.pyc +0 -0
  27. {oceanprotocol_job_details-0.0.1/src → oceanprotocol_job_details-0.0.2}/oceanprotocol_job_details/loaders/__pycache__/loader.cpython-313.pyc +0 -0
  28. {oceanprotocol_job_details-0.0.1/src → oceanprotocol_job_details-0.0.2}/oceanprotocol_job_details/loaders/impl/__init__.py +0 -0
  29. {oceanprotocol_job_details-0.0.1/src → oceanprotocol_job_details-0.0.2}/oceanprotocol_job_details/loaders/impl/__pycache__/__init__.cpython-313.pyc +0 -0
  30. {oceanprotocol_job_details-0.0.1/src → oceanprotocol_job_details-0.0.2}/oceanprotocol_job_details/loaders/impl/__pycache__/environment.cpython-313.pyc +0 -0
  31. {oceanprotocol_job_details-0.0.1/src → oceanprotocol_job_details-0.0.2}/oceanprotocol_job_details/loaders/loader.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: oceanprotocol-job-details
3
- Version: 0.0.1
3
+ Version: 0.0.2
4
4
  Summary: A Python package to get details from OceanProtocol jobs
5
5
  License: Copyright 2025 Agrospai
6
6
 
@@ -29,3 +29,35 @@ A Python package to get details from OceanProtocol jobs
29
29
  ```
30
30
  pip install oceanprotocol-job-details
31
31
  ```
32
+
33
+ ## Usage
34
+
35
+ As a simple library, we only need to import the main object and use it once:
36
+
37
+ ```Python
38
+ from oceanprotocol_job_details.job_details import OceanProtocolJobDetails
39
+
40
+ # Using default parameters
41
+ job_details = OceanProtocolJobDetails().load()
42
+
43
+ job_details
44
+ ```
45
+
46
+ ### Advanced Usage (not recommended)
47
+
48
+ 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).
49
+
50
+ ```Python
51
+ from oceanprotocol_job_details.job_details import OceanProtocolJobDetails
52
+ from src.oceanprotocol_job_details.loaders.impl.environment import Keys
53
+
54
+ # Fill in with values that will be used instead of env
55
+ custom_mapper = {
56
+ Keys.ALGORITHM: " ... ",
57
+ Keys.DIDS: " ... ",
58
+ Keys.ROOT: " ... ",
59
+ Keys.SECRET: " ... ",
60
+ }
61
+
62
+ job_details = OceanProtocolJobDetails(mapper=custom_mapper).load()
63
+ ```
@@ -0,0 +1,41 @@
1
+ A Python package to get details from OceanProtocol jobs
2
+
3
+ ---
4
+
5
+ ## Installation
6
+
7
+ ```
8
+ pip install oceanprotocol-job-details
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ As a simple library, we only need to import the main object and use it once:
14
+
15
+ ```Python
16
+ from oceanprotocol_job_details.job_details import OceanProtocolJobDetails
17
+
18
+ # Using default parameters
19
+ job_details = OceanProtocolJobDetails().load()
20
+
21
+ job_details
22
+ ```
23
+
24
+ ### Advanced Usage (not recommended)
25
+
26
+ 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).
27
+
28
+ ```Python
29
+ from oceanprotocol_job_details.job_details import OceanProtocolJobDetails
30
+ from src.oceanprotocol_job_details.loaders.impl.environment import Keys
31
+
32
+ # Fill in with values that will be used instead of env
33
+ custom_mapper = {
34
+ Keys.ALGORITHM: " ... ",
35
+ Keys.DIDS: " ... ",
36
+ Keys.ROOT: " ... ",
37
+ Keys.SECRET: " ... ",
38
+ }
39
+
40
+ job_details = OceanProtocolJobDetails(mapper=custom_mapper).load()
41
+ ```
@@ -1,7 +1,7 @@
1
1
  from typing import Literal, Optional
2
- from src.oceanprotocol_job_details.dataclasses.job_details import JobDetails
3
- from src.oceanprotocol_job_details.loaders.loader import Loader
4
- from src.oceanprotocol_job_details.loaders.impl.environment import EnvironmentLoader
2
+ from oceanprotocol_job_details.dataclasses.job_details import JobDetails
3
+ from oceanprotocol_job_details.loaders.loader import Loader
4
+ from oceanprotocol_job_details.loaders.impl.environment import EnvironmentLoader
5
5
 
6
6
  _Implementations = Literal["env"]
7
7
 
@@ -7,13 +7,13 @@ from json import load, loads
7
7
  from pathlib import Path
8
8
  from typing import Optional, final
9
9
 
10
- from src.oceanprotocol_job_details.dataclasses.constants import (
10
+ from oceanprotocol_job_details.dataclasses.constants import (
11
11
  DidKeys,
12
12
  Paths,
13
13
  ServiceType,
14
14
  )
15
- from src.oceanprotocol_job_details.dataclasses.job_details import Algorithm, JobDetails
16
- from src.oceanprotocol_job_details.loaders.loader import Loader
15
+ from oceanprotocol_job_details.dataclasses.job_details import Algorithm, JobDetails
16
+ from oceanprotocol_job_details.loaders.loader import Loader
17
17
 
18
18
 
19
19
  @dataclass(frozen=True)
@@ -2,7 +2,7 @@
2
2
  license = { file = "LICENSE" }
3
3
 
4
4
  name = "oceanprotocol-job-details"
5
- version = "0.0.1"
5
+ version = "0.0.2"
6
6
  authors = [
7
7
  { name = "Christian López García", email = "christian.lopez@udl.cat" },
8
8
  ]
@@ -24,7 +24,7 @@ requires = ["poetry-core>=2.0.0,<3.0.0"]
24
24
  build-backend = "poetry.core.masonry.api"
25
25
 
26
26
  [tool.poetry]
27
- packages = [{ include = "src/oceanprotocol_job_details" }]
27
+ packages = [{ include = "oceanprotocol_job_details" }]
28
28
 
29
29
  [tool.poetry.dependencies]
30
30
  python = ">3.9"
@@ -1,9 +0,0 @@
1
- A Python package to get details from OceanProtocol jobs
2
-
3
- ---
4
-
5
- ## Installation
6
-
7
- ```
8
- pip install oceanprotocol-job-details
9
- ```