hexkit 9.0.0__tar.gz → 9.0.3__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 (90) hide show
  1. {hexkit-9.0.0/src/hexkit.egg-info → hexkit-9.0.3}/PKG-INFO +26 -26
  2. {hexkit-9.0.0 → hexkit-9.0.3}/README.md +15 -15
  3. {hexkit-9.0.0 → hexkit-9.0.3}/pyproject.toml +12 -159
  4. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/akafka/testcontainer.py +1 -1
  5. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/akafka/testutils.py +44 -0
  6. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/mongodb/testutils.py +1 -1
  7. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/s3/testutils/_typical_workflow.py +1 -1
  8. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/s3/testutils/_utils.py +1 -1
  9. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/testing/dao.py +33 -1
  10. {hexkit-9.0.0 → hexkit-9.0.3/src/hexkit.egg-info}/PKG-INFO +26 -26
  11. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit.egg-info/requires.txt +2 -1
  12. {hexkit-9.0.0 → hexkit-9.0.3}/LICENSE +0 -0
  13. {hexkit-9.0.0 → hexkit-9.0.3}/MANIFEST.in +0 -0
  14. {hexkit-9.0.0 → hexkit-9.0.3}/setup.cfg +0 -0
  15. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/__init__.py +0 -0
  16. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/__main__.py +0 -0
  17. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/base.py +0 -0
  18. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/config.py +0 -0
  19. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/correlation.py +0 -0
  20. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/custom_types.py +0 -0
  21. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/log.py +0 -0
  22. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/opentelemetry/__init__.py +0 -0
  23. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/opentelemetry/instrumentation.py +0 -0
  24. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/opentelemetry/testutils.py +0 -0
  25. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/protocols/__init__.py +0 -0
  26. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/protocols/dao.py +0 -0
  27. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/protocols/daopub.py +0 -0
  28. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/protocols/daosub.py +0 -0
  29. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/protocols/eventpub.py +0 -0
  30. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/protocols/eventsub.py +0 -0
  31. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/protocols/kvstore.py +0 -0
  32. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/protocols/objstorage.py +0 -0
  33. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/__init__.py +0 -0
  34. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/akafka/__init__.py +0 -0
  35. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/akafka/config.py +0 -0
  36. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/akafka/provider/__init__.py +0 -0
  37. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/akafka/provider/daosub.py +0 -0
  38. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/akafka/provider/eventpub.py +0 -0
  39. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/akafka/provider/eventsub.py +0 -0
  40. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/akafka/provider/utils.py +0 -0
  41. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/mongodb/__init__.py +0 -0
  42. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/mongodb/config.py +0 -0
  43. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/mongodb/migrations/__init__.py +0 -0
  44. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/mongodb/migrations/_manager.py +0 -0
  45. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/mongodb/migrations/_utils.py +0 -0
  46. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/mongodb/migrations/helpers.py +0 -0
  47. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/mongodb/provider/__init__.py +0 -0
  48. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/mongodb/provider/client.py +0 -0
  49. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/mongodb/provider/dao.py +0 -0
  50. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/mongodb/provider/kvstore.py +0 -0
  51. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/mongodb/provider/utils.py +0 -0
  52. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/mongokafka/__init__.py +0 -0
  53. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/mongokafka/config.py +0 -0
  54. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/mongokafka/provider/__init__.py +0 -0
  55. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/mongokafka/provider/daopub.py +0 -0
  56. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/mongokafka/provider/persistent_pub.py +0 -0
  57. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/mongokafka/testutils.py +0 -0
  58. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/redis/__init__.py +0 -0
  59. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/redis/config.py +0 -0
  60. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/redis/provider/__init__.py +0 -0
  61. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/redis/provider/client.py +0 -0
  62. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/redis/provider/kvstore.py +0 -0
  63. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/redis/testutils.py +0 -0
  64. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/s3/__init__.py +0 -0
  65. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/s3/config.py +0 -0
  66. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/s3/provider/__init__.py +0 -0
  67. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/s3/provider/kvstore.py +0 -0
  68. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/s3/provider/objstorage.py +0 -0
  69. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/s3/test_files/__init__.py +0 -0
  70. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/s3/test_files/test_file1.yaml +0 -0
  71. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/s3/test_files/test_file2.yaml +0 -0
  72. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/s3/test_files/test_file3.yaml +0 -0
  73. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/s3/test_files/test_file4.yaml +0 -0
  74. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/s3/testutils/__init__.py +0 -0
  75. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/s3/testutils/_fixtures.py +0 -0
  76. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/testing/__init__.py +0 -0
  77. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/testing/eventpub.py +0 -0
  78. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/testing/kvstore.py +0 -0
  79. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/testing/objstorage.py +0 -0
  80. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/vault/__init__.py +0 -0
  81. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/vault/config.py +0 -0
  82. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/vault/provider/__init__.py +0 -0
  83. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/vault/provider/client.py +0 -0
  84. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/vault/provider/kvstore.py +0 -0
  85. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/providers/vault/testutils.py +0 -0
  86. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/py.typed +0 -0
  87. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit/utils.py +0 -0
  88. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit.egg-info/SOURCES.txt +0 -0
  89. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit.egg-info/dependency_links.txt +0 -0
  90. {hexkit-9.0.0 → hexkit-9.0.3}/src/hexkit.egg-info/top_level.txt +0 -0
@@ -1,24 +1,23 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hexkit
3
- Version: 9.0.0
3
+ Version: 9.0.3
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
- License: Apache 2.0
7
- Project-URL: Repository, https://github.com/ghga-de/hexkit
8
- Project-URL: Documentation, https://ghga-de.github.io/hexkit/
9
- Project-URL: Release Notes, https://github.com/ghga-de/hexkit/releases
10
- Project-URL: Issue Tracker, https://github.com/ghga-de/hexkit/issues
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Repository, https://github.com/ghga-de/ghga
8
+ Project-URL: Documentation, https://ghga-de.github.io/ghga/hexkit/
9
+ Project-URL: Release Notes, https://github.com/ghga-de/ghga/releases?q=hexkit
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.10
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: License :: OSI Approved :: Apache Software License
18
- Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
17
+ Classifier: Programming Language :: Python :: 3.14
19
18
  Classifier: Topic :: Software Development :: Libraries
20
19
  Classifier: Intended Audience :: Developers
21
- Requires-Python: >=3.10
20
+ Requires-Python: >=3.11
22
21
  Description-Content-Type: text/markdown
23
22
  License-File: LICENSE
24
23
  Requires-Dist: opentelemetry-api<2,>=1.44
@@ -72,10 +71,11 @@ Requires-Dist: hexkit[akafka]; extra == "test-akafka"
72
71
  Requires-Dist: testcontainers[kafka]<5,>=4.14; extra == "test-akafka"
73
72
  Provides-Extra: test-s3
74
73
  Requires-Dist: hexkit[s3]; extra == "test-s3"
74
+ Requires-Dist: httpx2<3,>=2.9.1; extra == "test-s3"
75
75
  Requires-Dist: testcontainers<5,>=4.14; extra == "test-s3"
76
76
  Provides-Extra: test-mongodb
77
77
  Requires-Dist: hexkit[mongodb]; extra == "test-mongodb"
78
- Requires-Dist: testcontainers[mongo]<5,>=4.14; extra == "test-mongodb"
78
+ Requires-Dist: testcontainers[mongodb]<5,>=4.14; extra == "test-mongodb"
79
79
  Provides-Extra: test-redis
80
80
  Requires-Dist: hexkit[redis]; extra == "test-redis"
81
81
  Requires-Dist: testcontainers[redis]<5,>=4.14; extra == "test-redis"
@@ -89,10 +89,8 @@ Requires-Dist: hexkit[test]; extra == "all"
89
89
  Requires-Dist: hexkit[opentelemetry]; extra == "all"
90
90
  Dynamic: license-file
91
91
 
92
- [![PyPI version shields.io](https://img.shields.io/pypi/v/hexkit.svg)](https://pypi.python.org/pypi/hexkit/)
93
- [![PyPI pyversions](https://img.shields.io/pypi/pyversions/hexkit.svg)](https://pypi.python.org/pypi/hexkit/)
94
- ![tests](https://github.com/ghga-de/hexkit/actions/workflows/tests.yaml/badge.svg)
95
- [![Coverage Status](https://coveralls.io/repos/github/ghga-de/hexkit/badge.svg?branch=main)](https://coveralls.io/github/ghga-de/hexkit?branch=main)
92
+ [![PyPI version shields.io](https://img.shields.io/pypi/v/hexkit.svg)](https://pypi.org/project/hexkit/)
93
+ [![PyPI pyversions](https://img.shields.io/pypi/pyversions/hexkit.svg)](https://pypi.org/project/hexkit/)
96
94
  [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
97
95
  [![Checked with mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org/)
98
96
 
@@ -102,7 +100,7 @@ Dynamic: license-file
102
100
  and event-driven microservices in Python*
103
101
 
104
102
  Read the short summary below, or jump straight to our full
105
- 📖 **[User Guide](https://ghga-de.github.io/hexkit/user-guide/)** to learn the abstract
103
+ 📖 **[User Guide](https://ghga-de.github.io/ghga/hexkit/user-guide/)** to learn the abstract
106
104
  concepts and patterns as well as the concrete infrastructure integrations and testing
107
105
  tools that hexkit provides for building better microservices.
108
106
 
@@ -130,7 +128,7 @@ to use. The only task that remains for an individual service is to implement
130
128
  service-specific translators between the service's ports and the general-purpose
131
129
  protocols (in addition to implementing the domain functionality of the service, of
132
130
  course). For an in-depth introduction to the pattern, please read the
133
- [Architectural Concepts](https://ghga-de.github.io/hexkit/user-guide/arch_concepts/)
131
+ [Architectural Concepts](https://ghga-de.github.io/ghga/hexkit/user-guide/arch_concepts/)
134
132
  chapter of the User Guide.
135
133
 
136
134
  The following protocols and providers are currently available:
@@ -154,18 +152,18 @@ designing REST APIs and an ORM like SQLAlchemy for interacting with databases.
154
152
 
155
153
  ## Getting Started
156
154
 
157
- The 📖 [User Guide](https://ghga-de.github.io/hexkit/user-guide/) covers all
155
+ The 📖 [User Guide](https://ghga-de.github.io/ghga/hexkit/user-guide/) covers all
158
156
  protocols, providers, testing utilities, and observability tools with example code,
159
- and the [API Reference](https://ghga-de.github.io/hexkit/reference/) documents all
157
+ and the [API Reference](https://ghga-de.github.io/ghga/hexkit/reference/) documents all
160
158
  public classes and functions.
161
159
 
162
160
  For a complete example service built with hexkit, have a look at the
163
- [stream_calc](https://github.com/ghga-de/hexkit/tree/main/examples/stream_calc)
161
+ [stream_calc](https://github.com/ghga-de/ghga/tree/main/libs/hexkit/examples/stream_calc)
164
162
  example application. We also put a lot of effort into making the code
165
163
  self-documenting: you can find the protocols being defined at
166
- [src/hexkit/protocols](https://github.com/ghga-de/hexkit/tree/main/src/hexkit/protocols)
164
+ [src/hexkit/protocols](https://github.com/ghga-de/ghga/tree/main/libs/hexkit/src/hexkit/protocols)
167
165
  and the providers being implemented at
168
- [src/hexkit/providers](https://github.com/ghga-de/hexkit/tree/main/src/hexkit/providers).
166
+ [src/hexkit/providers](https://github.com/ghga-de/ghga/tree/main/libs/hexkit/src/hexkit/providers).
169
167
 
170
168
  ## Installation
171
169
 
@@ -193,8 +191,10 @@ The following extras are available:
193
191
 
194
192
  ## Contributing
195
193
 
196
- Contributions are welcome! Please see the
197
- [contribution guide](https://github.com/ghga-de/hexkit/blob/main/CONTRIBUTING.md)
194
+ Contributions are welcome! hexkit is developed in the
195
+ [GHGA monorepo](https://github.com/ghga-de/ghga) under `libs/hexkit`, together with the
196
+ services that build on it. Please see the
197
+ [contribution guide](https://github.com/ghga-de/ghga/blob/main/libs/hexkit/CONTRIBUTING.md)
198
198
  for how to set up the development environment and build the documentation locally.
199
199
 
200
200
  ## Credits
@@ -205,5 +205,5 @@ library and designed and coded its first versions.
205
205
 
206
206
  ## License
207
207
 
208
- This repository is free to use and modify according to the
209
- [Apache 2.0 License](https://github.com/ghga-de/hexkit/blob/main/LICENSE).
208
+ hexkit is free to use and modify according to the
209
+ [Apache 2.0 License](https://github.com/ghga-de/ghga/blob/main/libs/hexkit/LICENSE).
@@ -1,7 +1,5 @@
1
- [![PyPI version shields.io](https://img.shields.io/pypi/v/hexkit.svg)](https://pypi.python.org/pypi/hexkit/)
2
- [![PyPI pyversions](https://img.shields.io/pypi/pyversions/hexkit.svg)](https://pypi.python.org/pypi/hexkit/)
3
- ![tests](https://github.com/ghga-de/hexkit/actions/workflows/tests.yaml/badge.svg)
4
- [![Coverage Status](https://coveralls.io/repos/github/ghga-de/hexkit/badge.svg?branch=main)](https://coveralls.io/github/ghga-de/hexkit?branch=main)
1
+ [![PyPI version shields.io](https://img.shields.io/pypi/v/hexkit.svg)](https://pypi.org/project/hexkit/)
2
+ [![PyPI pyversions](https://img.shields.io/pypi/pyversions/hexkit.svg)](https://pypi.org/project/hexkit/)
5
3
  [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
6
4
  [![Checked with mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org/)
7
5
 
@@ -11,7 +9,7 @@
11
9
  and event-driven microservices in Python*
12
10
 
13
11
  Read the short summary below, or jump straight to our full
14
- 📖 **[User Guide](https://ghga-de.github.io/hexkit/user-guide/)** to learn the abstract
12
+ 📖 **[User Guide](https://ghga-de.github.io/ghga/hexkit/user-guide/)** to learn the abstract
15
13
  concepts and patterns as well as the concrete infrastructure integrations and testing
16
14
  tools that hexkit provides for building better microservices.
17
15
 
@@ -39,7 +37,7 @@ to use. The only task that remains for an individual service is to implement
39
37
  service-specific translators between the service's ports and the general-purpose
40
38
  protocols (in addition to implementing the domain functionality of the service, of
41
39
  course). For an in-depth introduction to the pattern, please read the
42
- [Architectural Concepts](https://ghga-de.github.io/hexkit/user-guide/arch_concepts/)
40
+ [Architectural Concepts](https://ghga-de.github.io/ghga/hexkit/user-guide/arch_concepts/)
43
41
  chapter of the User Guide.
44
42
 
45
43
  The following protocols and providers are currently available:
@@ -63,18 +61,18 @@ designing REST APIs and an ORM like SQLAlchemy for interacting with databases.
63
61
 
64
62
  ## Getting Started
65
63
 
66
- The 📖 [User Guide](https://ghga-de.github.io/hexkit/user-guide/) covers all
64
+ The 📖 [User Guide](https://ghga-de.github.io/ghga/hexkit/user-guide/) covers all
67
65
  protocols, providers, testing utilities, and observability tools with example code,
68
- and the [API Reference](https://ghga-de.github.io/hexkit/reference/) documents all
66
+ and the [API Reference](https://ghga-de.github.io/ghga/hexkit/reference/) documents all
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/hexkit/tree/main/examples/stream_calc)
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/hexkit/tree/main/src/hexkit/protocols)
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/hexkit/tree/main/src/hexkit/providers).
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! Please see the
106
- [contribution guide](https://github.com/ghga-de/hexkit/blob/main/CONTRIBUTING.md)
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
- This repository is free to use and modify according to the
118
- [Apache 2.0 License](https://github.com/ghga-de/hexkit/blob/main/LICENSE).
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,22 +9,23 @@ 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.10"
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.10",
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
- "License :: OSI Approved :: Apache Software License",
21
- "Topic :: Internet :: WWW/HTTP :: HTTP Servers",
20
+ "Programming Language :: Python :: 3.14",
22
21
  "Topic :: Software Development :: Libraries",
23
22
  "Intended Audience :: Developers",
24
23
  ]
25
24
  name = "hexkit"
26
- version = "9.0.0"
25
+ # 9.0.2 is spent on TestPyPI: a pypi-publish.yaml rehearsal uploaded it there.
26
+ version = "9.0.3"
27
27
  description = "A Toolkit for Building Microservices using the Hexagonal Architecture"
28
+ license = "Apache-2.0"
28
29
  dependencies = [
29
30
  "opentelemetry-api >=1.44, <2",
30
31
  "pydantic >=2.12, <3",
@@ -32,9 +33,6 @@ dependencies = [
32
33
  "PyYAML >=6, <7",
33
34
  ]
34
35
 
35
- [project.license]
36
- text = "Apache 2.0"
37
-
38
36
  [project.optional-dependencies]
39
37
  akafka = [
40
38
  "aiokafka[zstd,lz4,snappy]~=0.14.0",
@@ -96,11 +94,12 @@ test-akafka = [
96
94
  ]
97
95
  test-s3 = [
98
96
  "hexkit[s3]",
97
+ "httpx2 >=2.9.1, <3",
99
98
  "testcontainers >=4.14, <5",
100
99
  ]
101
100
  test-mongodb = [
102
101
  "hexkit[mongodb]",
103
- "testcontainers[mongo] >=4.14, <5",
102
+ "testcontainers[mongodb] >=4.14, <5",
104
103
  ]
105
104
  test-redis = [
106
105
  "hexkit[redis]",
@@ -119,128 +118,16 @@ all = [
119
118
  ]
120
119
 
121
120
  [project.urls]
122
- Repository = "https://github.com/ghga-de/hexkit"
123
- Documentation = "https://ghga-de.github.io/hexkit/"
124
- "Release Notes" = "https://github.com/ghga-de/hexkit/releases"
125
- "Issue Tracker" = "https://github.com/ghga-de/hexkit/issues"
121
+ Repository = "https://github.com/ghga-de/ghga"
122
+ Documentation = "https://ghga-de.github.io/ghga/hexkit/"
123
+ "Release Notes" = "https://github.com/ghga-de/ghga/releases?q=hexkit"
124
+ "Issue Tracker" = "https://github.com/ghga-de/ghga/issues"
126
125
 
127
126
  [tool.setuptools.packages.find]
128
127
  where = [
129
128
  "src",
130
129
  ]
131
130
 
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
131
  [tool.pytest.ini_options]
245
132
  minversion = "9.0"
246
133
  asyncio_mode = "strict"
@@ -252,37 +139,3 @@ source = [
252
139
  "/workspace/src",
253
140
  "**/lib/python*/site-packages",
254
141
  ]
255
-
256
- [tool.tox]
257
- legacy_tox_ini = """
258
- [tox]
259
- env_list = py3{10,11,12,13}, docs
260
-
261
- [gh-actions]
262
- python =
263
- 3.10: py310
264
- 3.11: py311
265
- 3.12: py312
266
- 3.13: py313
267
-
268
- [testenv:docs]
269
- basepython = python3.13
270
- deps =
271
- --no-deps -r ./lock/requirements-dev.txt
272
- commands_pre =
273
- # great-docs (Python >= 3.11 only) is kept out of the shared dev lock so it
274
- # does not break the py310 test env; install it here where docs are built.
275
- pip install great-docs==0.14.1
276
- commands =
277
- great-docs build
278
-
279
- [testenv]
280
- pass_env =
281
- TC_HOST
282
- DOCKER_HOST
283
- deps =
284
- --no-deps -r ./lock/requirements-dev.txt
285
- commands =
286
- py310: pip install --no-deps backports.asyncio.runner==1.2.0 exceptiongroup==1.3.1 tomli==2.2.1
287
- pytest {posargs}
288
- """
@@ -34,7 +34,7 @@ class KafkaSSLContainer(KafkaContainer):
34
34
 
35
35
  SECRETS_PATH = "/etc/kafka/secrets"
36
36
 
37
- def __init__( # noqa: C901, PLR0912, PLR0913, PLR0917
37
+ def __init__( # noqa: C901, PLR0912, PLR0913
38
38
  self,
39
39
  image: str = DEFAULT_IMAGE,
40
40
  port: int = DEFAULT_PORT,
@@ -39,6 +39,7 @@ import pytest
39
39
  import pytest_asyncio
40
40
  from aiokafka import AIOKafkaConsumer, TopicPartition
41
41
  from aiokafka.admin import AIOKafkaAdminClient, RecordsToDelete
42
+ from aiokafka.errors import KafkaError
42
43
  from pydantic import UUID4
43
44
  from testcontainers.kafka import KafkaContainer
44
45
 
@@ -620,6 +621,12 @@ class KafkaFixture:
620
621
  )
621
622
 
622
623
 
624
+ # How long to wait for the broker to register itself, and how often to re-check while
625
+ # waiting. The timeout matches the container's own startup timeout.
626
+ BROKER_REGISTRATION_TIMEOUT = 30.0
627
+ BROKER_REGISTRATION_POLL_INTERVAL = 0.1
628
+
629
+
623
630
  class KafkaContainerFixture(KafkaContainer):
624
631
  """Kafka test container with configuration and command execution."""
625
632
 
@@ -638,8 +645,45 @@ class KafkaContainerFixture(KafkaContainer):
638
645
  service_instance_id="001",
639
646
  kafka_servers=kafka_servers,
640
647
  )
648
+ asyncio.run(self._wait_for_broker(kafka_servers))
641
649
  return self
642
650
 
651
+ @staticmethod
652
+ async def _wait_for_broker(
653
+ kafka_servers: list[str], timeout: float = BROKER_REGISTRATION_TIMEOUT
654
+ ) -> None:
655
+ """Wait until the broker is registered in the cluster metadata.
656
+
657
+ The container reports itself ready on the "[KafkaServer id=N] started" log line,
658
+ which the server emits before it has registered with the KRaft controller. Until
659
+ it has, a metadata request is answered with an empty broker list and every admin
660
+ call raises NodeNotReadyError -- and the `kafka` fixture makes one (clear_topics)
661
+ as soon as the first test asks for it. Waiting the registration out here keeps a
662
+ container that is merely slow to start from failing whichever test happens to run
663
+ first.
664
+
665
+ Raises:
666
+ RuntimeError: if the broker is not registered before `timeout` elapses.
667
+ """
668
+ loop = asyncio.get_running_loop()
669
+ deadline = loop.time() + timeout
670
+ while True:
671
+ admin_client = AIOKafkaAdminClient(bootstrap_servers=kafka_servers)
672
+ try:
673
+ await admin_client.start()
674
+ # the same call the `kafka` fixture makes first, so this waits for
675
+ # exactly the readiness the fixture goes on to rely on
676
+ await admin_client.list_topics()
677
+ return
678
+ except (KafkaError, OSError) as error:
679
+ if loop.time() >= deadline:
680
+ raise RuntimeError(
681
+ f"Kafka broker did not register within {timeout} seconds."
682
+ ) from error
683
+ finally:
684
+ await admin_client.close()
685
+ await asyncio.sleep(BROKER_REGISTRATION_POLL_INTERVAL)
686
+
643
687
  def wrapped_exec_run(self, command: str, run_in_shell: bool):
644
688
  """Run the given command in the kafka testcontainer.
645
689
 
@@ -101,7 +101,7 @@ def _mongodb_container_fixture() -> Generator[MongoDbContainerFixture, None, Non
101
101
  """Fixture function for getting a running MongoDB test container."""
102
102
  with MongoDbContainerFixture(image=MONGODB_IMAGE) as mongodb_container:
103
103
  mongodb_config = MongoDbConfig(
104
- mongo_dsn=mongodb_container.get_connection_url(), # type: ignore
104
+ mongo_dsn=mongodb_container.get_connection_url(),
105
105
  db_name="test",
106
106
  )
107
107
  mongodb_container.mongodb_config = mongodb_config
@@ -28,7 +28,7 @@ from ._utils import (
28
28
  )
29
29
 
30
30
 
31
- async def typical_workflow( # noqa: PLR0913, PLR0917
31
+ async def typical_workflow( # noqa: PLR0913
32
32
  storage_client: ObjectStorageProtocol,
33
33
  test_file_path: Path,
34
34
  test_file_md5: str,
@@ -14,7 +14,7 @@
14
14
  # limitations under the License.
15
15
  """Functionality to support S3-related testing"""
16
16
 
17
- # ruff: noqa: PLR0913, PLR0917
17
+ # ruff: noqa: PLR0913
18
18
 
19
19
  import asyncio
20
20
  import hashlib
@@ -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
- self._conditions.extend(build_predicates(mapping=condition))
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,23 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hexkit
3
- Version: 9.0.0
3
+ Version: 9.0.3
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
- License: Apache 2.0
7
- Project-URL: Repository, https://github.com/ghga-de/hexkit
8
- Project-URL: Documentation, https://ghga-de.github.io/hexkit/
9
- Project-URL: Release Notes, https://github.com/ghga-de/hexkit/releases
10
- Project-URL: Issue Tracker, https://github.com/ghga-de/hexkit/issues
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Repository, https://github.com/ghga-de/ghga
8
+ Project-URL: Documentation, https://ghga-de.github.io/ghga/hexkit/
9
+ Project-URL: Release Notes, https://github.com/ghga-de/ghga/releases?q=hexkit
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.10
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: License :: OSI Approved :: Apache Software License
18
- Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
17
+ Classifier: Programming Language :: Python :: 3.14
19
18
  Classifier: Topic :: Software Development :: Libraries
20
19
  Classifier: Intended Audience :: Developers
21
- Requires-Python: >=3.10
20
+ Requires-Python: >=3.11
22
21
  Description-Content-Type: text/markdown
23
22
  License-File: LICENSE
24
23
  Requires-Dist: opentelemetry-api<2,>=1.44
@@ -72,10 +71,11 @@ Requires-Dist: hexkit[akafka]; extra == "test-akafka"
72
71
  Requires-Dist: testcontainers[kafka]<5,>=4.14; extra == "test-akafka"
73
72
  Provides-Extra: test-s3
74
73
  Requires-Dist: hexkit[s3]; extra == "test-s3"
74
+ Requires-Dist: httpx2<3,>=2.9.1; extra == "test-s3"
75
75
  Requires-Dist: testcontainers<5,>=4.14; extra == "test-s3"
76
76
  Provides-Extra: test-mongodb
77
77
  Requires-Dist: hexkit[mongodb]; extra == "test-mongodb"
78
- Requires-Dist: testcontainers[mongo]<5,>=4.14; extra == "test-mongodb"
78
+ Requires-Dist: testcontainers[mongodb]<5,>=4.14; extra == "test-mongodb"
79
79
  Provides-Extra: test-redis
80
80
  Requires-Dist: hexkit[redis]; extra == "test-redis"
81
81
  Requires-Dist: testcontainers[redis]<5,>=4.14; extra == "test-redis"
@@ -89,10 +89,8 @@ Requires-Dist: hexkit[test]; extra == "all"
89
89
  Requires-Dist: hexkit[opentelemetry]; extra == "all"
90
90
  Dynamic: license-file
91
91
 
92
- [![PyPI version shields.io](https://img.shields.io/pypi/v/hexkit.svg)](https://pypi.python.org/pypi/hexkit/)
93
- [![PyPI pyversions](https://img.shields.io/pypi/pyversions/hexkit.svg)](https://pypi.python.org/pypi/hexkit/)
94
- ![tests](https://github.com/ghga-de/hexkit/actions/workflows/tests.yaml/badge.svg)
95
- [![Coverage Status](https://coveralls.io/repos/github/ghga-de/hexkit/badge.svg?branch=main)](https://coveralls.io/github/ghga-de/hexkit?branch=main)
92
+ [![PyPI version shields.io](https://img.shields.io/pypi/v/hexkit.svg)](https://pypi.org/project/hexkit/)
93
+ [![PyPI pyversions](https://img.shields.io/pypi/pyversions/hexkit.svg)](https://pypi.org/project/hexkit/)
96
94
  [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
97
95
  [![Checked with mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org/)
98
96
 
@@ -102,7 +100,7 @@ Dynamic: license-file
102
100
  and event-driven microservices in Python*
103
101
 
104
102
  Read the short summary below, or jump straight to our full
105
- 📖 **[User Guide](https://ghga-de.github.io/hexkit/user-guide/)** to learn the abstract
103
+ 📖 **[User Guide](https://ghga-de.github.io/ghga/hexkit/user-guide/)** to learn the abstract
106
104
  concepts and patterns as well as the concrete infrastructure integrations and testing
107
105
  tools that hexkit provides for building better microservices.
108
106
 
@@ -130,7 +128,7 @@ to use. The only task that remains for an individual service is to implement
130
128
  service-specific translators between the service's ports and the general-purpose
131
129
  protocols (in addition to implementing the domain functionality of the service, of
132
130
  course). For an in-depth introduction to the pattern, please read the
133
- [Architectural Concepts](https://ghga-de.github.io/hexkit/user-guide/arch_concepts/)
131
+ [Architectural Concepts](https://ghga-de.github.io/ghga/hexkit/user-guide/arch_concepts/)
134
132
  chapter of the User Guide.
135
133
 
136
134
  The following protocols and providers are currently available:
@@ -154,18 +152,18 @@ designing REST APIs and an ORM like SQLAlchemy for interacting with databases.
154
152
 
155
153
  ## Getting Started
156
154
 
157
- The 📖 [User Guide](https://ghga-de.github.io/hexkit/user-guide/) covers all
155
+ The 📖 [User Guide](https://ghga-de.github.io/ghga/hexkit/user-guide/) covers all
158
156
  protocols, providers, testing utilities, and observability tools with example code,
159
- and the [API Reference](https://ghga-de.github.io/hexkit/reference/) documents all
157
+ and the [API Reference](https://ghga-de.github.io/ghga/hexkit/reference/) documents all
160
158
  public classes and functions.
161
159
 
162
160
  For a complete example service built with hexkit, have a look at the
163
- [stream_calc](https://github.com/ghga-de/hexkit/tree/main/examples/stream_calc)
161
+ [stream_calc](https://github.com/ghga-de/ghga/tree/main/libs/hexkit/examples/stream_calc)
164
162
  example application. We also put a lot of effort into making the code
165
163
  self-documenting: you can find the protocols being defined at
166
- [src/hexkit/protocols](https://github.com/ghga-de/hexkit/tree/main/src/hexkit/protocols)
164
+ [src/hexkit/protocols](https://github.com/ghga-de/ghga/tree/main/libs/hexkit/src/hexkit/protocols)
167
165
  and the providers being implemented at
168
- [src/hexkit/providers](https://github.com/ghga-de/hexkit/tree/main/src/hexkit/providers).
166
+ [src/hexkit/providers](https://github.com/ghga-de/ghga/tree/main/libs/hexkit/src/hexkit/providers).
169
167
 
170
168
  ## Installation
171
169
 
@@ -193,8 +191,10 @@ The following extras are available:
193
191
 
194
192
  ## Contributing
195
193
 
196
- Contributions are welcome! Please see the
197
- [contribution guide](https://github.com/ghga-de/hexkit/blob/main/CONTRIBUTING.md)
194
+ Contributions are welcome! hexkit is developed in the
195
+ [GHGA monorepo](https://github.com/ghga-de/ghga) under `libs/hexkit`, together with the
196
+ services that build on it. Please see the
197
+ [contribution guide](https://github.com/ghga-de/ghga/blob/main/libs/hexkit/CONTRIBUTING.md)
198
198
  for how to set up the development environment and build the documentation locally.
199
199
 
200
200
  ## Credits
@@ -205,5 +205,5 @@ library and designed and coded its first versions.
205
205
 
206
206
  ## License
207
207
 
208
- This repository is free to use and modify according to the
209
- [Apache 2.0 License](https://github.com/ghga-de/hexkit/blob/main/LICENSE).
208
+ hexkit is free to use and modify according to the
209
+ [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[mongo]<5,>=4.14
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