hexkit 8.6.0__tar.gz → 9.0.1__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.
- {hexkit-8.6.0/src/hexkit.egg-info → hexkit-9.0.1}/PKG-INFO +20 -19
- {hexkit-8.6.0 → hexkit-9.0.1}/README.md +11 -11
- {hexkit-8.6.0 → hexkit-9.0.1}/pyproject.toml +10 -120
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/opentelemetry/instrumentation.py +2 -1
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/s3/testutils/_utils.py +5 -5
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/testing/dao.py +33 -1
- {hexkit-8.6.0 → hexkit-9.0.1/src/hexkit.egg-info}/PKG-INFO +20 -19
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit.egg-info/requires.txt +2 -1
- {hexkit-8.6.0 → hexkit-9.0.1}/LICENSE +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/MANIFEST.in +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/setup.cfg +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/__init__.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/__main__.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/base.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/config.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/correlation.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/custom_types.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/log.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/opentelemetry/__init__.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/opentelemetry/testutils.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/protocols/__init__.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/protocols/dao.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/protocols/daopub.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/protocols/daosub.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/protocols/eventpub.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/protocols/eventsub.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/protocols/kvstore.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/protocols/objstorage.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/__init__.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/akafka/__init__.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/akafka/config.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/akafka/provider/__init__.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/akafka/provider/daosub.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/akafka/provider/eventpub.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/akafka/provider/eventsub.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/akafka/provider/utils.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/akafka/testcontainer.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/akafka/testutils.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/mongodb/__init__.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/mongodb/config.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/mongodb/migrations/__init__.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/mongodb/migrations/_manager.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/mongodb/migrations/_utils.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/mongodb/migrations/helpers.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/mongodb/provider/__init__.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/mongodb/provider/client.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/mongodb/provider/dao.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/mongodb/provider/kvstore.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/mongodb/provider/utils.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/mongodb/testutils.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/mongokafka/__init__.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/mongokafka/config.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/mongokafka/provider/__init__.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/mongokafka/provider/daopub.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/mongokafka/provider/persistent_pub.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/mongokafka/testutils.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/redis/__init__.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/redis/config.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/redis/provider/__init__.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/redis/provider/client.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/redis/provider/kvstore.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/redis/testutils.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/s3/__init__.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/s3/config.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/s3/provider/__init__.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/s3/provider/kvstore.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/s3/provider/objstorage.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/s3/test_files/__init__.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/s3/test_files/test_file1.yaml +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/s3/test_files/test_file2.yaml +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/s3/test_files/test_file3.yaml +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/s3/test_files/test_file4.yaml +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/s3/testutils/__init__.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/s3/testutils/_fixtures.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/s3/testutils/_typical_workflow.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/testing/__init__.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/testing/eventpub.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/testing/kvstore.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/testing/objstorage.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/vault/__init__.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/vault/config.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/vault/provider/__init__.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/vault/provider/client.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/vault/provider/kvstore.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/providers/vault/testutils.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/py.typed +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit/utils.py +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit.egg-info/SOURCES.txt +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit.egg-info/dependency_links.txt +0 -0
- {hexkit-8.6.0 → hexkit-9.0.1}/src/hexkit.egg-info/top_level.txt +0 -0
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hexkit
|
|
3
|
-
Version:
|
|
3
|
+
Version: 9.0.1
|
|
4
4
|
Summary: A Toolkit for Building Microservices using the Hexagonal Architecture
|
|
5
5
|
Author-email: "German Human Genome Phenome Archive (GHGA)" <contact@ghga.de>
|
|
6
6
|
License: Apache 2.0
|
|
7
|
-
Project-URL: Repository, https://github.com/ghga-de/
|
|
7
|
+
Project-URL: Repository, https://github.com/ghga-de/ghga
|
|
8
8
|
Project-URL: Documentation, https://ghga-de.github.io/hexkit/
|
|
9
|
-
Project-URL: Release Notes, https://github.com/ghga-de/
|
|
10
|
-
Project-URL: Issue Tracker, https://github.com/ghga-de/
|
|
9
|
+
Project-URL: Release Notes, https://github.com/ghga-de/ghga/releases
|
|
10
|
+
Project-URL: Issue Tracker, https://github.com/ghga-de/ghga/issues
|
|
11
11
|
Classifier: Development Status :: 5 - Production/Stable
|
|
12
12
|
Classifier: Operating System :: POSIX :: Linux
|
|
13
|
-
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.11
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.12
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
17
18
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
18
|
-
Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
|
|
19
19
|
Classifier: Topic :: Software Development :: Libraries
|
|
20
20
|
Classifier: Intended Audience :: Developers
|
|
21
|
-
Requires-Python: >=3.
|
|
21
|
+
Requires-Python: >=3.11
|
|
22
22
|
Description-Content-Type: text/markdown
|
|
23
23
|
License-File: LICENSE
|
|
24
24
|
Requires-Dist: opentelemetry-api<2,>=1.44
|
|
@@ -72,10 +72,11 @@ Requires-Dist: hexkit[akafka]; extra == "test-akafka"
|
|
|
72
72
|
Requires-Dist: testcontainers[kafka]<5,>=4.14; extra == "test-akafka"
|
|
73
73
|
Provides-Extra: test-s3
|
|
74
74
|
Requires-Dist: hexkit[s3]; extra == "test-s3"
|
|
75
|
+
Requires-Dist: httpx2<3,>=2.9.1; extra == "test-s3"
|
|
75
76
|
Requires-Dist: testcontainers<5,>=4.14; extra == "test-s3"
|
|
76
77
|
Provides-Extra: test-mongodb
|
|
77
78
|
Requires-Dist: hexkit[mongodb]; extra == "test-mongodb"
|
|
78
|
-
Requires-Dist: testcontainers[
|
|
79
|
+
Requires-Dist: testcontainers[mongodb]<5,>=4.14; extra == "test-mongodb"
|
|
79
80
|
Provides-Extra: test-redis
|
|
80
81
|
Requires-Dist: hexkit[redis]; extra == "test-redis"
|
|
81
82
|
Requires-Dist: testcontainers[redis]<5,>=4.14; extra == "test-redis"
|
|
@@ -89,10 +90,8 @@ Requires-Dist: hexkit[test]; extra == "all"
|
|
|
89
90
|
Requires-Dist: hexkit[opentelemetry]; extra == "all"
|
|
90
91
|
Dynamic: license-file
|
|
91
92
|
|
|
92
|
-
[](https://pypi.
|
|
93
|
-
[](https://pypi.
|
|
94
|
-

|
|
95
|
-
[](https://coveralls.io/github/ghga-de/hexkit?branch=main)
|
|
93
|
+
[](https://pypi.org/project/hexkit/)
|
|
94
|
+
[](https://pypi.org/project/hexkit/)
|
|
96
95
|
[](https://github.com/astral-sh/ruff)
|
|
97
96
|
[](https://mypy-lang.org/)
|
|
98
97
|
|
|
@@ -160,12 +159,12 @@ and the [API Reference](https://ghga-de.github.io/hexkit/reference/) documents a
|
|
|
160
159
|
public classes and functions.
|
|
161
160
|
|
|
162
161
|
For a complete example service built with hexkit, have a look at the
|
|
163
|
-
[stream_calc](https://github.com/ghga-de/
|
|
162
|
+
[stream_calc](https://github.com/ghga-de/ghga/tree/main/libs/hexkit/examples/stream_calc)
|
|
164
163
|
example application. We also put a lot of effort into making the code
|
|
165
164
|
self-documenting: you can find the protocols being defined at
|
|
166
|
-
[src/hexkit/protocols](https://github.com/ghga-de/
|
|
165
|
+
[src/hexkit/protocols](https://github.com/ghga-de/ghga/tree/main/libs/hexkit/src/hexkit/protocols)
|
|
167
166
|
and the providers being implemented at
|
|
168
|
-
[src/hexkit/providers](https://github.com/ghga-de/
|
|
167
|
+
[src/hexkit/providers](https://github.com/ghga-de/ghga/tree/main/libs/hexkit/src/hexkit/providers).
|
|
169
168
|
|
|
170
169
|
## Installation
|
|
171
170
|
|
|
@@ -193,8 +192,10 @@ The following extras are available:
|
|
|
193
192
|
|
|
194
193
|
## Contributing
|
|
195
194
|
|
|
196
|
-
Contributions are welcome!
|
|
197
|
-
[
|
|
195
|
+
Contributions are welcome! hexkit is developed in the
|
|
196
|
+
[GHGA monorepo](https://github.com/ghga-de/ghga) under `libs/hexkit`, together with the
|
|
197
|
+
services that build on it. Please see the
|
|
198
|
+
[contribution guide](https://github.com/ghga-de/ghga/blob/main/libs/hexkit/CONTRIBUTING.md)
|
|
198
199
|
for how to set up the development environment and build the documentation locally.
|
|
199
200
|
|
|
200
201
|
## Credits
|
|
@@ -205,5 +206,5 @@ library and designed and coded its first versions.
|
|
|
205
206
|
|
|
206
207
|
## License
|
|
207
208
|
|
|
208
|
-
|
|
209
|
-
[Apache 2.0 License](https://github.com/ghga-de/
|
|
209
|
+
hexkit is free to use and modify according to the
|
|
210
|
+
[Apache 2.0 License](https://github.com/ghga-de/ghga/blob/main/libs/hexkit/LICENSE).
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
[](https://pypi.
|
|
2
|
-
[](https://pypi.
|
|
3
|
-

|
|
4
|
-
[](https://coveralls.io/github/ghga-de/hexkit?branch=main)
|
|
1
|
+
[](https://pypi.org/project/hexkit/)
|
|
2
|
+
[](https://pypi.org/project/hexkit/)
|
|
5
3
|
[](https://github.com/astral-sh/ruff)
|
|
6
4
|
[](https://mypy-lang.org/)
|
|
7
5
|
|
|
@@ -69,12 +67,12 @@ and the [API Reference](https://ghga-de.github.io/hexkit/reference/) documents a
|
|
|
69
67
|
public classes and functions.
|
|
70
68
|
|
|
71
69
|
For a complete example service built with hexkit, have a look at the
|
|
72
|
-
[stream_calc](https://github.com/ghga-de/
|
|
70
|
+
[stream_calc](https://github.com/ghga-de/ghga/tree/main/libs/hexkit/examples/stream_calc)
|
|
73
71
|
example application. We also put a lot of effort into making the code
|
|
74
72
|
self-documenting: you can find the protocols being defined at
|
|
75
|
-
[src/hexkit/protocols](https://github.com/ghga-de/
|
|
73
|
+
[src/hexkit/protocols](https://github.com/ghga-de/ghga/tree/main/libs/hexkit/src/hexkit/protocols)
|
|
76
74
|
and the providers being implemented at
|
|
77
|
-
[src/hexkit/providers](https://github.com/ghga-de/
|
|
75
|
+
[src/hexkit/providers](https://github.com/ghga-de/ghga/tree/main/libs/hexkit/src/hexkit/providers).
|
|
78
76
|
|
|
79
77
|
## Installation
|
|
80
78
|
|
|
@@ -102,8 +100,10 @@ The following extras are available:
|
|
|
102
100
|
|
|
103
101
|
## Contributing
|
|
104
102
|
|
|
105
|
-
Contributions are welcome!
|
|
106
|
-
[
|
|
103
|
+
Contributions are welcome! hexkit is developed in the
|
|
104
|
+
[GHGA monorepo](https://github.com/ghga-de/ghga) under `libs/hexkit`, together with the
|
|
105
|
+
services that build on it. Please see the
|
|
106
|
+
[contribution guide](https://github.com/ghga-de/ghga/blob/main/libs/hexkit/CONTRIBUTING.md)
|
|
107
107
|
for how to set up the development environment and build the documentation locally.
|
|
108
108
|
|
|
109
109
|
## Credits
|
|
@@ -114,5 +114,5 @@ library and designed and coded its first versions.
|
|
|
114
114
|
|
|
115
115
|
## License
|
|
116
116
|
|
|
117
|
-
|
|
118
|
-
[Apache 2.0 License](https://github.com/ghga-de/
|
|
117
|
+
hexkit is free to use and modify according to the
|
|
118
|
+
[Apache 2.0 License](https://github.com/ghga-de/ghga/blob/main/libs/hexkit/LICENSE).
|
|
@@ -9,21 +9,22 @@ readme = "README.md"
|
|
|
9
9
|
authors = [
|
|
10
10
|
{ name = "German Human Genome Phenome Archive (GHGA)", email = "contact@ghga.de" },
|
|
11
11
|
]
|
|
12
|
-
requires-python = ">=3.
|
|
12
|
+
requires-python = ">=3.11"
|
|
13
13
|
classifiers = [
|
|
14
14
|
"Development Status :: 5 - Production/Stable",
|
|
15
15
|
"Operating System :: POSIX :: Linux",
|
|
16
|
-
"Programming Language :: Python :: 3
|
|
16
|
+
"Programming Language :: Python :: 3",
|
|
17
17
|
"Programming Language :: Python :: 3.11",
|
|
18
18
|
"Programming Language :: Python :: 3.12",
|
|
19
19
|
"Programming Language :: Python :: 3.13",
|
|
20
|
+
"Programming Language :: Python :: 3.14",
|
|
20
21
|
"License :: OSI Approved :: Apache Software License",
|
|
21
|
-
"Topic :: Internet :: WWW/HTTP :: HTTP Servers",
|
|
22
22
|
"Topic :: Software Development :: Libraries",
|
|
23
23
|
"Intended Audience :: Developers",
|
|
24
24
|
]
|
|
25
25
|
name = "hexkit"
|
|
26
|
-
|
|
26
|
+
# 9.0.2 is spent on TestPyPI: a pypi-publish.yaml rehearsal uploaded it there.
|
|
27
|
+
version = "9.0.1"
|
|
27
28
|
description = "A Toolkit for Building Microservices using the Hexagonal Architecture"
|
|
28
29
|
dependencies = [
|
|
29
30
|
"opentelemetry-api >=1.44, <2",
|
|
@@ -96,11 +97,12 @@ test-akafka = [
|
|
|
96
97
|
]
|
|
97
98
|
test-s3 = [
|
|
98
99
|
"hexkit[s3]",
|
|
100
|
+
"httpx2 >=2.9.1, <3",
|
|
99
101
|
"testcontainers >=4.14, <5",
|
|
100
102
|
]
|
|
101
103
|
test-mongodb = [
|
|
102
104
|
"hexkit[mongodb]",
|
|
103
|
-
"testcontainers[
|
|
105
|
+
"testcontainers[mongodb] >=4.14, <5",
|
|
104
106
|
]
|
|
105
107
|
test-redis = [
|
|
106
108
|
"hexkit[redis]",
|
|
@@ -119,128 +121,16 @@ all = [
|
|
|
119
121
|
]
|
|
120
122
|
|
|
121
123
|
[project.urls]
|
|
122
|
-
Repository = "https://github.com/ghga-de/
|
|
124
|
+
Repository = "https://github.com/ghga-de/ghga"
|
|
123
125
|
Documentation = "https://ghga-de.github.io/hexkit/"
|
|
124
|
-
"Release Notes" = "https://github.com/ghga-de/
|
|
125
|
-
"Issue Tracker" = "https://github.com/ghga-de/
|
|
126
|
+
"Release Notes" = "https://github.com/ghga-de/ghga/releases"
|
|
127
|
+
"Issue Tracker" = "https://github.com/ghga-de/ghga/issues"
|
|
126
128
|
|
|
127
129
|
[tool.setuptools.packages.find]
|
|
128
130
|
where = [
|
|
129
131
|
"src",
|
|
130
132
|
]
|
|
131
133
|
|
|
132
|
-
[tool.ruff]
|
|
133
|
-
exclude = [
|
|
134
|
-
".git",
|
|
135
|
-
".devcontainer",
|
|
136
|
-
"__pycache__",
|
|
137
|
-
"build",
|
|
138
|
-
"dist",
|
|
139
|
-
]
|
|
140
|
-
line-length = 88
|
|
141
|
-
src = [
|
|
142
|
-
"src",
|
|
143
|
-
"tests",
|
|
144
|
-
"examples",
|
|
145
|
-
"scripts",
|
|
146
|
-
]
|
|
147
|
-
target-version = "py310"
|
|
148
|
-
|
|
149
|
-
[tool.ruff.lint]
|
|
150
|
-
fixable = [
|
|
151
|
-
"UP",
|
|
152
|
-
"I",
|
|
153
|
-
"D",
|
|
154
|
-
"RUF022",
|
|
155
|
-
]
|
|
156
|
-
ignore = [
|
|
157
|
-
"E111",
|
|
158
|
-
"E114",
|
|
159
|
-
"E116",
|
|
160
|
-
"E117",
|
|
161
|
-
"E501",
|
|
162
|
-
"W191",
|
|
163
|
-
"PLW",
|
|
164
|
-
"RUF001",
|
|
165
|
-
"RUF010",
|
|
166
|
-
"RUF012",
|
|
167
|
-
"N818",
|
|
168
|
-
"B008",
|
|
169
|
-
"PLR2004",
|
|
170
|
-
"D205",
|
|
171
|
-
"D400",
|
|
172
|
-
"D401",
|
|
173
|
-
"D107",
|
|
174
|
-
"D206",
|
|
175
|
-
"D300",
|
|
176
|
-
"UP040",
|
|
177
|
-
"PLC0206",
|
|
178
|
-
]
|
|
179
|
-
select = [
|
|
180
|
-
"C90",
|
|
181
|
-
"F",
|
|
182
|
-
"I",
|
|
183
|
-
"S",
|
|
184
|
-
"B",
|
|
185
|
-
"N",
|
|
186
|
-
"UP",
|
|
187
|
-
"PL",
|
|
188
|
-
"RUF",
|
|
189
|
-
"SIM",
|
|
190
|
-
"D",
|
|
191
|
-
"E",
|
|
192
|
-
"W",
|
|
193
|
-
"ASYNC",
|
|
194
|
-
"LOG",
|
|
195
|
-
"PERF",
|
|
196
|
-
"RET",
|
|
197
|
-
"C4",
|
|
198
|
-
]
|
|
199
|
-
|
|
200
|
-
[tool.ruff.lint.mccabe]
|
|
201
|
-
max-complexity = 10
|
|
202
|
-
|
|
203
|
-
[tool.ruff.lint.per-file-ignores]
|
|
204
|
-
"scripts/*" = [
|
|
205
|
-
"PL",
|
|
206
|
-
"S",
|
|
207
|
-
"SIM",
|
|
208
|
-
"D",
|
|
209
|
-
"E402",
|
|
210
|
-
]
|
|
211
|
-
"tests/*" = [
|
|
212
|
-
"S",
|
|
213
|
-
"SIM",
|
|
214
|
-
"PLR",
|
|
215
|
-
"B011",
|
|
216
|
-
]
|
|
217
|
-
".devcontainer/*" = [
|
|
218
|
-
"S",
|
|
219
|
-
"SIM",
|
|
220
|
-
"D",
|
|
221
|
-
]
|
|
222
|
-
"examples/*" = [
|
|
223
|
-
"S",
|
|
224
|
-
"D",
|
|
225
|
-
]
|
|
226
|
-
"__init__.py" = [
|
|
227
|
-
"D",
|
|
228
|
-
]
|
|
229
|
-
|
|
230
|
-
[tool.ruff.lint.pydocstyle]
|
|
231
|
-
convention = "pep257"
|
|
232
|
-
|
|
233
|
-
[tool.mypy]
|
|
234
|
-
disable_error_code = "import"
|
|
235
|
-
show_error_codes = true
|
|
236
|
-
exclude = [
|
|
237
|
-
"build/lib/",
|
|
238
|
-
]
|
|
239
|
-
warn_redundant_casts = true
|
|
240
|
-
warn_unused_ignores = true
|
|
241
|
-
check_untyped_defs = true
|
|
242
|
-
no_site_packages = false
|
|
243
|
-
|
|
244
134
|
[tool.pytest.ini_options]
|
|
245
135
|
minversion = "9.0"
|
|
246
136
|
asyncio_mode = "strict"
|
|
@@ -39,7 +39,7 @@ logger = logging.getLogger(__name__)
|
|
|
39
39
|
# Instrumentation modules corresponding to the `opentelemetry-*` optional extras.
|
|
40
40
|
# Each entry is only instrumented if its module is installed.
|
|
41
41
|
_INSTRUMENTOR_MODULES: tuple[tuple[str, str], ...] = (
|
|
42
|
-
("opentelemetry.instrumentation.httpx", "
|
|
42
|
+
("opentelemetry.instrumentation.httpx", "HTTPX2ClientInstrumentor"),
|
|
43
43
|
("opentelemetry.instrumentation.aiokafka", "AIOKafkaInstrumentor"),
|
|
44
44
|
("opentelemetry.instrumentation.pymongo", "PymongoInstrumentor"),
|
|
45
45
|
("opentelemetry.instrumentation.fastapi", "FastAPIInstrumentor"),
|
|
@@ -62,6 +62,7 @@ def instrument_installed_libraries() -> None:
|
|
|
62
62
|
logger.warning(
|
|
63
63
|
"Could not instrument '%s' for '%s'.", class_name, module_name
|
|
64
64
|
)
|
|
65
|
+
continue
|
|
65
66
|
instrumentor_class().instrument()
|
|
66
67
|
logger.info("Instrumented '%s' for '%s'.", class_name, module_name)
|
|
67
68
|
|
|
@@ -21,7 +21,7 @@ import hashlib
|
|
|
21
21
|
import os
|
|
22
22
|
from pathlib import Path
|
|
23
23
|
|
|
24
|
-
import
|
|
24
|
+
import httpx2
|
|
25
25
|
from pydantic import BaseModel, computed_field
|
|
26
26
|
|
|
27
27
|
from hexkit.protocols.objstorage import ObjectStorageProtocol, PresignedPostURL
|
|
@@ -109,7 +109,7 @@ def upload_file(presigned_url: PresignedPostURL, file_path: Path, file_md5: str)
|
|
|
109
109
|
with open(file_path, "rb") as test_file:
|
|
110
110
|
files = {"file": (str(file_path), test_file)}
|
|
111
111
|
headers = {"ContentMD5": file_md5}
|
|
112
|
-
response =
|
|
112
|
+
response = httpx2.post(
|
|
113
113
|
presigned_url.url,
|
|
114
114
|
data=presigned_url.fields,
|
|
115
115
|
files=files,
|
|
@@ -135,7 +135,7 @@ async def upload_part(
|
|
|
135
135
|
part_number=part_number,
|
|
136
136
|
)
|
|
137
137
|
response = await asyncio.to_thread(
|
|
138
|
-
|
|
138
|
+
httpx2.put, upload_url, content=content, timeout=TIMEOUT
|
|
139
139
|
)
|
|
140
140
|
response.raise_for_status()
|
|
141
141
|
|
|
@@ -166,7 +166,7 @@ async def upload_part_of_size(
|
|
|
166
166
|
def upload_part_via_url(*, url: str, size: int):
|
|
167
167
|
"""Upload a file part of given size using the given URL."""
|
|
168
168
|
content = b"\0" * size
|
|
169
|
-
response =
|
|
169
|
+
response = httpx2.put(url, content=content, timeout=TIMEOUT)
|
|
170
170
|
response.raise_for_status()
|
|
171
171
|
|
|
172
172
|
|
|
@@ -215,7 +215,7 @@ async def multipart_upload_file(
|
|
|
215
215
|
|
|
216
216
|
def download_and_check_test_file(presigned_url: str, expected_md5: str):
|
|
217
217
|
"""Download the test file from the specified URL and check its integrity (md5)."""
|
|
218
|
-
response =
|
|
218
|
+
response = httpx2.get(presigned_url, timeout=TIMEOUT)
|
|
219
219
|
response.raise_for_status()
|
|
220
220
|
|
|
221
221
|
observed_md5 = calc_md5(response.content)
|
|
@@ -173,6 +173,31 @@ class ComparisonPredicate(Predicate):
|
|
|
173
173
|
return self._fn(value, self._target_value)
|
|
174
174
|
|
|
175
175
|
|
|
176
|
+
class ConjunctionPredicate(Predicate):
|
|
177
|
+
"""A Predicate that is satisfied only if all of its sub-predicates are satisfied.
|
|
178
|
+
|
|
179
|
+
Represents a single branch of a logical operator that contains multiple
|
|
180
|
+
conditions, which MongoDB treats as an implicit $and.
|
|
181
|
+
"""
|
|
182
|
+
|
|
183
|
+
def __init__(self, *, conditions: list[Predicate]):
|
|
184
|
+
"""Initialize the predicate with the list of sub-predicates to AND together."""
|
|
185
|
+
self._conditions = conditions
|
|
186
|
+
|
|
187
|
+
def __repr__(self) -> str:
|
|
188
|
+
return f"{self.__class__.__name__}(conditions={self._conditions})"
|
|
189
|
+
|
|
190
|
+
def __eq__(self, other) -> bool:
|
|
191
|
+
"""Two ConjunctionPredicates are equivalent if all conditions are equivalent."""
|
|
192
|
+
return (
|
|
193
|
+
isinstance(other, ConjunctionPredicate)
|
|
194
|
+
and self._conditions == other._conditions
|
|
195
|
+
)
|
|
196
|
+
|
|
197
|
+
def evaluate(self, resource: dict[str, Any]) -> bool:
|
|
198
|
+
return all(condition.evaluate(resource) for condition in self._conditions)
|
|
199
|
+
|
|
200
|
+
|
|
176
201
|
class LogicalPredicate(Predicate):
|
|
177
202
|
"""A Predicate that handles MQL logical operators"""
|
|
178
203
|
|
|
@@ -215,7 +240,14 @@ class LogicalPredicate(Predicate):
|
|
|
215
240
|
if not isinstance(mapping, list) or len(mapping) == 0:
|
|
216
241
|
raise MQLError(f"The {op} operator must be used with a non-empty list.")
|
|
217
242
|
for condition in mapping:
|
|
218
|
-
|
|
243
|
+
branch_predicates = build_predicates(mapping=condition)
|
|
244
|
+
if len(branch_predicates) == 1:
|
|
245
|
+
self._conditions.extend(branch_predicates)
|
|
246
|
+
else:
|
|
247
|
+
# A branch with multiple conditions is an implicit $and
|
|
248
|
+
self._conditions.append(
|
|
249
|
+
ConjunctionPredicate(conditions=branch_predicates)
|
|
250
|
+
)
|
|
219
251
|
|
|
220
252
|
def __repr__(self) -> str:
|
|
221
253
|
return (
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hexkit
|
|
3
|
-
Version:
|
|
3
|
+
Version: 9.0.1
|
|
4
4
|
Summary: A Toolkit for Building Microservices using the Hexagonal Architecture
|
|
5
5
|
Author-email: "German Human Genome Phenome Archive (GHGA)" <contact@ghga.de>
|
|
6
6
|
License: Apache 2.0
|
|
7
|
-
Project-URL: Repository, https://github.com/ghga-de/
|
|
7
|
+
Project-URL: Repository, https://github.com/ghga-de/ghga
|
|
8
8
|
Project-URL: Documentation, https://ghga-de.github.io/hexkit/
|
|
9
|
-
Project-URL: Release Notes, https://github.com/ghga-de/
|
|
10
|
-
Project-URL: Issue Tracker, https://github.com/ghga-de/
|
|
9
|
+
Project-URL: Release Notes, https://github.com/ghga-de/ghga/releases
|
|
10
|
+
Project-URL: Issue Tracker, https://github.com/ghga-de/ghga/issues
|
|
11
11
|
Classifier: Development Status :: 5 - Production/Stable
|
|
12
12
|
Classifier: Operating System :: POSIX :: Linux
|
|
13
|
-
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.11
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.12
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
17
18
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
18
|
-
Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
|
|
19
19
|
Classifier: Topic :: Software Development :: Libraries
|
|
20
20
|
Classifier: Intended Audience :: Developers
|
|
21
|
-
Requires-Python: >=3.
|
|
21
|
+
Requires-Python: >=3.11
|
|
22
22
|
Description-Content-Type: text/markdown
|
|
23
23
|
License-File: LICENSE
|
|
24
24
|
Requires-Dist: opentelemetry-api<2,>=1.44
|
|
@@ -72,10 +72,11 @@ Requires-Dist: hexkit[akafka]; extra == "test-akafka"
|
|
|
72
72
|
Requires-Dist: testcontainers[kafka]<5,>=4.14; extra == "test-akafka"
|
|
73
73
|
Provides-Extra: test-s3
|
|
74
74
|
Requires-Dist: hexkit[s3]; extra == "test-s3"
|
|
75
|
+
Requires-Dist: httpx2<3,>=2.9.1; extra == "test-s3"
|
|
75
76
|
Requires-Dist: testcontainers<5,>=4.14; extra == "test-s3"
|
|
76
77
|
Provides-Extra: test-mongodb
|
|
77
78
|
Requires-Dist: hexkit[mongodb]; extra == "test-mongodb"
|
|
78
|
-
Requires-Dist: testcontainers[
|
|
79
|
+
Requires-Dist: testcontainers[mongodb]<5,>=4.14; extra == "test-mongodb"
|
|
79
80
|
Provides-Extra: test-redis
|
|
80
81
|
Requires-Dist: hexkit[redis]; extra == "test-redis"
|
|
81
82
|
Requires-Dist: testcontainers[redis]<5,>=4.14; extra == "test-redis"
|
|
@@ -89,10 +90,8 @@ Requires-Dist: hexkit[test]; extra == "all"
|
|
|
89
90
|
Requires-Dist: hexkit[opentelemetry]; extra == "all"
|
|
90
91
|
Dynamic: license-file
|
|
91
92
|
|
|
92
|
-
[](https://pypi.
|
|
93
|
-
[](https://pypi.
|
|
94
|
-

|
|
95
|
-
[](https://coveralls.io/github/ghga-de/hexkit?branch=main)
|
|
93
|
+
[](https://pypi.org/project/hexkit/)
|
|
94
|
+
[](https://pypi.org/project/hexkit/)
|
|
96
95
|
[](https://github.com/astral-sh/ruff)
|
|
97
96
|
[](https://mypy-lang.org/)
|
|
98
97
|
|
|
@@ -160,12 +159,12 @@ and the [API Reference](https://ghga-de.github.io/hexkit/reference/) documents a
|
|
|
160
159
|
public classes and functions.
|
|
161
160
|
|
|
162
161
|
For a complete example service built with hexkit, have a look at the
|
|
163
|
-
[stream_calc](https://github.com/ghga-de/
|
|
162
|
+
[stream_calc](https://github.com/ghga-de/ghga/tree/main/libs/hexkit/examples/stream_calc)
|
|
164
163
|
example application. We also put a lot of effort into making the code
|
|
165
164
|
self-documenting: you can find the protocols being defined at
|
|
166
|
-
[src/hexkit/protocols](https://github.com/ghga-de/
|
|
165
|
+
[src/hexkit/protocols](https://github.com/ghga-de/ghga/tree/main/libs/hexkit/src/hexkit/protocols)
|
|
167
166
|
and the providers being implemented at
|
|
168
|
-
[src/hexkit/providers](https://github.com/ghga-de/
|
|
167
|
+
[src/hexkit/providers](https://github.com/ghga-de/ghga/tree/main/libs/hexkit/src/hexkit/providers).
|
|
169
168
|
|
|
170
169
|
## Installation
|
|
171
170
|
|
|
@@ -193,8 +192,10 @@ The following extras are available:
|
|
|
193
192
|
|
|
194
193
|
## Contributing
|
|
195
194
|
|
|
196
|
-
Contributions are welcome!
|
|
197
|
-
[
|
|
195
|
+
Contributions are welcome! hexkit is developed in the
|
|
196
|
+
[GHGA monorepo](https://github.com/ghga-de/ghga) under `libs/hexkit`, together with the
|
|
197
|
+
services that build on it. Please see the
|
|
198
|
+
[contribution guide](https://github.com/ghga-de/ghga/blob/main/libs/hexkit/CONTRIBUTING.md)
|
|
198
199
|
for how to set up the development environment and build the documentation locally.
|
|
199
200
|
|
|
200
201
|
## Credits
|
|
@@ -205,5 +206,5 @@ library and designed and coded its first versions.
|
|
|
205
206
|
|
|
206
207
|
## License
|
|
207
208
|
|
|
208
|
-
|
|
209
|
-
[Apache 2.0 License](https://github.com/ghga-de/
|
|
209
|
+
hexkit is free to use and modify according to the
|
|
210
|
+
[Apache 2.0 License](https://github.com/ghga-de/ghga/blob/main/libs/hexkit/LICENSE).
|
|
@@ -67,7 +67,7 @@ testcontainers[kafka]<5,>=4.14
|
|
|
67
67
|
|
|
68
68
|
[test-mongodb]
|
|
69
69
|
hexkit[mongodb]
|
|
70
|
-
testcontainers[
|
|
70
|
+
testcontainers[mongodb]<5,>=4.14
|
|
71
71
|
|
|
72
72
|
[test-redis]
|
|
73
73
|
hexkit[redis]
|
|
@@ -75,6 +75,7 @@ testcontainers[redis]<5,>=4.14
|
|
|
75
75
|
|
|
76
76
|
[test-s3]
|
|
77
77
|
hexkit[s3]
|
|
78
|
+
httpx2<3,>=2.9.1
|
|
78
79
|
testcontainers<5,>=4.14
|
|
79
80
|
|
|
80
81
|
[test-vault]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|