apixis 0.1.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.
- apixis-0.1.1/.python-version +1 -0
- apixis-0.1.1/LICENSE +201 -0
- apixis-0.1.1/MANIFEST.in +5 -0
- apixis-0.1.1/PKG-INFO +126 -0
- apixis-0.1.1/README.md +87 -0
- apixis-0.1.1/THIRD_PARTY_NOTICES.md +36 -0
- apixis-0.1.1/docs/README.md +71 -0
- apixis-0.1.1/docs/core/README.md +39 -0
- apixis-0.1.1/docs/core/config/README.md +37 -0
- apixis-0.1.1/docs/core/event/README.md +177 -0
- apixis-0.1.1/docs/core/event/channels.md +77 -0
- apixis-0.1.1/docs/core/event/handlers.md +174 -0
- apixis-0.1.1/docs/core/graph/README.md +194 -0
- apixis-0.1.1/docs/core/graph/state.md +97 -0
- apixis-0.1.1/docs/core/utils/README.md +25 -0
- apixis-0.1.1/docs/releasing.md +80 -0
- apixis-0.1.1/pyproject.toml +73 -0
- apixis-0.1.1/scripts/smoke_test.py +74 -0
- apixis-0.1.1/setup.cfg +4 -0
- apixis-0.1.1/source/apixis/__init__.py +10 -0
- apixis-0.1.1/source/apixis/_version.py +3 -0
- apixis-0.1.1/source/apixis/core/__init__.py +11 -0
- apixis-0.1.1/source/apixis/core/config/__init__.py +0 -0
- apixis-0.1.1/source/apixis/core/config/base.py +164 -0
- apixis-0.1.1/source/apixis/core/config/core_config.py +93 -0
- apixis-0.1.1/source/apixis/core/event/__init__.py +109 -0
- apixis-0.1.1/source/apixis/core/event/base.py +345 -0
- apixis-0.1.1/source/apixis/core/event/event_loop.py +287 -0
- apixis-0.1.1/source/apixis/core/event/event_pipe.py +386 -0
- apixis-0.1.1/source/apixis/core/event/event_registry.py +61 -0
- apixis-0.1.1/source/apixis/core/event/factory.py +160 -0
- apixis-0.1.1/source/apixis/core/event/handler_registry.py +345 -0
- apixis-0.1.1/source/apixis/core/event/pipe_channel.py +563 -0
- apixis-0.1.1/source/apixis/core/event/subscription.py +316 -0
- apixis-0.1.1/source/apixis/core/graph/__init__.py +93 -0
- apixis-0.1.1/source/apixis/core/graph/base.py +132 -0
- apixis-0.1.1/source/apixis/core/graph/context/__init__.py +31 -0
- apixis-0.1.1/source/apixis/core/graph/context/graph_context.py +220 -0
- apixis-0.1.1/source/apixis/core/graph/context/manager.py +102 -0
- apixis-0.1.1/source/apixis/core/graph/context/stream_writer.py +63 -0
- apixis-0.1.1/source/apixis/core/graph/graph_manager.py +263 -0
- apixis-0.1.1/source/apixis/core/graph/interrupter/__init__.py +9 -0
- apixis-0.1.1/source/apixis/core/graph/interrupter/block.py +58 -0
- apixis-0.1.1/source/apixis/core/graph/interrupter/graph_interrupter.py +206 -0
- apixis-0.1.1/source/apixis/core/graph/node.py +310 -0
- apixis-0.1.1/source/apixis/core/graph/node_graph.py +795 -0
- apixis-0.1.1/source/apixis/core/graph/utils/__init__.py +29 -0
- apixis-0.1.1/source/apixis/core/graph/utils/namespace.py +119 -0
- apixis-0.1.1/source/apixis/core/graph/utils/state.py +65 -0
- apixis-0.1.1/source/apixis/core/graph/utils/validate.py +58 -0
- apixis-0.1.1/source/apixis/core/utils/__init__.py +33 -0
- apixis-0.1.1/source/apixis/core/utils/exception.py +103 -0
- apixis-0.1.1/source/apixis/core/utils/id_generator.py +8 -0
- apixis-0.1.1/source/apixis/core/utils/logger.py +426 -0
- apixis-0.1.1/source/apixis/core/utils/snow/README.md +11 -0
- apixis-0.1.1/source/apixis/core/utils/snow/__init__.py +4 -0
- apixis-0.1.1/source/apixis/core/utils/snow/generator.py +38 -0
- apixis-0.1.1/source/apixis/core/utils/snow/options.py +43 -0
- apixis-0.1.1/source/apixis/core/utils/snow/snowflake.py +20 -0
- apixis-0.1.1/source/apixis/core/utils/snow/snowflake_m1.py +147 -0
- apixis-0.1.1/source/apixis/py.typed +0 -0
- apixis-0.1.1/source/apixis.egg-info/PKG-INFO +126 -0
- apixis-0.1.1/source/apixis.egg-info/SOURCES.txt +100 -0
- apixis-0.1.1/source/apixis.egg-info/dependency_links.txt +1 -0
- apixis-0.1.1/source/apixis.egg-info/requires.txt +11 -0
- apixis-0.1.1/source/apixis.egg-info/top_level.txt +1 -0
- apixis-0.1.1/source/tests/conftest.py +54 -0
- apixis-0.1.1/source/tests/core/config/test_base_config.py +175 -0
- apixis-0.1.1/source/tests/core/event/__init__.py +0 -0
- apixis-0.1.1/source/tests/core/event/conftest.py +123 -0
- apixis-0.1.1/source/tests/core/event/test_cancellation.py +351 -0
- apixis-0.1.1/source/tests/core/event/test_event_backpressure.py +320 -0
- apixis-0.1.1/source/tests/core/event/test_event_base.py +14 -0
- apixis-0.1.1/source/tests/core/event/test_event_loop.py +693 -0
- apixis-0.1.1/source/tests/core/event/test_event_pipe.py +460 -0
- apixis-0.1.1/source/tests/core/event/test_event_pipe_coverage.py +613 -0
- apixis-0.1.1/source/tests/core/event/test_event_registry.py +204 -0
- apixis-0.1.1/source/tests/core/event/test_factory.py +303 -0
- apixis-0.1.1/source/tests/core/event/test_handler_execution.py +613 -0
- apixis-0.1.1/source/tests/core/event/test_handler_registry.py +1049 -0
- apixis-0.1.1/source/tests/core/graph/stream/test_stream_writer.py +115 -0
- apixis-0.1.1/source/tests/core/graph/test_context_manager.py +143 -0
- apixis-0.1.1/source/tests/core/graph/test_graph.py +934 -0
- apixis-0.1.1/source/tests/core/graph/test_graph_concurrency.py +228 -0
- apixis-0.1.1/source/tests/core/graph/test_graph_context.py +443 -0
- apixis-0.1.1/source/tests/core/graph/test_graph_manager.py +388 -0
- apixis-0.1.1/source/tests/core/graph/test_interrupter.py +327 -0
- apixis-0.1.1/source/tests/core/graph/test_keep_ref.py +363 -0
- apixis-0.1.1/source/tests/core/graph/test_max_steps.py +148 -0
- apixis-0.1.1/source/tests/core/graph/test_node.py +288 -0
- apixis-0.1.1/source/tests/core/graph/test_node_graph.py +756 -0
- apixis-0.1.1/source/tests/core/graph/test_stream.py +280 -0
- apixis-0.1.1/source/tests/integration/test_custom_node_graph_integration.py +222 -0
- apixis-0.1.1/source/tests/integration/test_default_interrupted_hook_integration.py +312 -0
- apixis-0.1.1/source/tests/integration/test_graph_cancellation_integration.py +232 -0
- apixis-0.1.1/source/tests/integration/test_graph_decompose_integration.py +205 -0
- apixis-0.1.1/source/tests/integration/test_graph_lifecycle_regressions.py +201 -0
- apixis-0.1.1/source/tests/integration/test_graph_ownership_integration.py +319 -0
- apixis-0.1.1/source/tests/integration/test_handler_registry_scale_integration.py +332 -0
- apixis-0.1.1/source/tests/integration/test_node_graph_abort_integration.py +333 -0
- apixis-0.1.1/source/tests/integration/test_node_graph_plugin_integration.py +398 -0
- apixis-0.1.1/uv.lock +1251 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.12
|
apixis-0.1.1/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
apixis-0.1.1/MANIFEST.in
ADDED
apixis-0.1.1/PKG-INFO
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: apixis
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: An event-driven graph orchestration core for asyncio applications.
|
|
5
|
+
Author-email: JJJJSTIYYYY <wavejustiy@gmail.com>
|
|
6
|
+
Maintainer-email: JJJJSTIYYYY <wavejustiy@gmail.com>
|
|
7
|
+
License-Expression: Apache-2.0 AND MIT
|
|
8
|
+
Project-URL: Homepage, https://github.com/JJJJSTIYYYY/Apixis
|
|
9
|
+
Project-URL: Repository, https://github.com/JJJJSTIYYYY/Apixis.git
|
|
10
|
+
Project-URL: Source, https://github.com/JJJJSTIYYYY/Apixis
|
|
11
|
+
Project-URL: Documentation, https://github.com/JJJJSTIYYYY/Apixis/blob/master/docs/README.md
|
|
12
|
+
Project-URL: Issues, https://github.com/JJJJSTIYYYY/Apixis/issues
|
|
13
|
+
Project-URL: Changelog, https://github.com/JJJJSTIYYYY/Apixis/releases
|
|
14
|
+
Keywords: asyncio,events,graph,workflow,orchestration
|
|
15
|
+
Classifier: Development Status :: 3 - Alpha
|
|
16
|
+
Classifier: Framework :: AsyncIO
|
|
17
|
+
Classifier: Intended Audience :: Developers
|
|
18
|
+
Classifier: Operating System :: OS Independent
|
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
23
|
+
Classifier: Typing :: Typed
|
|
24
|
+
Requires-Python: >=3.12
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
License-File: THIRD_PARTY_NOTICES.md
|
|
28
|
+
Requires-Dist: aio-pika>=9.5.8
|
|
29
|
+
Requires-Dist: aiokafka>=0.12.0
|
|
30
|
+
Requires-Dist: httpx[socks]>=0.28.1
|
|
31
|
+
Requires-Dist: pyyaml>=6.0.3
|
|
32
|
+
Provides-Extra: dev
|
|
33
|
+
Requires-Dist: pytest>=9.1.1; extra == "dev"
|
|
34
|
+
Requires-Dist: pytest-asyncio>=1.4.0; extra == "dev"
|
|
35
|
+
Requires-Dist: pytest-cov>=7.0.0; extra == "dev"
|
|
36
|
+
Requires-Dist: build>=1.2.2; extra == "dev"
|
|
37
|
+
Requires-Dist: twine>=6.1.0; extra == "dev"
|
|
38
|
+
Dynamic: license-file
|
|
39
|
+
|
|
40
|
+
<div align="center">
|
|
41
|
+
|
|
42
|
+
# APIXIS
|
|
43
|
+
|
|
44
|
+
Event-driven graph orchestration for Python asyncio applications.
|
|
45
|
+
|
|
46
|
+
[](https://pypi.org/project/apixis/)
|
|
47
|
+
[](https://pypi.org/project/apixis/)
|
|
48
|
+
[](https://github.com/JJJJSTIYYYY/Apixis/blob/master/LICENSE)
|
|
49
|
+
|
|
50
|
+
[Source](https://github.com/JJJJSTIYYYY/Apixis) ·
|
|
51
|
+
[Issues](https://github.com/JJJJSTIYYYY/Apixis/issues) ·
|
|
52
|
+
[API Reference](https://github.com/JJJJSTIYYYY/Apixis/blob/master/docs/README.md)
|
|
53
|
+
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
APIXIS provides two composable runtimes:
|
|
57
|
+
|
|
58
|
+
- an asynchronous event system with wildcard subscriptions, ordered handlers, backpressure, and pluggable channels;
|
|
59
|
+
- a stateful graph runtime with routing, parallel nodes, snapshots, streaming, and interruption/resume workflows.
|
|
60
|
+
|
|
61
|
+
> Python 3.12+ is required. Runtime APIs are designed for `asyncio`.
|
|
62
|
+
|
|
63
|
+
## Install
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
pip install apixis
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
To install a local checkout, run from the repository root:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
python -m pip install .
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
For development and release tools:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
python -m pip install -e ".[dev]"
|
|
79
|
+
python -m pytest
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
With uv, use `uv sync --extra dev --locked` and `uv run --extra dev pytest`.
|
|
83
|
+
See [the release guide](https://github.com/JJJJSTIYYYY/Apixis/blob/master/docs/releasing.md) for building and publishing to PyPI.
|
|
84
|
+
|
|
85
|
+
## Quick start
|
|
86
|
+
|
|
87
|
+
```python
|
|
88
|
+
import asyncio
|
|
89
|
+
|
|
90
|
+
from apixis import END, START, GraphManager
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
def increment(state: dict) -> dict:
|
|
94
|
+
return {"value": state["value"] + 1}
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
async def master() -> None:
|
|
98
|
+
graph = (
|
|
99
|
+
GraphManager()
|
|
100
|
+
.add_node(increment)
|
|
101
|
+
.add_edge(START, "increment")
|
|
102
|
+
.add_edge("increment", END)
|
|
103
|
+
.compile_graph()
|
|
104
|
+
)
|
|
105
|
+
try:
|
|
106
|
+
result = await graph.invoke({"value": 1})
|
|
107
|
+
print(result) # {'value': 2}
|
|
108
|
+
finally:
|
|
109
|
+
graph.decompose()
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
asyncio.run(master())
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Documentation
|
|
116
|
+
|
|
117
|
+
- [API reference](https://github.com/JJJJSTIYYYY/Apixis/blob/master/docs/README.md)
|
|
118
|
+
- [Event API](https://github.com/JJJJSTIYYYY/Apixis/blob/master/docs/core/event/README.md)
|
|
119
|
+
- [Graph API](https://github.com/JJJJSTIYYYY/Apixis/blob/master/docs/core/graph/README.md)
|
|
120
|
+
- [State and routing](https://github.com/JJJJSTIYYYY/Apixis/blob/master/docs/core/graph/state.md)
|
|
121
|
+
- [Utilities and exceptions](https://github.com/JJJJSTIYYYY/Apixis/blob/master/docs/core/utils/README.md)
|
|
122
|
+
|
|
123
|
+
## License
|
|
124
|
+
|
|
125
|
+
Licensed under the Apache License 2.0. See [LICENSE](https://github.com/JJJJSTIYYYY/Apixis/blob/master/LICENSE).
|
|
126
|
+
The bundled IdGenerator component is MIT licensed; see [third-party notices](https://github.com/JJJJSTIYYYY/Apixis/blob/master/THIRD_PARTY_NOTICES.md).
|
apixis-0.1.1/README.md
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# APIXIS
|
|
4
|
+
|
|
5
|
+
Event-driven graph orchestration for Python asyncio applications.
|
|
6
|
+
|
|
7
|
+
[](https://pypi.org/project/apixis/)
|
|
8
|
+
[](https://pypi.org/project/apixis/)
|
|
9
|
+
[](https://github.com/JJJJSTIYYYY/Apixis/blob/master/LICENSE)
|
|
10
|
+
|
|
11
|
+
[Source](https://github.com/JJJJSTIYYYY/Apixis) ·
|
|
12
|
+
[Issues](https://github.com/JJJJSTIYYYY/Apixis/issues) ·
|
|
13
|
+
[API Reference](https://github.com/JJJJSTIYYYY/Apixis/blob/master/docs/README.md)
|
|
14
|
+
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
APIXIS provides two composable runtimes:
|
|
18
|
+
|
|
19
|
+
- an asynchronous event system with wildcard subscriptions, ordered handlers, backpressure, and pluggable channels;
|
|
20
|
+
- a stateful graph runtime with routing, parallel nodes, snapshots, streaming, and interruption/resume workflows.
|
|
21
|
+
|
|
22
|
+
> Python 3.12+ is required. Runtime APIs are designed for `asyncio`.
|
|
23
|
+
|
|
24
|
+
## Install
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
pip install apixis
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
To install a local checkout, run from the repository root:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
python -m pip install .
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
For development and release tools:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
python -m pip install -e ".[dev]"
|
|
40
|
+
python -m pytest
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
With uv, use `uv sync --extra dev --locked` and `uv run --extra dev pytest`.
|
|
44
|
+
See [the release guide](https://github.com/JJJJSTIYYYY/Apixis/blob/master/docs/releasing.md) for building and publishing to PyPI.
|
|
45
|
+
|
|
46
|
+
## Quick start
|
|
47
|
+
|
|
48
|
+
```python
|
|
49
|
+
import asyncio
|
|
50
|
+
|
|
51
|
+
from apixis import END, START, GraphManager
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def increment(state: dict) -> dict:
|
|
55
|
+
return {"value": state["value"] + 1}
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
async def master() -> None:
|
|
59
|
+
graph = (
|
|
60
|
+
GraphManager()
|
|
61
|
+
.add_node(increment)
|
|
62
|
+
.add_edge(START, "increment")
|
|
63
|
+
.add_edge("increment", END)
|
|
64
|
+
.compile_graph()
|
|
65
|
+
)
|
|
66
|
+
try:
|
|
67
|
+
result = await graph.invoke({"value": 1})
|
|
68
|
+
print(result) # {'value': 2}
|
|
69
|
+
finally:
|
|
70
|
+
graph.decompose()
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
asyncio.run(master())
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Documentation
|
|
77
|
+
|
|
78
|
+
- [API reference](https://github.com/JJJJSTIYYYY/Apixis/blob/master/docs/README.md)
|
|
79
|
+
- [Event API](https://github.com/JJJJSTIYYYY/Apixis/blob/master/docs/core/event/README.md)
|
|
80
|
+
- [Graph API](https://github.com/JJJJSTIYYYY/Apixis/blob/master/docs/core/graph/README.md)
|
|
81
|
+
- [State and routing](https://github.com/JJJJSTIYYYY/Apixis/blob/master/docs/core/graph/state.md)
|
|
82
|
+
- [Utilities and exceptions](https://github.com/JJJJSTIYYYY/Apixis/blob/master/docs/core/utils/README.md)
|
|
83
|
+
|
|
84
|
+
## License
|
|
85
|
+
|
|
86
|
+
Licensed under the Apache License 2.0. See [LICENSE](https://github.com/JJJJSTIYYYY/Apixis/blob/master/LICENSE).
|
|
87
|
+
The bundled IdGenerator component is MIT licensed; see [third-party notices](https://github.com/JJJJSTIYYYY/Apixis/blob/master/THIRD_PARTY_NOTICES.md).
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
Apixis is licensed under Apache-2.0. The vendored files in
|
|
4
|
+
`apixis/core/utils/snow/` derive from IdGenerator by yitter and retain the MIT
|
|
5
|
+
license below. The package includes modifications to that component.
|
|
6
|
+
|
|
7
|
+
Upstream project: https://github.com/yitter/IdGenerator
|
|
8
|
+
|
|
9
|
+
License source: https://github.com/yitter/IdGenerator/blob/master/LICENSE
|
|
10
|
+
|
|
11
|
+
The existing component notice records Copyright (c) 2021 yitter. The current
|
|
12
|
+
upstream license includes the following copyright notice and terms:
|
|
13
|
+
|
|
14
|
+
```text
|
|
15
|
+
MIT License
|
|
16
|
+
|
|
17
|
+
Copyright (c) 2021-2025 yitter
|
|
18
|
+
|
|
19
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
20
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
21
|
+
in the Software without restriction, including without limitation the rights
|
|
22
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
23
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
24
|
+
furnished to do so, subject to the following conditions:
|
|
25
|
+
|
|
26
|
+
The above copyright notice and this permission notice shall be included in all
|
|
27
|
+
copies or substantial portions of the Software.
|
|
28
|
+
|
|
29
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
30
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
31
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
32
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
33
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
34
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
35
|
+
SOFTWARE.
|
|
36
|
+
```
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# APIXIS 接口文档
|
|
2
|
+
|
|
3
|
+
本文档面向通过 PyPI 安装 APIXIS 的调用方,接口以当前 `apixis` / `apixis.core` 公共导出为准。除非调试框架本身,不建议依赖以下划线开头的属性或模块内部对象。
|
|
4
|
+
|
|
5
|
+
## 安装与运行环境
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install apixis
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
- Python:`>= 3.12`
|
|
12
|
+
- 异步运行时:`asyncio`
|
|
13
|
+
- 推荐直接从 `apixis` 导入稳定公共接口。
|
|
14
|
+
|
|
15
|
+
从源码开发、构建发行包和上传 PyPI 请参阅[打包与发布](./releasing.md)。
|
|
16
|
+
|
|
17
|
+
## API 导航
|
|
18
|
+
|
|
19
|
+
| 模块 | 用途 |
|
|
20
|
+
| --- | --- |
|
|
21
|
+
| [Event API](./core/event/README.md) | 事件发布、订阅、handler、event core 生命周期 |
|
|
22
|
+
| [Event handlers](./core/event/handlers.md) | 排序、通配符、错误/accept/cancel 回调 |
|
|
23
|
+
| [Event channels](./core/event/channels.md) | builtin、gateway、Kafka、RabbitMQ 通道 |
|
|
24
|
+
| [Graph API](./core/graph/README.md) | 构图、执行、stream、context、interrupt |
|
|
25
|
+
| [Graph state & routing](./core/graph/state.md) | `Command`、`AutoMerge`、`KeepRef`、`Reset`、并行路由 |
|
|
26
|
+
| [Utilities](./core/utils/README.md) | 公共异常、logger、生命周期工具 |
|
|
27
|
+
| [Configuration](./core/config/README.md) | 运行时配置项及默认值 |
|
|
28
|
+
|
|
29
|
+
## 最小图调用
|
|
30
|
+
|
|
31
|
+
```python
|
|
32
|
+
from apixis import END, START, GraphManager
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def step(state: dict) -> dict:
|
|
36
|
+
return {"count": state.get("count", 0) + 1}
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
graph = (
|
|
40
|
+
GraphManager()
|
|
41
|
+
.add_node(step)
|
|
42
|
+
.add_edge(START, "step")
|
|
43
|
+
.add_edge("step", END)
|
|
44
|
+
.compile_graph()
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
result = await graph.invoke({"count": 0})
|
|
48
|
+
graph.decompose()
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## 最小事件调用
|
|
52
|
+
|
|
53
|
+
```python
|
|
54
|
+
from apixis import EventType, get_event_pipe, start_core, subscribe
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
@subscribe("app.*")
|
|
58
|
+
async def observe(event):
|
|
59
|
+
print(event.event_name, event.context)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
await start_core()
|
|
63
|
+
await get_event_pipe().post_event(
|
|
64
|
+
event_type=EventType.INFO,
|
|
65
|
+
event_name="app.started",
|
|
66
|
+
context={"ready": True},
|
|
67
|
+
)
|
|
68
|
+
await get_event_pipe().join()
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
`get_*()` 与 `aget_*()`:它们会返回共享组件,并在已有 event loop 时触发后台启动,但不保证启动已经完成。其获取到的组件接口可用性均不依赖是否启动完成。
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Core API
|
|
2
|
+
|
|
3
|
+
`apixis.core` 汇总导出 Event、Graph 和 Utils 的公共接口;顶层 `apixis` 再次导出同一组接口,并额外提供 `VERSION` 和 `__version__`(两者与发行包版本一致)。
|
|
4
|
+
|
|
5
|
+
推荐应用代码直接使用:
|
|
6
|
+
|
|
7
|
+
```python
|
|
8
|
+
from apixis import GraphManager, subscribe
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
而不是依赖内部文件路径。
|
|
12
|
+
|
|
13
|
+
## Event
|
|
14
|
+
|
|
15
|
+
事件系统负责:
|
|
16
|
+
|
|
17
|
+
- 发布与消费 `ApixEvent`;
|
|
18
|
+
- 按事件名或 glob 通配符匹配 handler;
|
|
19
|
+
- handler 排序、accept、错误与取消通知;
|
|
20
|
+
- 本地队列与可选远程通道;
|
|
21
|
+
- 全局共享 event core 生命周期。
|
|
22
|
+
|
|
23
|
+
详见 [Event API](./event/README.md)。
|
|
24
|
+
|
|
25
|
+
## Graph
|
|
26
|
+
|
|
27
|
+
图系统负责:
|
|
28
|
+
|
|
29
|
+
- 使用 `GraphManager` 构建并编译 `NodeGraph`;
|
|
30
|
+
- 通过 `Command` 更新 state 和选择下一跳;
|
|
31
|
+
- 并行节点/并行下一跳;
|
|
32
|
+
- `GraphContext`、快照恢复、stream;
|
|
33
|
+
- `interrupt()` / `Block` 中断交互。
|
|
34
|
+
|
|
35
|
+
详见 [Graph API](./graph/README.md)。
|
|
36
|
+
|
|
37
|
+
## API 稳定边界
|
|
38
|
+
|
|
39
|
+
公共 API 以各模块 `__all__` 为准。测试、诊断或框架开发中虽然可以访问内部属性,但 PyPI 使用方不应把 `_started`、内部 queue、registry 字典等实现细节作为兼容契约。
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Configuration
|
|
2
|
+
|
|
3
|
+
APIXIS 在导入 core 配置时从当前工作目录的 `./config.yaml` 读取一次配置。没有文件时使用默认值。
|
|
4
|
+
|
|
5
|
+
配置并不是顶层公共 API;这里记录的是 PyPI 使用方可通过 `config.yaml` 调整的运行参数。
|
|
6
|
+
|
|
7
|
+
## 示例
|
|
8
|
+
|
|
9
|
+
```yaml
|
|
10
|
+
LOG:
|
|
11
|
+
debug_level: INFO
|
|
12
|
+
show_event_dispatch: false
|
|
13
|
+
|
|
14
|
+
PIPELINE:
|
|
15
|
+
event_pipe_max_len: 65536
|
|
16
|
+
event_loop_backpressure: 1024
|
|
17
|
+
background_handler_backpressure: 4096
|
|
18
|
+
|
|
19
|
+
LIFESPAN:
|
|
20
|
+
resource_clean_interval: 300
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## 主要配置
|
|
24
|
+
|
|
25
|
+
| 路径 | 默认值 | 说明 |
|
|
26
|
+
| --- | ---: | --- |
|
|
27
|
+
| `LOG.debug_level` | `DEBUG` | 日志级别 |
|
|
28
|
+
| `LOG.trace` | `true` | trace 开关 |
|
|
29
|
+
| `LOG.show_event_dispatch` | `true` | event dispatch 日志 |
|
|
30
|
+
| `PIPELINE.event_pipe_max_len` | `65536` | 外部 mailbox 默认缓冲限制 |
|
|
31
|
+
| `PIPELINE.event_loop_backpressure` | `1024` | event dispatch 并发背压;最小值 128 |
|
|
32
|
+
| `PIPELINE.background_handler_backpressure` | `4096` | 后台 handler 并发限制 |
|
|
33
|
+
| `LIFESPAN.resource_clean_interval` | `300` | 资源清理周期 |
|
|
34
|
+
|
|
35
|
+
远程 gateway、Kafka 和 RabbitMQ 还可通过 `REMOTE_GATEWAY` / `EVENT_CHANNEL` 配置。仅使用本地图和 builtin event channel 时无需配置这些项。
|
|
36
|
+
|
|
37
|
+
本地配置优先于远端配置;`EVENT_CHANNEL` 属于节点本地配置,不从 gateway 继承。
|