camunda-python 0.1.0__tar.gz → 0.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. {camunda_python-0.1.0 → camunda_python-0.1.2}/LICENSE +200 -200
  2. camunda_python-0.1.2/PKG-INFO +174 -0
  3. camunda_python-0.1.2/README.md +143 -0
  4. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda/__init__.py +10 -10
  5. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda/api/__init__.py +14 -14
  6. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda/api/app.py +80 -80
  7. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda/api/deps.py +17 -17
  8. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda/api/errors.py +84 -84
  9. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda/api/pagination.py +74 -74
  10. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda/api/routers/__init__.py +5 -5
  11. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda/api/routers/decision.py +57 -57
  12. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda/api/routers/deployment.py +139 -139
  13. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda/api/routers/history.py +128 -128
  14. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda/api/routers/process_definition.py +49 -49
  15. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda/api/routers/process_instance.py +106 -106
  16. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda/api/routers/task.py +92 -92
  17. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda/api/schemas.py +200 -200
  18. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda/common/__init__.py +19 -19
  19. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda/common/clock.py +30 -30
  20. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda/common/exceptions.py +34 -34
  21. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda/common/idgen.py +23 -23
  22. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda/common/timers.py +106 -106
  23. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda/dmn/__init__.py +5 -5
  24. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda/dmn/engine.py +219 -219
  25. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda/dmn/feel.py +392 -392
  26. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda/engine/__init__.py +9 -9
  27. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda/engine/behavior.py +51 -51
  28. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda/engine/expression.py +126 -126
  29. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda/engine/process_engine.py +3304 -3237
  30. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda/job/__init__.py +9 -9
  31. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda/job/executor.py +136 -136
  32. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda/model/__init__.py +48 -48
  33. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda/model/bpmn.py +326 -326
  34. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda/model/dmn.py +101 -101
  35. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda/model/execution.py +121 -121
  36. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda/model/job.py +88 -88
  37. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda/model/task.py +33 -33
  38. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda/model/variable.py +35 -35
  39. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda/parser/__init__.py +5 -5
  40. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda/parser/bpmn_parser.py +677 -646
  41. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda/parser/dmn_parser.py +225 -225
  42. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda/persistence/__init__.py +21 -21
  43. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda/persistence/entities.py +202 -202
  44. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda/persistence/store.py +721 -721
  45. camunda_python-0.1.2/camunda_python.egg-info/PKG-INFO +174 -0
  46. {camunda_python-0.1.0 → camunda_python-0.1.2}/pyproject.toml +48 -49
  47. camunda_python-0.1.0/PKG-INFO +0 -377
  48. camunda_python-0.1.0/README.md +0 -348
  49. camunda_python-0.1.0/camunda_python.egg-info/PKG-INFO +0 -377
  50. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda_python.egg-info/SOURCES.txt +0 -0
  51. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda_python.egg-info/dependency_links.txt +0 -0
  52. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda_python.egg-info/requires.txt +0 -0
  53. {camunda_python-0.1.0 → camunda_python-0.1.2}/camunda_python.egg-info/top_level.txt +0 -0
  54. {camunda_python-0.1.0 → camunda_python-0.1.2}/setup.cfg +0 -0
@@ -1,200 +1,200 @@
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 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 describing the origin of the Work and
141
- 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 name and extension be included on the same "printed" page as
186
- the copyright notice for easier identification within third-party archives.
187
-
188
- Copyright 2026 yingwang (movingheart000@gmail.com)
189
-
190
- Licensed under the Apache License, Version 2.0 (the "License");
191
- you may not use this file except in compliance with the License.
192
- You may obtain a copy of the License at
193
-
194
- http://www.apache.org/licenses/LICENSE-2.0
195
-
196
- Unless required by applicable law or agreed to in writing, software
197
- distributed under the License is distributed on an "AS IS" BASIS,
198
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
199
- See the License for the specific language governing permissions and
200
- limitations under the License.
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 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 describing the origin of the Work and
141
+ 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 name and extension be included on the same "printed" page as
186
+ the copyright notice for easier identification within third-party archives.
187
+
188
+ Copyright 2026 yingwang (movingheart000@gmail.com)
189
+
190
+ Licensed under the Apache License, Version 2.0 (the "License");
191
+ you may not use this file except in compliance with the License.
192
+ You may obtain a copy of the License at
193
+
194
+ http://www.apache.org/licenses/LICENSE-2.0
195
+
196
+ Unless required by applicable law or agreed to in writing, software
197
+ distributed under the License is distributed on an "AS IS" BASIS,
198
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
199
+ See the License for the specific language governing permissions and
200
+ limitations under the License.
@@ -0,0 +1,174 @@
1
+ Metadata-Version: 2.4
2
+ Name: camunda-python
3
+ Version: 0.1.2
4
+ Summary: Python3 reimplementation of Camunda 7 BPMN engine (semantic-aligned, Apache-2.0 independent implementation)
5
+ Author: yingwang
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/movingheart/camunda-python
8
+ Project-URL: Source, https://github.com/movingheart/camunda-python
9
+ Keywords: bpmn,camunda,workflow,process-engine,workflow-engine
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
16
+ Requires-Python: >=3.12
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ Requires-Dist: lxml>=5.0
20
+ Requires-Dist: sqlalchemy>=2.0
21
+ Requires-Dist: croniter>=2.0
22
+ Provides-Extra: dev
23
+ Requires-Dist: pytest>=8.0; extra == "dev"
24
+ Requires-Dist: pytest-cov>=5.0; extra == "dev"
25
+ Provides-Extra: api
26
+ Requires-Dist: fastapi>=0.115; extra == "api"
27
+ Requires-Dist: uvicorn>=0.30; extra == "api"
28
+ Requires-Dist: python-multipart>=0.0.9; extra == "api"
29
+ Requires-Dist: httpx>=0.27; extra == "api"
30
+ Dynamic: license-file
31
+
32
+ # camunda-python
33
+
34
+ 一个面向 Python 3 的开源 BPMN / DMN 流程引擎。
35
+
36
+ 提供 BPMN 2.0 流程模型解析、流转执行、DMN 决策表求值、SQLAlchemy 持久化、多实例
37
+ 作业执行与可选的 REST API。适合需要把工作流嵌入 Python 服务、又不想拉一整套 Java
38
+ 生态的团队。
39
+
40
+ ## 特性一览
41
+
42
+ - **BPMN 2.0 流程建模**:基于 `lxml` 的自研解析器,支持用户任务 / 服务任务 / 排他与
43
+ 并行网关 / 内嵌子流程 / 多实例 / 边界与中断 / 消息与信号事件。
44
+ - **DMN 决策引擎**:独立可用,支持六种 `hitPolicy`(`UNIQUE` / `FIRST` / `ANY` /
45
+ `PRIORITY` / `RULE ORDER` / `COLLECT[+SUM/MIN/MAX/COUNT]`)与 FEEL 表达式子集
46
+ (数值算术 / 比较 / 区间 / 列表 / `not(...)` / `null`),并可通过 BPMN
47
+ `businessRuleTask` 集成进流程。
48
+ - **持久化**:SQLAlchemy 2.0,兼容 **SQLite / PostgreSQL / MySQL**。崩溃后
49
+ `ProcessEngine.from_database()` 一行恢复。
50
+ - **作业执行器**:Timer Start / Timer Catch / `asyncBefore / asyncAfter` / 失败重试;
51
+ `JobExecutor` 后台线程自动推进。
52
+ - **多节点抢锁**:跨进程 / 多 JobExecutor 通过 DB CAS lease 保证同一作业不被重复执行,
53
+ 长作业支持续约。
54
+ - **REST API**:FastAPI 兼容 Camunda 7 `engine-rest` 常用端点(部署 / 流程定义 /
55
+ 流程实例 / 任务 / 历史 / 决策),9 个列表端点支持 `firstResult` + `maxResults` 分页。
56
+
57
+ ## 快速开始
58
+
59
+ ```bash
60
+ pip install camunda-python # 核心(BPMN / DMN / 持久化 / JobExecutor)
61
+ pip install camunda-python[api] # 可选:REST API(fastapi + uvicorn)
62
+ ```
63
+
64
+ 最小可运行示例(拷贝即跑,无需任何本地文件;`examples/loan-approval.bpmn` 为本示例的完整版):
65
+
66
+ ```python
67
+ from camunda.parser import parse_bpmn_xml
68
+ from camunda.engine import ProcessEngine
69
+
70
+ xml = """<?xml version="1.0" encoding="UTF-8"?>
71
+ <bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL"
72
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
73
+ xmlns:camunda="http://camunda.org/schema/1.0/bpmn"
74
+ id="d1" targetNamespace="http://example.com/loan">
75
+ <bpmn:process id="loan-approval" name="贷款审批流程" isExecutable="true">
76
+ <bpmn:startEvent id="start" name="提交申请"/>
77
+ <bpmn:serviceTask id="check-credit" camunda:delegateExpression="${checkCredit}"/>
78
+ <bpmn:exclusiveGateway id="amount-gateway" default="flow-auto-pass"/>
79
+ <bpmn:userTask id="manual-review" name="人工审批"/>
80
+ <bpmn:exclusiveGateway id="decision-gateway" default="flow-reject"/>
81
+ <bpmn:endEvent id="end-approved" name="已批准"/>
82
+ <bpmn:endEvent id="end-rejected" name="已拒绝"/>
83
+ <bpmn:sequenceFlow id="flow-start" sourceRef="start" targetRef="check-credit"/>
84
+ <bpmn:sequenceFlow id="flow-check" sourceRef="check-credit" targetRef="amount-gateway"/>
85
+ <bpmn:sequenceFlow id="flow-manual" sourceRef="amount-gateway" targetRef="manual-review">
86
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${amount &gt;= 10000}</bpmn:conditionExpression>
87
+ </bpmn:sequenceFlow>
88
+ <bpmn:sequenceFlow id="flow-auto-pass" sourceRef="amount-gateway" targetRef="end-approved"/>
89
+ <bpmn:sequenceFlow id="flow-review" sourceRef="manual-review" targetRef="decision-gateway"/>
90
+ <bpmn:sequenceFlow id="flow-approve" sourceRef="decision-gateway" targetRef="end-approved">
91
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${approved == true}</bpmn:conditionExpression>
92
+ </bpmn:sequenceFlow>
93
+ <bpmn:sequenceFlow id="flow-reject" sourceRef="decision-gateway" targetRef="end-rejected"/>
94
+ </bpmn:process>
95
+ </bpmn:definitions>"""
96
+
97
+ engine = ProcessEngine()
98
+ engine.register_delegate("checkCredit", lambda v: v.update(credit_ok=True)) # serviceTask 实现
99
+ engine.deploy(parse_bpmn_xml(xml))
100
+
101
+ pi = engine.start_process_instance_by_key("loan-approval", {"amount": 20000}) # 大额 -> 人工审批
102
+ task = engine.create_task_query(process_instance_id=pi.id)[0] # [人工审批]
103
+ engine.complete_task(task.id, {"approved": True}) # -> COMPLETED
104
+ ```
105
+
106
+ 启动 REST 服务:
107
+
108
+ ```bash
109
+ uvicorn camunda.api.app:create_app --factory --port 8080
110
+ # 交互式 API 文档:http://127.0.0.1:8080/docs
111
+ ```
112
+
113
+ ## 文档导航
114
+
115
+ | 想做什么 | 看哪里 |
116
+ |---|---|
117
+ | 第一次接触,从「5 分钟 hello world」走到「生产部署」 | **[docs/USER_GUIDE.md](https://github.com/movingheart/camunda-python/blob/main/docs/USER_GUIDE.md)** |
118
+ | 看引擎设计 / 模块划分 / 与 Camunda 7 的差异 | **[docs/ARCHITECTURE.md](https://github.com/movingheart/camunda-python/blob/main/docs/ARCHITECTURE.md)** |
119
+ | 看每个示例跑什么场景 | **[examples/](https://github.com/movingheart/camunda-python/tree/main/examples)** |
120
+
121
+ > 文档与示例存放在 GitHub 仓库(PyPI 页面不内嵌),点击上方链接或在仓库根目录查看。
122
+
123
+ ## 示例
124
+
125
+ 仓库自带可直接 `python examples/xxx.py` 运行的可执行示例:
126
+
127
+ | 示例 | 演示的引擎能力 |
128
+ |---|---|
129
+ | `run_demo.py` | 排他网关 + 用户任务 + 服务任务(贷款审批) |
130
+ | `run_timer_demo.py` | Timer Start / Timer Catch / `asyncBefore`(真实时钟) |
131
+ | `run_boundary_demo.py` | Timer 边界事件中断 + `asyncAfter`(审批超时降级) |
132
+ | `run_subprocess_demo.py` | 内嵌子流程 + 子流程级边界 timer(订单履约 / 退款) |
133
+ | `run_ni_demo.py` | 非中断式边界(`cancelActivity=false` + 并发收束) |
134
+ | `run_mi_demo.py` | 多实例三宿主(userTask / serviceTask / subProcess) |
135
+ | `run_msg_sig_demo.py` | 消息 1:1 关联 / 信号广播 / 订阅恢复 |
136
+ | `run_dmn_demo.py` | DMN 直接求值 / `businessRuleTask` 集成 / 决策驱动网关 |
137
+ | `run_api_demo.py` | 真实起 uvicorn,部署 / 启动 / 任务 / 历史 / 决策端到端 |
138
+ | `run_lock_demo.py` | 双 JobExecutor 共享 Store,验证 CAS lease 抢锁 |
139
+
140
+ ## 测试与开发
141
+
142
+ ```bash
143
+ git clone https://github.com/movingheart/camunda-python.git
144
+ cd camunda-python
145
+ python -m venv .venv && source .venv/bin/activate
146
+ pip install -e ".[dev,api]"
147
+
148
+ pytest # 跑测试套件
149
+ pytest -k test_dmn # 只跑某个子模块
150
+ pytest --cov=camunda # 带覆盖率
151
+ ```
152
+
153
+ CI 在 GitHub Actions 上跑 Python 3.12 / 3.13,每次 push 触发。
154
+
155
+ ## 与 Camunda 7 的差异
156
+
157
+ 设计目标是**语义对齐**——核心流程元素、状态机、持久化表结构与 Camunda 7 保持一致,
158
+ 方便已有 Camunda 7 经验的人快速理解。但以下几点**有意取舍**:
159
+
160
+ - **不做**:Cockpit / Tasklist Web 控制台、身份与权限、外部任务(external task)。
161
+ - **轻量差异**:FEEL 仅支持子集(无函数调用 / 日期时间 / 路径表达式);
162
+ DMN 仅支持 `decisionTable` 形态;DMN 部署不落库(崩溃恢复后需重新 `deploy_dmn`)。
163
+ - **多进程抢锁**:用应用层 CAS(`UPDATE ... WHERE LOCK_EXP_TIME_ < now`)替代
164
+ `SELECT FOR UPDATE`,跨 SQLite / PostgreSQL / MySQL 三个方言一致。
165
+ - **持久化策略**:命令边界 delete + insert 全量重写(与 Camunda 7 逐行 update 不同),
166
+ 对中小流程足够快,恢复语义更直白。
167
+
168
+ 完整差异表见 [docs/ARCHITECTURE.md §设计取舍](https://github.com/movingheart/camunda-python/blob/main/docs/ARCHITECTURE.md)。
169
+
170
+ ## 许可
171
+
172
+ Apache-2.0。详见 [LICENSE](https://github.com/movingheart/camunda-python/blob/main/LICENSE)。
173
+
174
+ 变更记录见 [CHANGELOG.md](https://github.com/movingheart/camunda-python/blob/main/CHANGELOG.md)。