openfund-core 0.0.2__py3-none-any.whl

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 (35) hide show
  1. openfund/core/__init__.py +0 -0
  2. openfund/core/binance_tools/__init__.py +16 -0
  3. openfund/core/binance_tools/binance_tools.py +39 -0
  4. openfund/core/binance_tools/continuous_klines.py +147 -0
  5. openfund/core/factory.py +37 -0
  6. openfund/core/libs/__init__.py +6 -0
  7. openfund/core/libs/email_tools.py +56 -0
  8. openfund/core/libs/enums.py +507 -0
  9. openfund/core/libs/file_tools.py +13 -0
  10. openfund/core/libs/log_tools.py +45 -0
  11. openfund/core/libs/prepare_env.py +28 -0
  12. openfund/core/libs/time.py +14 -0
  13. openfund/core/libs/time_tools.py +22 -0
  14. openfund/core/openfund_old/__init__.py +0 -0
  15. openfund/core/openfund_old/continuous_klines.py +153 -0
  16. openfund/core/openfund_old/depth.py +92 -0
  17. openfund/core/openfund_old/historical_trades.py +123 -0
  18. openfund/core/openfund_old/index_info.py +67 -0
  19. openfund/core/openfund_old/index_price_kline.py +118 -0
  20. openfund/core/openfund_old/klines.py +95 -0
  21. openfund/core/openfund_old/klines_qrr.py +103 -0
  22. openfund/core/openfund_old/mark_price.py +121 -0
  23. openfund/core/openfund_old/mark_price_klines.py +122 -0
  24. openfund/core/openfund_old/ticker_24hr_price_change.py +99 -0
  25. openfund/core/pyopenfund.py +32 -0
  26. openfund/core/sample/__init__.py +1 -0
  27. openfund/core/sample/sample.py +20 -0
  28. openfund/core/sycu_exam/__init__.py +1 -0
  29. openfund/core/sycu_exam/exam.py +19 -0
  30. openfund/core/sycu_exam/random_grade_cplus.py +440 -0
  31. openfund/core/sycu_exam/random_grade_web.py +404 -0
  32. openfund_core-0.0.2.dist-info/LICENSE +201 -0
  33. openfund_core-0.0.2.dist-info/METADATA +66 -0
  34. openfund_core-0.0.2.dist-info/RECORD +35 -0
  35. openfund_core-0.0.2.dist-info/WHEEL +4 -0
@@ -0,0 +1,404 @@
1
+ #!/usr/bin/env python
2
+ import csv
3
+ import time
4
+ import os
5
+ import sys
6
+ import random
7
+
8
+ curPath = os.path.abspath(os.path.dirname(__file__))
9
+ rootPath = os.path.split(curPath)[0]
10
+ sys.path.append(rootPath)
11
+
12
+ from datetime import datetime
13
+ from libs.time_tools import format_timestamp, format_date, format_date_to
14
+ from libs.file_tools import create_path
15
+ from libs.prepare_env import get_path
16
+ from libs.log_tools import Logger
17
+
18
+ data_path, log_path = get_path()
19
+
20
+ app = "random_grade"
21
+ logger = Logger(app).get_log()
22
+ c_name = "stu_23sk-1"
23
+
24
+ sx_times = 0
25
+ xz_times = 1
26
+
27
+
28
+ def jieke_fun(row):
29
+ jieke = 0
30
+ cent1_1 = 5
31
+ cent1_2 = 5
32
+ if row[2] in ["A"]:
33
+ cent2_1 = cent(8, 9)
34
+ cent2_2 = cent(8, 9)
35
+ cent2_3 = cent(8, 9)
36
+ cent2_4 = 5
37
+ cent2_5 = 5
38
+
39
+ cent3_1 = 5
40
+ cent3_2 = 5
41
+ cent3_3 = 5
42
+ cent3_4 = cent(3, 4)
43
+
44
+ cent4_1 = cent(8, 9)
45
+ cent5_1 = cent(8, 9)
46
+ cent6_1 = 5
47
+ cent6_2 = 5
48
+ elif row[2] in ["B+"]:
49
+ cent2_1 = cent(7, 8)
50
+ cent2_2 = cent(7, 8)
51
+ cent2_3 = cent(7, 8)
52
+ cent2_4 = 4
53
+ cent2_5 = 4
54
+
55
+ cent3_1 = 5
56
+ cent3_2 = 5
57
+ cent3_3 = 5
58
+ cent3_4 = cent(3, 4)
59
+
60
+ cent4_1 = cent(8, 9)
61
+ cent5_1 = cent(8, 9)
62
+ cent6_1 = 5
63
+ cent6_2 = 5
64
+ elif row[2] in ["B"]:
65
+ cent2_1 = cent(6, 7)
66
+ cent2_2 = cent(6, 7)
67
+ cent2_3 = cent(6, 7)
68
+ cent2_4 = 5
69
+ cent2_5 = 5
70
+
71
+ cent3_1 = 4
72
+ cent3_2 = 4
73
+ cent3_3 = 5
74
+ cent3_4 = cent(3, 4)
75
+
76
+ cent4_1 = cent(6, 7)
77
+ cent5_1 = cent(6, 7)
78
+ cent6_1 = 5
79
+ cent6_2 = 5
80
+ elif row[2] in ["C+"]:
81
+ cent2_1 = cent(6, 7)
82
+ cent2_2 = cent(6, 7)
83
+ cent2_3 = cent(6, 7)
84
+ cent2_4 = 4
85
+ cent2_5 = 4
86
+
87
+ cent3_1 = 4
88
+ cent3_2 = 4
89
+ cent3_3 = 4
90
+ cent3_4 = cent(2, 3)
91
+
92
+ cent4_1 = cent(6, 7)
93
+ cent5_1 = cent(6, 7)
94
+ cent6_1 = 4
95
+ cent6_2 = 4
96
+ elif row[2] in ["C"]:
97
+ cent2_1 = cent(6, 7)
98
+ cent2_2 = cent(6, 7)
99
+ cent2_3 = cent(6, 7)
100
+ cent2_4 = 3
101
+ cent2_5 = 3
102
+
103
+ cent3_1 = 3
104
+ cent3_2 = 3
105
+ cent3_3 = 3
106
+ cent3_4 = cent(2, 3)
107
+
108
+ cent4_1 = cent(6, 7)
109
+ cent5_1 = cent(6, 7)
110
+ cent6_1 = 3
111
+ cent6_2 = 3
112
+ else:
113
+ cent2_1 = cent(6, 7)
114
+ cent2_2 = cent(6, 7)
115
+ cent2_3 = cent(6, 7)
116
+ cent2_4 = 3
117
+ cent2_5 = 3
118
+
119
+ cent3_1 = 3
120
+ cent3_2 = 3
121
+ cent3_3 = 3
122
+ cent3_4 = cent(2, 3)
123
+
124
+ cent4_1 = cent(5, 6)
125
+ cent5_1 = cent(5, 6)
126
+ cent6_1 = 3
127
+ cent6_2 = 3
128
+
129
+ jieke = (
130
+ cent1_1
131
+ + cent1_2
132
+ + cent2_1
133
+ + cent2_2
134
+ + cent2_3
135
+ + cent2_4
136
+ + cent2_5
137
+ + cent3_1
138
+ + cent3_2
139
+ + cent3_3
140
+ + cent3_4
141
+ + cent4_1
142
+ + cent5_1
143
+ + cent6_1
144
+ + cent6_2
145
+ )
146
+
147
+ cents = []
148
+ cents.append(row[0])
149
+ cents.append(row[1])
150
+ cents.append(row[2])
151
+ cents.append(row[3])
152
+ cents.append(jieke)
153
+ cents.append(cent1_1)
154
+ cents.append(cent1_2)
155
+ cents.append(cent2_1)
156
+ cents.append(cent2_2)
157
+ cents.append(cent2_3)
158
+ cents.append(cent2_4)
159
+ cents.append(cent2_5)
160
+ cents.append(cent3_1)
161
+ cents.append(cent3_2)
162
+ cents.append(cent3_3)
163
+ cents.append(cent3_4)
164
+ cents.append(cent4_1)
165
+ cents.append(cent5_1)
166
+ cents.append(cent6_1)
167
+ cents.append(cent6_2)
168
+
169
+ print(cents)
170
+ return cents
171
+
172
+
173
+ def xiaozu_fun(row):
174
+ # 程序代码编写及附加信息(55分)
175
+ xiaozu = 0
176
+ cent1_1 = 10
177
+ cent1_2 = 10
178
+ cent3_1 = 5
179
+ cent3_2 = 5
180
+ cent4_1 = 5
181
+ cent6_1 = 5
182
+ cent6_2 = 5
183
+ # 小组给分
184
+ if row[3] in ["A"]:
185
+ cent1_3 = 16
186
+ cent2_1 = 17
187
+ elif row[3] in ["B"]:
188
+ cent1_3 = 13
189
+ cent2_1 = 13
190
+ else:
191
+ cent1_3 = 10
192
+ cent2_1 = 10
193
+
194
+ if row[2] in ["A"]:
195
+ cent5_1 = cent(13, 15)
196
+
197
+ elif row[2] in ["B+"]:
198
+ cent5_1 = cent(11, 12)
199
+ elif row[2] in ["B"]:
200
+ cent5_1 = cent(9, 10)
201
+ elif row[2] in ["C+"]:
202
+ cent5_1 = cent(8, 9)
203
+ elif row[2] in ["C"]:
204
+ cent5_1 = cent(6, 8)
205
+ else:
206
+ cent5_1 = cent(5, 6)
207
+
208
+ xiaozu = (
209
+ cent1_1
210
+ + cent1_2
211
+ + cent1_3
212
+ + cent2_1
213
+ + cent3_1
214
+ + cent3_2
215
+ + cent4_1
216
+ + cent5_1
217
+ + cent6_1
218
+ + cent6_2
219
+ )
220
+ cents = []
221
+ cents.append(row[0])
222
+ cents.append(row[1])
223
+ cents.append(row[2])
224
+ cents.append(row[3])
225
+ cents.append(xiaozu)
226
+ cents.append(cent1_1)
227
+ cents.append(cent1_2)
228
+ cents.append(cent1_3)
229
+ cents.append(cent2_1)
230
+ cents.append(cent3_1)
231
+ cents.append(cent4_1)
232
+ cents.append(cent5_1)
233
+ cents.append(cent6_1)
234
+ cents.append(cent6_2)
235
+
236
+ return cents
237
+
238
+
239
+ def shixu_fun(row):
240
+ shixun = 0
241
+ cent1_1 = 5
242
+ cent1_2 = 5
243
+ if row[2] in ["A"]:
244
+ cent2_1 = 5
245
+ cent2_2 = 5
246
+ cent2_3 = 10
247
+ cent2_4 = 10
248
+ cent2_5 = 10
249
+ cent2_6 = cent(10, 12)
250
+ cent3_1 = 10
251
+ cent4_1 = cent(10, 11)
252
+ cent5_1 = cent(8, 9)
253
+ elif row[2] in ["B+"]:
254
+ cent2_1 = 5
255
+ cent2_2 = 5
256
+ cent2_3 = 10
257
+ cent2_4 = 10
258
+ cent2_5 = 10
259
+ cent2_6 = cent(8, 10)
260
+ cent3_1 = 10
261
+ cent4_1 = cent(8, 9)
262
+ cent5_1 = cent(6, 7)
263
+ elif row[2] in ["B"]:
264
+ cent2_1 = 5
265
+ cent2_2 = 5
266
+ cent2_3 = 10
267
+ cent2_4 = 10
268
+ cent2_5 = cent(6, 8)
269
+ cent2_6 = cent(9, 13)
270
+ cent3_1 = cent(6, 8)
271
+ cent4_1 = cent(7, 8)
272
+ cent5_1 = cent(5, 7)
273
+ elif row[2] in ["C+"]:
274
+ cent2_1 = 5
275
+ cent2_2 = 5
276
+ cent2_3 = 10
277
+ cent2_4 = cent(6, 8)
278
+ cent2_5 = cent(6, 8)
279
+ cent2_6 = cent(8, 12)
280
+ cent3_1 = cent(6, 8)
281
+ cent4_1 = cent(4, 6)
282
+ cent5_1 = cent(5, 7)
283
+ elif row[2] in ["C"]:
284
+ cent2_1 = 5
285
+ cent2_2 = 5
286
+ cent2_3 = cent(7, 9)
287
+ cent2_4 = cent(6, 8)
288
+ cent2_5 = cent(6, 8)
289
+ cent2_6 = cent(8, 10)
290
+ cent3_1 = cent(6, 8)
291
+ cent4_1 = cent(4, 6)
292
+ cent5_1 = cent(5, 7)
293
+ else:
294
+ cent2_1 = 5
295
+ cent2_2 = 5
296
+ cent2_3 = cent(7, 9)
297
+ cent2_4 = cent(6, 8)
298
+ cent2_5 = cent(4, 5)
299
+ cent2_6 = cent(4, 6)
300
+ cent3_1 = cent(4, 5)
301
+ cent4_1 = cent(4, 6)
302
+ cent5_1 = cent(5, 7)
303
+
304
+ shixun = (
305
+ cent1_1
306
+ + cent1_2
307
+ + cent2_1
308
+ + cent2_2
309
+ + cent2_3
310
+ + cent2_4
311
+ + cent2_5
312
+ + cent2_6
313
+ + cent3_1
314
+ + cent4_1
315
+ + cent5_1
316
+ )
317
+ cents = []
318
+ cents.append(row[0])
319
+ cents.append(row[1])
320
+ cents.append(row[2])
321
+ cents.append(row[3])
322
+ cents.append(shixun)
323
+ cents.append(cent1_1)
324
+ cents.append(cent1_2)
325
+ cents.append(cent2_1)
326
+ cents.append(cent2_2)
327
+ cents.append(cent2_3)
328
+ cents.append(cent2_4)
329
+ cents.append(cent2_5)
330
+ cents.append(cent2_6)
331
+ cents.append(cent3_1)
332
+ cents.append(cent4_1)
333
+ cents.append(cent5_1)
334
+ # print(
335
+ # row[1],
336
+ # row[2],
337
+ # shixun,
338
+ # cent1_1,
339
+ # cent1_2,
340
+ # cent2_1,
341
+ # cent2_2,
342
+ # cent2_3,
343
+ # cent2_4,
344
+ # cent2_5,
345
+ # cent2_6,
346
+ # cent3_1,
347
+ # cent4_1,
348
+ # cent5_1,
349
+ # sep=",",
350
+ # )
351
+
352
+ return cents
353
+
354
+
355
+ def cent(low, high):
356
+ cent = random.randint(low, high)
357
+ return cent
358
+
359
+
360
+ def do():
361
+ rows = []
362
+ with open(
363
+ "{0}/../grade/{1}.csv".format(data_path, c_name),
364
+ "r",
365
+ encoding="utf-8-sig",
366
+ newline="",
367
+ ) as file:
368
+ reader = csv.reader(file)
369
+ rows = [row for row in reader]
370
+
371
+ cents = []
372
+ for i in range(len(rows)):
373
+ line = []
374
+ for j1 in range(sx_times):
375
+ shixun_cents = shixu_fun(rows[i])
376
+ line.extend(shixun_cents)
377
+
378
+ for j2 in range(xz_times):
379
+ xiaozu_cents = xiaozu_fun(rows[i])
380
+ line.extend(xiaozu_cents)
381
+
382
+ jieke_cents = jieke_fun(rows[i])
383
+ line.extend(jieke_cents)
384
+ cents.append(line)
385
+
386
+ with open(
387
+ "{0}/../grade/{3}_{1}_{2}.csv".format(
388
+ data_path,
389
+ "gd",
390
+ c_name,
391
+ format_timestamp(datetime.now().timestamp() * 1000),
392
+ ),
393
+ "a",
394
+ encoding="utf-8-sig",
395
+ newline="",
396
+ ) as file:
397
+ writer = csv.writer(file)
398
+ for row in cents:
399
+ writer.writerow(row)
400
+
401
+
402
+ if __name__ == "__main__":
403
+ logger.info("random_grade Starting ...... ")
404
+ do()
@@ -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.
@@ -0,0 +1,66 @@
1
+ Metadata-Version: 2.1
2
+ Name: openfund-core
3
+ Version: 0.0.2
4
+ Summary:
5
+ Author: yang99love
6
+ Author-email: yang99love@hotmail.com
7
+ Requires-Python: >=3.8,<4.0
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3.8
10
+ Classifier: Programming Language :: Python :: 3.9
11
+ Classifier: Programming Language :: Python :: 3.10
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Requires-Dist: binance-connector (>=3.9.0,<4.0.0)
16
+ Requires-Dist: binance-futures-connector (>=4.1.0,<5.0.0)
17
+ Requires-Dist: httpretty (>=1.1.4,<2.0.0)
18
+ Requires-Dist: poetry (>=1.8.4,<2.0.0)
19
+ Description-Content-Type: text/markdown
20
+
21
+ # Openfund Core
22
+ [![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)
23
+ [![PyPI version](https://img.shields.io/pypi/v/poetry-core)](https://pypi.org/project/poetry-core/)
24
+ [![Python Versions](https://img.shields.io/pypi/pyversions/poetry-core)](https://pypi.org/project/poetry-core/)
25
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
26
+ [![](https://github.com/python-poetry/poetry-core/workflows/Tests/badge.svg)](https://github.com/python-poetry/poetry-core/actions?query=workflow%3ATests)
27
+
28
+ A [PEP 517](https://www.python.org/dev/peps/pep-0517/) build backend implementation developed for
29
+ [Poetry](https://github.com/python-poetry/poetry). This project is intended to be a lightweight, fully compliant,
30
+ self-contained package allowing PEP 517-compatible build frontends to build Poetry-managed projects.
31
+
32
+ ## Usage
33
+ In most cases, the usage of this package is transparent to the end-user as it is either used by Poetry itself
34
+ or a PEP 517 frontend (eg: `pip`).
35
+
36
+ In order to enable the use of `openfund-core` as your build backend, the following snippet must be present in your
37
+ project's `pyproject.toml` file.
38
+
39
+ ```toml
40
+ [build-system]
41
+ requires = ["poetry-core"]
42
+ build-backend = "poetry.core.masonry.api"
43
+ ```
44
+
45
+ Once this is present, a PEP 517 frontend like `pip` can build and install your project from source without the need
46
+ for Poetry or any of its dependencies (besides `openfund-core`).
47
+
48
+ ```shell
49
+ # install to current environment
50
+ pip install /path/to/poetry/managed/project
51
+
52
+ # build a wheel package
53
+ pip wheel /path/to/poetry/managed/project
54
+ ```
55
+
56
+ ## Why is this required?
57
+ Prior to the release of version `1.1.0`, Poetry was a project management tool that included a PEP 517
58
+ build backend. This was inefficient and time consuming when a PEP 517 build was required. For example,
59
+ both `pip` and `tox` (with isolated builds) would install Poetry and all dependencies it required. Most of these
60
+ dependencies are not required when the objective is to simply build either a source or binary distribution of your
61
+ project.
62
+
63
+ In order to improve the above situation, `openfund-core` was created. Shared functionality pertaining to PEP 517 build
64
+ backends, including reading `pyproject.toml` and building wheel/sdist, were implemented in this package. This
65
+ makes PEP 517 builds extremely fast for Poetry-managed packages.
66
+