flowrs 1.0.0__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.
Potentially problematic release.
This version of flowrs might be problematic. Click here for more details.
- flowrs-1.0.0/Cargo.lock +469 -0
- flowrs-1.0.0/Cargo.toml +18 -0
- flowrs-1.0.0/PKG-INFO +5 -0
- flowrs-1.0.0/flowrs.pyi +21 -0
- flowrs-1.0.0/pyproject.toml +3 -0
- flowrs-1.0.0/src/functions/mod.rs +24 -0
- flowrs-1.0.0/src/lib.rs +53 -0
flowrs-1.0.0/Cargo.lock
ADDED
|
@@ -0,0 +1,469 @@
|
|
|
1
|
+
# This file is automatically @generated by Cargo.
|
|
2
|
+
# It is not intended for manual editing.
|
|
3
|
+
version = 4
|
|
4
|
+
|
|
5
|
+
[[package]]
|
|
6
|
+
name = "android-tzdata"
|
|
7
|
+
version = "0.1.1"
|
|
8
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9
|
+
checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
|
|
10
|
+
|
|
11
|
+
[[package]]
|
|
12
|
+
name = "android_system_properties"
|
|
13
|
+
version = "0.1.5"
|
|
14
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
15
|
+
checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
|
|
16
|
+
dependencies = [
|
|
17
|
+
"libc",
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
[[package]]
|
|
21
|
+
name = "autocfg"
|
|
22
|
+
version = "1.4.0"
|
|
23
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
24
|
+
checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
|
|
25
|
+
|
|
26
|
+
[[package]]
|
|
27
|
+
name = "bitflags"
|
|
28
|
+
version = "2.8.0"
|
|
29
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
30
|
+
checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36"
|
|
31
|
+
|
|
32
|
+
[[package]]
|
|
33
|
+
name = "bumpalo"
|
|
34
|
+
version = "3.16.0"
|
|
35
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
36
|
+
checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
|
|
37
|
+
|
|
38
|
+
[[package]]
|
|
39
|
+
name = "cc"
|
|
40
|
+
version = "1.2.10"
|
|
41
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
42
|
+
checksum = "13208fcbb66eaeffe09b99fffbe1af420f00a7b35aa99ad683dfc1aa76145229"
|
|
43
|
+
dependencies = [
|
|
44
|
+
"shlex",
|
|
45
|
+
]
|
|
46
|
+
|
|
47
|
+
[[package]]
|
|
48
|
+
name = "cfg-if"
|
|
49
|
+
version = "1.0.0"
|
|
50
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
51
|
+
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
|
52
|
+
|
|
53
|
+
[[package]]
|
|
54
|
+
name = "chrono"
|
|
55
|
+
version = "0.4.39"
|
|
56
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
57
|
+
checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825"
|
|
58
|
+
dependencies = [
|
|
59
|
+
"android-tzdata",
|
|
60
|
+
"iana-time-zone",
|
|
61
|
+
"js-sys",
|
|
62
|
+
"num-traits",
|
|
63
|
+
"wasm-bindgen",
|
|
64
|
+
"windows-targets",
|
|
65
|
+
]
|
|
66
|
+
|
|
67
|
+
[[package]]
|
|
68
|
+
name = "core-foundation-sys"
|
|
69
|
+
version = "0.8.7"
|
|
70
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
71
|
+
checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
|
|
72
|
+
|
|
73
|
+
[[package]]
|
|
74
|
+
name = "flowrs"
|
|
75
|
+
version = "1.0.0"
|
|
76
|
+
dependencies = [
|
|
77
|
+
"chrono",
|
|
78
|
+
"pyo3",
|
|
79
|
+
]
|
|
80
|
+
|
|
81
|
+
[[package]]
|
|
82
|
+
name = "iana-time-zone"
|
|
83
|
+
version = "0.1.61"
|
|
84
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
85
|
+
checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220"
|
|
86
|
+
dependencies = [
|
|
87
|
+
"android_system_properties",
|
|
88
|
+
"core-foundation-sys",
|
|
89
|
+
"iana-time-zone-haiku",
|
|
90
|
+
"js-sys",
|
|
91
|
+
"wasm-bindgen",
|
|
92
|
+
"windows-core",
|
|
93
|
+
]
|
|
94
|
+
|
|
95
|
+
[[package]]
|
|
96
|
+
name = "iana-time-zone-haiku"
|
|
97
|
+
version = "0.1.2"
|
|
98
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
99
|
+
checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
|
|
100
|
+
dependencies = [
|
|
101
|
+
"cc",
|
|
102
|
+
]
|
|
103
|
+
|
|
104
|
+
[[package]]
|
|
105
|
+
name = "indoc"
|
|
106
|
+
version = "1.0.9"
|
|
107
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
108
|
+
checksum = "bfa799dd5ed20a7e349f3b4639aa80d74549c81716d9ec4f994c9b5815598306"
|
|
109
|
+
|
|
110
|
+
[[package]]
|
|
111
|
+
name = "js-sys"
|
|
112
|
+
version = "0.3.77"
|
|
113
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
114
|
+
checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f"
|
|
115
|
+
dependencies = [
|
|
116
|
+
"once_cell",
|
|
117
|
+
"wasm-bindgen",
|
|
118
|
+
]
|
|
119
|
+
|
|
120
|
+
[[package]]
|
|
121
|
+
name = "libc"
|
|
122
|
+
version = "0.2.169"
|
|
123
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
124
|
+
checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a"
|
|
125
|
+
|
|
126
|
+
[[package]]
|
|
127
|
+
name = "lock_api"
|
|
128
|
+
version = "0.4.12"
|
|
129
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
130
|
+
checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17"
|
|
131
|
+
dependencies = [
|
|
132
|
+
"autocfg",
|
|
133
|
+
"scopeguard",
|
|
134
|
+
]
|
|
135
|
+
|
|
136
|
+
[[package]]
|
|
137
|
+
name = "log"
|
|
138
|
+
version = "0.4.25"
|
|
139
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
140
|
+
checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f"
|
|
141
|
+
|
|
142
|
+
[[package]]
|
|
143
|
+
name = "memoffset"
|
|
144
|
+
version = "0.8.0"
|
|
145
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
146
|
+
checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1"
|
|
147
|
+
dependencies = [
|
|
148
|
+
"autocfg",
|
|
149
|
+
]
|
|
150
|
+
|
|
151
|
+
[[package]]
|
|
152
|
+
name = "num-traits"
|
|
153
|
+
version = "0.2.19"
|
|
154
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
155
|
+
checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
|
|
156
|
+
dependencies = [
|
|
157
|
+
"autocfg",
|
|
158
|
+
]
|
|
159
|
+
|
|
160
|
+
[[package]]
|
|
161
|
+
name = "once_cell"
|
|
162
|
+
version = "1.20.2"
|
|
163
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
164
|
+
checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
|
|
165
|
+
|
|
166
|
+
[[package]]
|
|
167
|
+
name = "parking_lot"
|
|
168
|
+
version = "0.12.3"
|
|
169
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
170
|
+
checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27"
|
|
171
|
+
dependencies = [
|
|
172
|
+
"lock_api",
|
|
173
|
+
"parking_lot_core",
|
|
174
|
+
]
|
|
175
|
+
|
|
176
|
+
[[package]]
|
|
177
|
+
name = "parking_lot_core"
|
|
178
|
+
version = "0.9.10"
|
|
179
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
180
|
+
checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8"
|
|
181
|
+
dependencies = [
|
|
182
|
+
"cfg-if",
|
|
183
|
+
"libc",
|
|
184
|
+
"redox_syscall",
|
|
185
|
+
"smallvec",
|
|
186
|
+
"windows-targets",
|
|
187
|
+
]
|
|
188
|
+
|
|
189
|
+
[[package]]
|
|
190
|
+
name = "proc-macro2"
|
|
191
|
+
version = "1.0.93"
|
|
192
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
193
|
+
checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99"
|
|
194
|
+
dependencies = [
|
|
195
|
+
"unicode-ident",
|
|
196
|
+
]
|
|
197
|
+
|
|
198
|
+
[[package]]
|
|
199
|
+
name = "pyo3"
|
|
200
|
+
version = "0.18.3"
|
|
201
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
202
|
+
checksum = "e3b1ac5b3731ba34fdaa9785f8d74d17448cd18f30cf19e0c7e7b1fdb5272109"
|
|
203
|
+
dependencies = [
|
|
204
|
+
"cfg-if",
|
|
205
|
+
"indoc",
|
|
206
|
+
"libc",
|
|
207
|
+
"memoffset",
|
|
208
|
+
"parking_lot",
|
|
209
|
+
"pyo3-build-config",
|
|
210
|
+
"pyo3-ffi",
|
|
211
|
+
"pyo3-macros",
|
|
212
|
+
"unindent",
|
|
213
|
+
]
|
|
214
|
+
|
|
215
|
+
[[package]]
|
|
216
|
+
name = "pyo3-build-config"
|
|
217
|
+
version = "0.18.3"
|
|
218
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
219
|
+
checksum = "9cb946f5ac61bb61a5014924910d936ebd2b23b705f7a4a3c40b05c720b079a3"
|
|
220
|
+
dependencies = [
|
|
221
|
+
"once_cell",
|
|
222
|
+
"target-lexicon",
|
|
223
|
+
]
|
|
224
|
+
|
|
225
|
+
[[package]]
|
|
226
|
+
name = "pyo3-ffi"
|
|
227
|
+
version = "0.18.3"
|
|
228
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
229
|
+
checksum = "fd4d7c5337821916ea2a1d21d1092e8443cf34879e53a0ac653fbb98f44ff65c"
|
|
230
|
+
dependencies = [
|
|
231
|
+
"libc",
|
|
232
|
+
"pyo3-build-config",
|
|
233
|
+
]
|
|
234
|
+
|
|
235
|
+
[[package]]
|
|
236
|
+
name = "pyo3-macros"
|
|
237
|
+
version = "0.18.3"
|
|
238
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
239
|
+
checksum = "a9d39c55dab3fc5a4b25bbd1ac10a2da452c4aca13bb450f22818a002e29648d"
|
|
240
|
+
dependencies = [
|
|
241
|
+
"proc-macro2",
|
|
242
|
+
"pyo3-macros-backend",
|
|
243
|
+
"quote",
|
|
244
|
+
"syn 1.0.109",
|
|
245
|
+
]
|
|
246
|
+
|
|
247
|
+
[[package]]
|
|
248
|
+
name = "pyo3-macros-backend"
|
|
249
|
+
version = "0.18.3"
|
|
250
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
251
|
+
checksum = "97daff08a4c48320587b5224cc98d609e3c27b6d437315bd40b605c98eeb5918"
|
|
252
|
+
dependencies = [
|
|
253
|
+
"proc-macro2",
|
|
254
|
+
"quote",
|
|
255
|
+
"syn 1.0.109",
|
|
256
|
+
]
|
|
257
|
+
|
|
258
|
+
[[package]]
|
|
259
|
+
name = "quote"
|
|
260
|
+
version = "1.0.38"
|
|
261
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
262
|
+
checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc"
|
|
263
|
+
dependencies = [
|
|
264
|
+
"proc-macro2",
|
|
265
|
+
]
|
|
266
|
+
|
|
267
|
+
[[package]]
|
|
268
|
+
name = "redox_syscall"
|
|
269
|
+
version = "0.5.8"
|
|
270
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
271
|
+
checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834"
|
|
272
|
+
dependencies = [
|
|
273
|
+
"bitflags",
|
|
274
|
+
]
|
|
275
|
+
|
|
276
|
+
[[package]]
|
|
277
|
+
name = "rustversion"
|
|
278
|
+
version = "1.0.19"
|
|
279
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
280
|
+
checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4"
|
|
281
|
+
|
|
282
|
+
[[package]]
|
|
283
|
+
name = "scopeguard"
|
|
284
|
+
version = "1.2.0"
|
|
285
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
286
|
+
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
|
|
287
|
+
|
|
288
|
+
[[package]]
|
|
289
|
+
name = "shlex"
|
|
290
|
+
version = "1.3.0"
|
|
291
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
292
|
+
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
|
293
|
+
|
|
294
|
+
[[package]]
|
|
295
|
+
name = "smallvec"
|
|
296
|
+
version = "1.13.2"
|
|
297
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
298
|
+
checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
|
|
299
|
+
|
|
300
|
+
[[package]]
|
|
301
|
+
name = "syn"
|
|
302
|
+
version = "1.0.109"
|
|
303
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
304
|
+
checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
|
|
305
|
+
dependencies = [
|
|
306
|
+
"proc-macro2",
|
|
307
|
+
"quote",
|
|
308
|
+
"unicode-ident",
|
|
309
|
+
]
|
|
310
|
+
|
|
311
|
+
[[package]]
|
|
312
|
+
name = "syn"
|
|
313
|
+
version = "2.0.96"
|
|
314
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
315
|
+
checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80"
|
|
316
|
+
dependencies = [
|
|
317
|
+
"proc-macro2",
|
|
318
|
+
"quote",
|
|
319
|
+
"unicode-ident",
|
|
320
|
+
]
|
|
321
|
+
|
|
322
|
+
[[package]]
|
|
323
|
+
name = "target-lexicon"
|
|
324
|
+
version = "0.12.16"
|
|
325
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
326
|
+
checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
|
|
327
|
+
|
|
328
|
+
[[package]]
|
|
329
|
+
name = "unicode-ident"
|
|
330
|
+
version = "1.0.14"
|
|
331
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
332
|
+
checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"
|
|
333
|
+
|
|
334
|
+
[[package]]
|
|
335
|
+
name = "unindent"
|
|
336
|
+
version = "0.1.11"
|
|
337
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
338
|
+
checksum = "e1766d682d402817b5ac4490b3c3002d91dfa0d22812f341609f97b08757359c"
|
|
339
|
+
|
|
340
|
+
[[package]]
|
|
341
|
+
name = "wasm-bindgen"
|
|
342
|
+
version = "0.2.100"
|
|
343
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
344
|
+
checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5"
|
|
345
|
+
dependencies = [
|
|
346
|
+
"cfg-if",
|
|
347
|
+
"once_cell",
|
|
348
|
+
"rustversion",
|
|
349
|
+
"wasm-bindgen-macro",
|
|
350
|
+
]
|
|
351
|
+
|
|
352
|
+
[[package]]
|
|
353
|
+
name = "wasm-bindgen-backend"
|
|
354
|
+
version = "0.2.100"
|
|
355
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
356
|
+
checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6"
|
|
357
|
+
dependencies = [
|
|
358
|
+
"bumpalo",
|
|
359
|
+
"log",
|
|
360
|
+
"proc-macro2",
|
|
361
|
+
"quote",
|
|
362
|
+
"syn 2.0.96",
|
|
363
|
+
"wasm-bindgen-shared",
|
|
364
|
+
]
|
|
365
|
+
|
|
366
|
+
[[package]]
|
|
367
|
+
name = "wasm-bindgen-macro"
|
|
368
|
+
version = "0.2.100"
|
|
369
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
370
|
+
checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407"
|
|
371
|
+
dependencies = [
|
|
372
|
+
"quote",
|
|
373
|
+
"wasm-bindgen-macro-support",
|
|
374
|
+
]
|
|
375
|
+
|
|
376
|
+
[[package]]
|
|
377
|
+
name = "wasm-bindgen-macro-support"
|
|
378
|
+
version = "0.2.100"
|
|
379
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
380
|
+
checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de"
|
|
381
|
+
dependencies = [
|
|
382
|
+
"proc-macro2",
|
|
383
|
+
"quote",
|
|
384
|
+
"syn 2.0.96",
|
|
385
|
+
"wasm-bindgen-backend",
|
|
386
|
+
"wasm-bindgen-shared",
|
|
387
|
+
]
|
|
388
|
+
|
|
389
|
+
[[package]]
|
|
390
|
+
name = "wasm-bindgen-shared"
|
|
391
|
+
version = "0.2.100"
|
|
392
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
393
|
+
checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d"
|
|
394
|
+
dependencies = [
|
|
395
|
+
"unicode-ident",
|
|
396
|
+
]
|
|
397
|
+
|
|
398
|
+
[[package]]
|
|
399
|
+
name = "windows-core"
|
|
400
|
+
version = "0.52.0"
|
|
401
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
402
|
+
checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
|
|
403
|
+
dependencies = [
|
|
404
|
+
"windows-targets",
|
|
405
|
+
]
|
|
406
|
+
|
|
407
|
+
[[package]]
|
|
408
|
+
name = "windows-targets"
|
|
409
|
+
version = "0.52.6"
|
|
410
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
411
|
+
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
|
|
412
|
+
dependencies = [
|
|
413
|
+
"windows_aarch64_gnullvm",
|
|
414
|
+
"windows_aarch64_msvc",
|
|
415
|
+
"windows_i686_gnu",
|
|
416
|
+
"windows_i686_gnullvm",
|
|
417
|
+
"windows_i686_msvc",
|
|
418
|
+
"windows_x86_64_gnu",
|
|
419
|
+
"windows_x86_64_gnullvm",
|
|
420
|
+
"windows_x86_64_msvc",
|
|
421
|
+
]
|
|
422
|
+
|
|
423
|
+
[[package]]
|
|
424
|
+
name = "windows_aarch64_gnullvm"
|
|
425
|
+
version = "0.52.6"
|
|
426
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
427
|
+
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
|
|
428
|
+
|
|
429
|
+
[[package]]
|
|
430
|
+
name = "windows_aarch64_msvc"
|
|
431
|
+
version = "0.52.6"
|
|
432
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
433
|
+
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
|
|
434
|
+
|
|
435
|
+
[[package]]
|
|
436
|
+
name = "windows_i686_gnu"
|
|
437
|
+
version = "0.52.6"
|
|
438
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
439
|
+
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
|
|
440
|
+
|
|
441
|
+
[[package]]
|
|
442
|
+
name = "windows_i686_gnullvm"
|
|
443
|
+
version = "0.52.6"
|
|
444
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
445
|
+
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
|
|
446
|
+
|
|
447
|
+
[[package]]
|
|
448
|
+
name = "windows_i686_msvc"
|
|
449
|
+
version = "0.52.6"
|
|
450
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
451
|
+
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
|
|
452
|
+
|
|
453
|
+
[[package]]
|
|
454
|
+
name = "windows_x86_64_gnu"
|
|
455
|
+
version = "0.52.6"
|
|
456
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
457
|
+
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
|
|
458
|
+
|
|
459
|
+
[[package]]
|
|
460
|
+
name = "windows_x86_64_gnullvm"
|
|
461
|
+
version = "0.52.6"
|
|
462
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
463
|
+
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
|
|
464
|
+
|
|
465
|
+
[[package]]
|
|
466
|
+
name = "windows_x86_64_msvc"
|
|
467
|
+
version = "0.52.6"
|
|
468
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
469
|
+
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
|
flowrs-1.0.0/Cargo.toml
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
[package]
|
|
2
|
+
name = "flowrs"
|
|
3
|
+
version = "1.0.0"
|
|
4
|
+
edition = "2021"
|
|
5
|
+
|
|
6
|
+
description = "A Python module for task orchestration and automation, implemented in Rust."
|
|
7
|
+
license = "MIT"
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
[dependencies]
|
|
11
|
+
pyo3 = { version = "0.18", features = ["extension-module"] }
|
|
12
|
+
chrono = "0.4"
|
|
13
|
+
|
|
14
|
+
[lib]
|
|
15
|
+
crate-type = ["cdylib"] # Required for Python extensions
|
|
16
|
+
|
|
17
|
+
[package.metadata.maturin]
|
|
18
|
+
bindings = "pyo3"
|
flowrs-1.0.0/PKG-INFO
ADDED
flowrs-1.0.0/flowrs.pyi
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
from collections.abc import Callable
|
|
2
|
+
|
|
3
|
+
class Workflow:
|
|
4
|
+
"""
|
|
5
|
+
Class representing a Workflow.
|
|
6
|
+
"""
|
|
7
|
+
name:str
|
|
8
|
+
|
|
9
|
+
def __init__(self, name: str) -> 'Workflow': ...
|
|
10
|
+
|
|
11
|
+
def add_task(self, name: str, fn: Callable) -> None:
|
|
12
|
+
"""
|
|
13
|
+
Adds a task to the Workflow.
|
|
14
|
+
"""
|
|
15
|
+
...
|
|
16
|
+
|
|
17
|
+
def run(self) -> None:
|
|
18
|
+
"""
|
|
19
|
+
Runs the Workflow.
|
|
20
|
+
"""
|
|
21
|
+
...
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
use pyo3::{prelude::*, py_run};
|
|
2
|
+
use crate::Workflow;
|
|
3
|
+
|
|
4
|
+
#[pymodule]
|
|
5
|
+
fn functions(_py: Python, m: &PyModule) -> PyResult<()> {
|
|
6
|
+
m.add_function(wrap_pyfunction!(create_workflow, m)?)?;
|
|
7
|
+
Ok(())
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
pub fn make_module(py: Python) -> PyResult<&PyModule> {
|
|
11
|
+
let sub = PyModule::new(py, "functions")?;
|
|
12
|
+
|
|
13
|
+
py_run!(py, sub, "import sys; sys.modules['flowrs.functions'] = sub");
|
|
14
|
+
|
|
15
|
+
functions(py, sub)?;
|
|
16
|
+
Ok(sub)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* --------------------- Module Implementation --------------------- */
|
|
20
|
+
|
|
21
|
+
#[pyfunction]
|
|
22
|
+
fn create_workflow(name: String) -> PyResult<Workflow> {
|
|
23
|
+
Ok(Workflow::new(name)?)
|
|
24
|
+
}
|
flowrs-1.0.0/src/lib.rs
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
use pyo3::prelude::*;
|
|
2
|
+
use pyo3::types::PyFunction;
|
|
3
|
+
use chrono::Local;
|
|
4
|
+
|
|
5
|
+
mod functions;
|
|
6
|
+
|
|
7
|
+
#[pymodule]
|
|
8
|
+
fn flowrs(py: Python, m: &PyModule) -> PyResult<()> {
|
|
9
|
+
m.add_class::<Workflow>()?;
|
|
10
|
+
|
|
11
|
+
m.add_submodule(functions::make_module(py)?)?;
|
|
12
|
+
|
|
13
|
+
Ok(())
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* --------------------- Module Implementation --------------------- */
|
|
17
|
+
|
|
18
|
+
#[pyclass]
|
|
19
|
+
pub struct Workflow {
|
|
20
|
+
#[pyo3(get)]
|
|
21
|
+
name: String,
|
|
22
|
+
|
|
23
|
+
tasks: Vec<(String, Py<PyFunction>)>,
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
#[pymethods]
|
|
27
|
+
impl Workflow {
|
|
28
|
+
#[new]
|
|
29
|
+
pub fn new(name: String) -> PyResult<Self> {
|
|
30
|
+
Ok(Workflow { name, tasks: Vec::new() })
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
pub fn add_task(&mut self, name: String, py_func: Py<PyFunction>) {
|
|
34
|
+
self.tasks.push((name, py_func));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
pub fn run(&self, py: Python) -> PyResult<()> {
|
|
38
|
+
let timestamp = Local::now().format("%Y-%m-%d %H:%M:%S").to_string();
|
|
39
|
+
println!("[{}] Starting Workflow: {}", timestamp, self.name);
|
|
40
|
+
|
|
41
|
+
for (name, py_func) in &self.tasks {
|
|
42
|
+
let timestamp = Local::now().format("%Y-%m-%d %H:%M:%S").to_string();
|
|
43
|
+
println!("[{}] - Running task: {}", timestamp, name);
|
|
44
|
+
|
|
45
|
+
let func = py_func.as_ref(py);
|
|
46
|
+
func.call0()?;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
let timestamp = Local::now().format("%Y-%m-%d %H:%M:%S").to_string();
|
|
50
|
+
println!("[{}] Finished Workflow: {}", timestamp, self.name);
|
|
51
|
+
Ok(())
|
|
52
|
+
}
|
|
53
|
+
}
|