fqdb 0.1.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.
Files changed (176) hide show
  1. fqdb-0.1.0/LICENSE +201 -0
  2. fqdb-0.1.0/MANIFEST.in +9 -0
  3. fqdb-0.1.0/PKG-INFO +85 -0
  4. fqdb-0.1.0/README.md +57 -0
  5. fqdb-0.1.0/docs/ARCHITECTURE.md +32 -0
  6. fqdb-0.1.0/docs/DASHBOARD.md +63 -0
  7. fqdb-0.1.0/docs/MARKET_DATA.md +37 -0
  8. fqdb-0.1.0/docs/PYTHON_SUPPORT.md +22 -0
  9. fqdb-0.1.0/examples/synthetic_local.py +74 -0
  10. fqdb-0.1.0/pyproject.toml +47 -0
  11. fqdb-0.1.0/scripts/build_libtorrent.py +326 -0
  12. fqdb-0.1.0/scripts/check_python_install.py +312 -0
  13. fqdb-0.1.0/setup.cfg +4 -0
  14. fqdb-0.1.0/src/_fqdb_cli.py +12 -0
  15. fqdb-0.1.0/src/fqdb/__init__.py +79 -0
  16. fqdb-0.1.0/src/fqdb/__main__.py +3 -0
  17. fqdb-0.1.0/src/fqdb/adapters/__init__.py +5 -0
  18. fqdb-0.1.0/src/fqdb/adapters/base.py +65 -0
  19. fqdb-0.1.0/src/fqdb/adapters/local.py +89 -0
  20. fqdb-0.1.0/src/fqdb/api.py +116 -0
  21. fqdb-0.1.0/src/fqdb/bt/__init__.py +0 -0
  22. fqdb-0.1.0/src/fqdb/bt/engine.py +268 -0
  23. fqdb-0.1.0/src/fqdb/bt/priority.py +252 -0
  24. fqdb-0.1.0/src/fqdb/bt/torrents.py +204 -0
  25. fqdb-0.1.0/src/fqdb/catalog/__init__.py +74 -0
  26. fqdb-0.1.0/src/fqdb/catalog/index.py +21 -0
  27. fqdb-0.1.0/src/fqdb/catalog/magnet.py +345 -0
  28. fqdb-0.1.0/src/fqdb/catalog/magnet_manifest.py +177 -0
  29. fqdb-0.1.0/src/fqdb/catalog/models.py +231 -0
  30. fqdb-0.1.0/src/fqdb/catalog/remote.py +97 -0
  31. fqdb-0.1.0/src/fqdb/catalog/verification.py +159 -0
  32. fqdb-0.1.0/src/fqdb/cli/__init__.py +5 -0
  33. fqdb-0.1.0/src/fqdb/cli/application.py +78 -0
  34. fqdb-0.1.0/src/fqdb/cli/catalogs.py +132 -0
  35. fqdb-0.1.0/src/fqdb/cli/local.py +109 -0
  36. fqdb-0.1.0/src/fqdb/cli/sharing.py +105 -0
  37. fqdb-0.1.0/src/fqdb/cli/transfers.py +103 -0
  38. fqdb-0.1.0/src/fqdb/config.py +298 -0
  39. fqdb-0.1.0/src/fqdb/demo.py +96 -0
  40. fqdb-0.1.0/src/fqdb/jobs.py +32 -0
  41. fqdb-0.1.0/src/fqdb/layout.py +60 -0
  42. fqdb-0.1.0/src/fqdb/peers.py +19 -0
  43. fqdb-0.1.0/src/fqdb/planning/__init__.py +0 -0
  44. fqdb-0.1.0/src/fqdb/planning/planner.py +116 -0
  45. fqdb-0.1.0/src/fqdb/provider.py +130 -0
  46. fqdb-0.1.0/src/fqdb/publish/__init__.py +0 -0
  47. fqdb-0.1.0/src/fqdb/publish/catalog.py +151 -0
  48. fqdb-0.1.0/src/fqdb/publish/coverage.py +46 -0
  49. fqdb-0.1.0/src/fqdb/publish/input.py +130 -0
  50. fqdb-0.1.0/src/fqdb/publish/migrate.py +40 -0
  51. fqdb-0.1.0/src/fqdb/publish/partitions.py +49 -0
  52. fqdb-0.1.0/src/fqdb/publish/paths.py +82 -0
  53. fqdb-0.1.0/src/fqdb/publish/publisher.py +299 -0
  54. fqdb-0.1.0/src/fqdb/publish/spool.py +157 -0
  55. fqdb-0.1.0/src/fqdb/query.py +131 -0
  56. fqdb-0.1.0/src/fqdb/root_safety.py +86 -0
  57. fqdb-0.1.0/src/fqdb/schema/__init__.py +13 -0
  58. fqdb-0.1.0/src/fqdb/schema/assets.py +112 -0
  59. fqdb-0.1.0/src/fqdb/schema/base.py +108 -0
  60. fqdb-0.1.0/src/fqdb/schema/digest.py +30 -0
  61. fqdb-0.1.0/src/fqdb/schema/market.py +54 -0
  62. fqdb-0.1.0/src/fqdb/schema/registry.py +37 -0
  63. fqdb-0.1.0/src/fqdb/schema/trading_days.py +54 -0
  64. fqdb-0.1.0/src/fqdb/service/__init__.py +0 -0
  65. fqdb-0.1.0/src/fqdb/service/actions.py +92 -0
  66. fqdb-0.1.0/src/fqdb/service/adapters.py +145 -0
  67. fqdb-0.1.0/src/fqdb/service/catalogs.py +430 -0
  68. fqdb-0.1.0/src/fqdb/service/checks.py +166 -0
  69. fqdb-0.1.0/src/fqdb/service/client.py +301 -0
  70. fqdb-0.1.0/src/fqdb/service/core.py +293 -0
  71. fqdb-0.1.0/src/fqdb/service/daemon.py +178 -0
  72. fqdb-0.1.0/src/fqdb/service/jobs.py +134 -0
  73. fqdb-0.1.0/src/fqdb/service/lifetime.py +89 -0
  74. fqdb-0.1.0/src/fqdb/service/peers.py +173 -0
  75. fqdb-0.1.0/src/fqdb/service/provision.py +188 -0
  76. fqdb-0.1.0/src/fqdb/service/seeding.py +444 -0
  77. fqdb-0.1.0/src/fqdb/service/subscriptions.py +251 -0
  78. fqdb-0.1.0/src/fqdb/service/transfers.py +329 -0
  79. fqdb-0.1.0/src/fqdb/sources.py +44 -0
  80. fqdb-0.1.0/src/fqdb/startup.py +85 -0
  81. fqdb-0.1.0/src/fqdb/storage/__init__.py +0 -0
  82. fqdb-0.1.0/src/fqdb/storage/market.py +325 -0
  83. fqdb-0.1.0/src/fqdb/storage/metadata.py +633 -0
  84. fqdb-0.1.0/src/fqdb/storage/query.py +45 -0
  85. fqdb-0.1.0/src/fqdb/util.py +99 -0
  86. fqdb-0.1.0/src/fqdb/validation/__init__.py +0 -0
  87. fqdb-0.1.0/src/fqdb/validation/coverage.py +125 -0
  88. fqdb-0.1.0/src/fqdb/validation/files.py +198 -0
  89. fqdb-0.1.0/src/fqdb/validation/quality.py +190 -0
  90. fqdb-0.1.0/src/fqdb/web/__init__.py +51 -0
  91. fqdb-0.1.0/src/fqdb/web/app.py +179 -0
  92. fqdb-0.1.0/src/fqdb/web/dashboard/__init__.py +36 -0
  93. fqdb-0.1.0/src/fqdb/web/dashboard/catalog.py +252 -0
  94. fqdb-0.1.0/src/fqdb/web/dashboard/operations.py +131 -0
  95. fqdb-0.1.0/src/fqdb/web/dashboard/rows.py +27 -0
  96. fqdb-0.1.0/src/fqdb/web/static/app.js +450 -0
  97. fqdb-0.1.0/src/fqdb/web/static/catalog.css +273 -0
  98. fqdb-0.1.0/src/fqdb/web/static/components/catalog-refresh.js +42 -0
  99. fqdb-0.1.0/src/fqdb/web/static/components/datasets.js +21 -0
  100. fqdb-0.1.0/src/fqdb/web/static/components/jobs.js +12 -0
  101. fqdb-0.1.0/src/fqdb/web/static/components/packages.js +161 -0
  102. fqdb-0.1.0/src/fqdb/web/static/components/scope.js +33 -0
  103. fqdb-0.1.0/src/fqdb/web/static/components/subscriptions.js +224 -0
  104. fqdb-0.1.0/src/fqdb/web/static/components/transfer-settings.js +205 -0
  105. fqdb-0.1.0/src/fqdb/web/static/index.html +92 -0
  106. fqdb-0.1.0/src/fqdb/web/static/operations.css +183 -0
  107. fqdb-0.1.0/src/fqdb/web/static/overview.css +171 -0
  108. fqdb-0.1.0/src/fqdb/web/static/pages/audit.js +51 -0
  109. fqdb-0.1.0/src/fqdb/web/static/pages/dataset-detail.js +181 -0
  110. fqdb-0.1.0/src/fqdb/web/static/pages/datasets.js +156 -0
  111. fqdb-0.1.0/src/fqdb/web/static/pages/downloads.js +466 -0
  112. fqdb-0.1.0/src/fqdb/web/static/pages/jobs.js +75 -0
  113. fqdb-0.1.0/src/fqdb/web/static/pages/overview.js +136 -0
  114. fqdb-0.1.0/src/fqdb/web/static/pages/publish.js +77 -0
  115. fqdb-0.1.0/src/fqdb/web/static/pages/query.js +126 -0
  116. fqdb-0.1.0/src/fqdb/web/static/pages/settings.js +247 -0
  117. fqdb-0.1.0/src/fqdb/web/static/pages/upstream.js +118 -0
  118. fqdb-0.1.0/src/fqdb/web/static/routes.js +45 -0
  119. fqdb-0.1.0/src/fqdb/web/static/style.css +1753 -0
  120. fqdb-0.1.0/src/fqdb/web/static/ui.js +306 -0
  121. fqdb-0.1.0/src/fqdb.egg-info/PKG-INFO +85 -0
  122. fqdb-0.1.0/src/fqdb.egg-info/SOURCES.txt +174 -0
  123. fqdb-0.1.0/src/fqdb.egg-info/dependency_links.txt +1 -0
  124. fqdb-0.1.0/src/fqdb.egg-info/entry_points.txt +2 -0
  125. fqdb-0.1.0/src/fqdb.egg-info/requires.txt +13 -0
  126. fqdb-0.1.0/src/fqdb.egg-info/top_level.txt +2 -0
  127. fqdb-0.1.0/tests/browser_gateway.py +152 -0
  128. fqdb-0.1.0/tests/browser_market.py +205 -0
  129. fqdb-0.1.0/tests/browser_onboarding.py +203 -0
  130. fqdb-0.1.0/tests/conftest.py +43 -0
  131. fqdb-0.1.0/tests/gateway_helpers.py +49 -0
  132. fqdb-0.1.0/tests/magnet_helpers.py +13 -0
  133. fqdb-0.1.0/tests/performance_smoke.py +64 -0
  134. fqdb-0.1.0/tests/test_bt_e2e.py +318 -0
  135. fqdb-0.1.0/tests/test_bt_native_verification.py +41 -0
  136. fqdb-0.1.0/tests/test_cli_onboarding.py +246 -0
  137. fqdb-0.1.0/tests/test_client_lifecycle_retry.py +133 -0
  138. fqdb-0.1.0/tests/test_console.py +208 -0
  139. fqdb-0.1.0/tests/test_contracts.py +168 -0
  140. fqdb-0.1.0/tests/test_current_only.py +128 -0
  141. fqdb-0.1.0/tests/test_daily_minute_layout.py +132 -0
  142. fqdb-0.1.0/tests/test_fqdb_sdk_config.py +118 -0
  143. fqdb-0.1.0/tests/test_gateway_autoseed.py +194 -0
  144. fqdb-0.1.0/tests/test_gateway_autosync.py +178 -0
  145. fqdb-0.1.0/tests/test_gateway_lifecycle.py +460 -0
  146. fqdb-0.1.0/tests/test_job_races.py +160 -0
  147. fqdb-0.1.0/tests/test_jobs.py +46 -0
  148. fqdb-0.1.0/tests/test_magnet_catalog.py +233 -0
  149. fqdb-0.1.0/tests/test_magnet_metadata.py +181 -0
  150. fqdb-0.1.0/tests/test_magnet_minute_queries.py +104 -0
  151. fqdb-0.1.0/tests/test_magnet_native_publication.py +204 -0
  152. fqdb-0.1.0/tests/test_magnet_web.py +182 -0
  153. fqdb-0.1.0/tests/test_market_bt_e2e.py +174 -0
  154. fqdb-0.1.0/tests/test_market_cli.py +120 -0
  155. fqdb-0.1.0/tests/test_market_integrity.py +124 -0
  156. fqdb-0.1.0/tests/test_market_queries.py +144 -0
  157. fqdb-0.1.0/tests/test_market_schema.py +376 -0
  158. fqdb-0.1.0/tests/test_native_build_helper.py +84 -0
  159. fqdb-0.1.0/tests/test_offline_sdk.py +25 -0
  160. fqdb-0.1.0/tests/test_package_contract.py +131 -0
  161. fqdb-0.1.0/tests/test_priority.py +122 -0
  162. fqdb-0.1.0/tests/test_priority_e2e.py +308 -0
  163. fqdb-0.1.0/tests/test_provider_existing_seed.py +103 -0
  164. fqdb-0.1.0/tests/test_provider_listen.py +63 -0
  165. fqdb-0.1.0/tests/test_provider_startup.py +340 -0
  166. fqdb-0.1.0/tests/test_provider_versions.py +68 -0
  167. fqdb-0.1.0/tests/test_root_selection.py +135 -0
  168. fqdb-0.1.0/tests/test_service_features.py +390 -0
  169. fqdb-0.1.0/tests/test_service_ownership.py +37 -0
  170. fqdb-0.1.0/tests/test_shared_activation.py +333 -0
  171. fqdb-0.1.0/tests/test_subscription_selection.py +159 -0
  172. fqdb-0.1.0/tests/test_torrent_update.py +238 -0
  173. fqdb-0.1.0/tests/test_upload_limit_switch.py +136 -0
  174. fqdb-0.1.0/tests/test_upstream.py +107 -0
  175. fqdb-0.1.0/tests/test_web.py +65 -0
  176. fqdb-0.1.0/tests/test_worker_root_release.py +120 -0
fqdb-0.1.0/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.
fqdb-0.1.0/MANIFEST.in ADDED
@@ -0,0 +1,9 @@
1
+ include README.md LICENSE
2
+ recursive-include docs *.md
3
+ recursive-include examples *.py
4
+ recursive-include tests *.py
5
+ recursive-include src/fqdb/web/static *.html *.css *.js
6
+
7
+ recursive-include scripts *.py
8
+
9
+ prune tools
fqdb-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,85 @@
1
+ Metadata-Version: 2.4
2
+ Name: fqdb
3
+ Version: 0.1.0
4
+ Summary: Local-first quantitative data packages, embedded BitTorrent and offline queries
5
+ License-Expression: Apache-2.0
6
+ Classifier: Programming Language :: Python :: 3
7
+ Classifier: Programming Language :: Python :: 3.11
8
+ Classifier: Programming Language :: Python :: 3.12
9
+ Classifier: Programming Language :: Python :: 3.13
10
+ Classifier: Programming Language :: Python :: 3.14
11
+ Classifier: Programming Language :: Python :: 3.15
12
+ Requires-Python: >=3.11
13
+ Description-Content-Type: text/markdown
14
+ License-File: LICENSE
15
+ Requires-Dist: libtorrent<3,>=2.0.11
16
+ Requires-Dist: pyarrow<27,>=18
17
+ Requires-Dist: pandas<4,>=2.2
18
+ Requires-Dist: fastapi<1,>=0.115
19
+ Requires-Dist: uvicorn<1,>=0.32
20
+ Requires-Dist: httpx<1,>=0.28
21
+ Requires-Dist: filelock<4,>=3.16
22
+ Provides-Extra: dev
23
+ Requires-Dist: pytest<10,>=8; extra == "dev"
24
+ Requires-Dist: build<2,>=1.2; extra == "dev"
25
+ Requires-Dist: ruff<1,>=0.9; extra == "dev"
26
+ Requires-Dist: playwright<2,>=1.49; extra == "dev"
27
+ Dynamic: license-file
28
+
29
+ # FreeQuantDB
30
+
31
+ FreeQuantDB 提供量化行情下载、订阅更新和本地查询。数据以 Parquet 保存,可用 Python 离线读取。
32
+
33
+ ## 快速上手
34
+
35
+ 需要 Python 3.11+ 和 Git。下面以下载 2005 年 A 股日线为例。
36
+
37
+ ```bash
38
+ python -m pip install git+https://github.com/FactorMatrix/FreeQuantDB.git
39
+ fqdb catalog refresh
40
+ fqdb download cn/stock/base --frequency 1d --year 2005
41
+ ```
42
+
43
+ 下载完成后,用 Python 读取 2005 年第一个交易日的日线。
44
+
45
+ ```python
46
+ import fqdb
47
+
48
+ df = fqdb.load("cn/stock/base", frequency="1d", start="2005-01-04", end="2005-01-04")
49
+ print(df.head())
50
+ ```
51
+
52
+ 也可以运行 `fqdb gateway` 打开网页,点击「更新磁力链接」,在「数据集」中选择数据包下载,并在数据集详情的「行情查询」中预览行情。
53
+
54
+ ## 自动更新
55
+
56
+ 订阅默认每 3 小时检查一次磁力目录。仅同步目录时,数据集可留空。
57
+
58
+ 在网页的「传输 → 传输设置」选择数据集和频率,勾选「自动下载新数据包」,点击「保存订阅」。留空日期可跟进新包和修订,指定日期可补齐该范围内已发布的数据。已有的相同数据会跳过。
59
+
60
+ 也可以用命令行订阅 A 股日线。
61
+
62
+ ```bash
63
+ fqdb subscribe cn/stock/base --frequency 1d --download
64
+ ```
65
+
66
+ ## 数据列表
67
+
68
+ | 数据 | 数据集 | 频率 | 已上线范围 | 状态 | 预计上线时间 |
69
+ | --- | --- | --- | --- | --- | --- |
70
+ | A 股基础行情 | `cn/stock/base` | 日线 `1d` | 2005-01-04 至 2025-12-31 | 已上线,其他年份待发布 | |
71
+ | A 股基础行情 | `cn/stock/base` | 分钟 `1m` | | 待上线 | |
72
+ | ETF 基础行情 | `cn/etf/base` | 日线 `1d` | 2005-02-23 至 2025-12-31 | 已上线,其他年份待发布 | |
73
+ | ETF 基础行情 | `cn/etf/base` | 分钟 `1m` | | 待上线 | |
74
+ | LOF 基础行情 | `cn/lof/base` | 日线 `1d` | 2005-01-04 至 2025-12-31 | 已上线,其他年份待发布 | |
75
+ | 指数基础行情 | `cn/index/base` | 日线 `1d` | 2005-01-04 至 2025-12-31 | 已上线,其他年份待发布 | |
76
+ | 国内期货基础行情 | `cn/future/base` | 日线 `1d` | 2005-01-04 至 2025-12-31 | 已上线,其他年份待发布 | |
77
+ | 国内期货基础行情 | `cn/future/base` | 分钟 `1m` | | 待上线 | |
78
+
79
+ A 股、ETF、LOF、指数和国内期货日线各发布了 2005–2025 年的 21 个年包。各数据集的行数和磁力链接见[数据下载目录](catalog/README.md)。
80
+
81
+ ## 文档与许可
82
+
83
+ [管理网页](docs/DASHBOARD.md) · [数据格式与目录](docs/MARKET_DATA.md) · [Python 与开发环境](docs/PYTHON_SUPPORT.md) · [架构](docs/ARCHITECTURE.md)
84
+
85
+ 软件采用 [Apache-2.0](LICENSE) 许可。
fqdb-0.1.0/README.md ADDED
@@ -0,0 +1,57 @@
1
+ # FreeQuantDB
2
+
3
+ FreeQuantDB 提供量化行情下载、订阅更新和本地查询。数据以 Parquet 保存,可用 Python 离线读取。
4
+
5
+ ## 快速上手
6
+
7
+ 需要 Python 3.11+ 和 Git。下面以下载 2005 年 A 股日线为例。
8
+
9
+ ```bash
10
+ python -m pip install git+https://github.com/FactorMatrix/FreeQuantDB.git
11
+ fqdb catalog refresh
12
+ fqdb download cn/stock/base --frequency 1d --year 2005
13
+ ```
14
+
15
+ 下载完成后,用 Python 读取 2005 年第一个交易日的日线。
16
+
17
+ ```python
18
+ import fqdb
19
+
20
+ df = fqdb.load("cn/stock/base", frequency="1d", start="2005-01-04", end="2005-01-04")
21
+ print(df.head())
22
+ ```
23
+
24
+ 也可以运行 `fqdb gateway` 打开网页,点击「更新磁力链接」,在「数据集」中选择数据包下载,并在数据集详情的「行情查询」中预览行情。
25
+
26
+ ## 自动更新
27
+
28
+ 订阅默认每 3 小时检查一次磁力目录。仅同步目录时,数据集可留空。
29
+
30
+ 在网页的「传输 → 传输设置」选择数据集和频率,勾选「自动下载新数据包」,点击「保存订阅」。留空日期可跟进新包和修订,指定日期可补齐该范围内已发布的数据。已有的相同数据会跳过。
31
+
32
+ 也可以用命令行订阅 A 股日线。
33
+
34
+ ```bash
35
+ fqdb subscribe cn/stock/base --frequency 1d --download
36
+ ```
37
+
38
+ ## 数据列表
39
+
40
+ | 数据 | 数据集 | 频率 | 已上线范围 | 状态 | 预计上线时间 |
41
+ | --- | --- | --- | --- | --- | --- |
42
+ | A 股基础行情 | `cn/stock/base` | 日线 `1d` | 2005-01-04 至 2025-12-31 | 已上线,其他年份待发布 | |
43
+ | A 股基础行情 | `cn/stock/base` | 分钟 `1m` | | 待上线 | |
44
+ | ETF 基础行情 | `cn/etf/base` | 日线 `1d` | 2005-02-23 至 2025-12-31 | 已上线,其他年份待发布 | |
45
+ | ETF 基础行情 | `cn/etf/base` | 分钟 `1m` | | 待上线 | |
46
+ | LOF 基础行情 | `cn/lof/base` | 日线 `1d` | 2005-01-04 至 2025-12-31 | 已上线,其他年份待发布 | |
47
+ | 指数基础行情 | `cn/index/base` | 日线 `1d` | 2005-01-04 至 2025-12-31 | 已上线,其他年份待发布 | |
48
+ | 国内期货基础行情 | `cn/future/base` | 日线 `1d` | 2005-01-04 至 2025-12-31 | 已上线,其他年份待发布 | |
49
+ | 国内期货基础行情 | `cn/future/base` | 分钟 `1m` | | 待上线 | |
50
+
51
+ A 股、ETF、LOF、指数和国内期货日线各发布了 2005–2025 年的 21 个年包。各数据集的行数和磁力链接见[数据下载目录](catalog/README.md)。
52
+
53
+ ## 文档与许可
54
+
55
+ [管理网页](docs/DASHBOARD.md) · [数据格式与目录](docs/MARKET_DATA.md) · [Python 与开发环境](docs/PYTHON_SUPPORT.md) · [架构](docs/ARCHITECTURE.md)
56
+
57
+ 软件采用 [Apache-2.0](LICENSE) 许可。
@@ -0,0 +1,32 @@
1
+ # FQDB 当前架构
2
+
3
+ 股票、ETF、期货共用固定的日线和分钟格式。见 [行情说明](MARKET_DATA.md)。
4
+
5
+ ## 从哪里改
6
+
7
+ 下列路径以 `src/fqdb/` 为起点。
8
+
9
+ | 功能 | 入口与职责 |
10
+ | --- | --- |
11
+ | CLI | `cli/application.py` 的 `CommandLine` 注册参数、选择数据根并执行命令。各命令的参数与处理函数放在 `cli/local.py`、`transfers.py`、`sharing.py` 或 `catalogs.py`。 |
12
+ | SDK 和目录 | `api.py` 和公开模块提供 Python 接口,`config.py` 统一解析显式参数、进程选择、环境变量、保存设置和默认目录。 |
13
+ | 服务动作 | `service/actions.py` 同时声明处理函数、并发锁与 worker 启动条件。CLI、SDK 与网页经同一套动作调用业务代码。 |
14
+ | 任务与 BT | `service/core.py` 的 `Owner` 管理每个数据根的生命周期与锁。`Transfers`、`Seeding` 和 `Checks` 分别负责下载、做种和校验。`service/jobs.py` 管理有限作业,`bt/` 管理原生会话和种子。 |
15
+ | 磁力目录 | `catalog/magnet.py` 扫描磁盘和同步目录。`magnet_manifest.py` 校验路径与说明,`verification.py` 核对本地 Parquet。`service/catalogs.py` 生成计划,并在用户下载时登记 BT 任务。 |
16
+ | 节点和订阅 | `service/peers.py` 管理节点连接和优先级,`subscriptions.py` 管理活跃会话内的目录刷新。 |
17
+ | 行情契约 | `schema/assets.py` 集中声明资产代码、交易所、单位和时区。`schema/market.py` 定义物理列,`schema/digest.py` 负责契约指纹和逐日内容摘要。 |
18
+ | 发布 | `publish/publisher.py` 的 `Publisher` 管理符合规范的包和内容修订。`coverage.py` 核对声明的交易日和标的覆盖。 |
19
+ | 本地读写 | `storage/metadata.py` 管理 SQLite 数据包、任务和活动版本,`storage/market.py` 选择一致的交易日内容并查询,`validation/` 校验文件、分片和数据质量。 |
20
+ | 看板 | `web/dashboard/catalog.py` 将磁盘目录投影为概览、数据集和包详情,`operations.py` 提供任务和运行视图。刷新和下载控件在 `web/static/components/`。 |
21
+
22
+ 新增命令时,在所属 CLI 模块中一起注册参数和处理函数。新增服务动作时,在 `service/actions.py` 明确是否需要启动 worker,以及是否需要持有运行锁。新增看板页时,在 `web/static/routes.js` 注册页面,共享读接口通过 `Dashboard` 注册。资产扩展从 `AssetContract` 开始,并同步验证目录、查询和质量规则。
23
+
24
+ ## 运行边界
25
+
26
+ 离线查询直接读取 SQLite 和 Parquet。有限管理操作复用已运行的 worker,或在持有数据根锁的本地上下文完成。每个数据根只允许一个后台 worker 持有 BT 会话。运行 Gateway 会恢复可用的本地种子,页面关闭或 `Ctrl+C` 只释放管理会话。活跃下载和做种可独立运行,空闲时 worker 自动退出。显式启动的前台做种仍随调用进程退出。
27
+
28
+ ## 当前数据根
29
+
30
+ `catalog/` 存放数据集索引和包说明,`data/` 存放对应的 Parquet。`.state/` 存放同步记录、核对缓存、任务、BT 元数据及内容修订历史。
31
+
32
+ 修订保留原字节与种子,已有下载和做种可继续使用原 info-hash。后台用保存的原种子元数据、续传状态与本地文件恢复任务。用户改动或删除文件时会显示异常,恢复做种不会主动下载覆盖这些文件。
@@ -0,0 +1,63 @@
1
+ # 数据工作台
2
+
3
+ 主导航分为「数据」和「管理」。在「数据」下查看概览、数据集和质量,在「管理」下打开传输和设置。
4
+
5
+ - 打开页面时读取本地 `catalog/`。概览显示各市场和资产的本地数据包覆盖。点击覆盖条可筛选下方数据集。数据集页支持搜索、排序和按市场、资产、频率、状态筛选。
6
+ - 「更新磁力链接」从配置的目录源同步说明文件。同步失败时保留本地目录,页面显示错误。
7
+ - 包详情分别展示磁力状态、本地数据状态、目录预期和 Parquet 实测值。日期、字段、行数和标的数按证据显示。覆盖可手动核对。
8
+ - 传输页先展示任务,可按包直接下载,也可预览日、月、年或自定义范围。展开「传输设置」可设置订阅、查看检查结果、暂停或恢复共享、设置限速和管理优先 IP。
9
+ - 查询支持标的和日期筛选、字段选择与分页。质量页列出具体异常、包路径、预期值和实测值。
10
+ - 数据集页组也提供本地发布与数据导入。设置页管理任务并发、节点、目录源、存储路径与日志。「订阅」可直接进入传输设置。
11
+
12
+ 字段、目录、状态和所有按钮均连接当前真实后台,无数据时保持空状态。格式和使用说明见 [行情说明](MARKET_DATA.md)。
13
+
14
+ `fqdb gateway`、正常业务命令和普通 `import fqdb` 都会启动或连接当前数据目录的 BT 后台。只有 Gateway 打开网页。下载时通过 BT 分享已下载的分块,完成后沿用同一个 info-hash 做种。关闭网页、终端或脚本后,后台继续处理下载、共享和启用的订阅。运行 `fqdb service stop` 停止整个后台。重启电脑后,在使用 CLI 或重新导入包时启动。
15
+
16
+ 帮助、状态和停止命令可以在后台关闭时使用。网页或 `fqdb.provider.stop()` 保存的共享暂停设置会保留。需要显式恢复时,可在网页开启共享或调用 `fqdb.provider.start()`。
17
+
18
+ ## 自动更新与订阅
19
+
20
+ 后台启动时会先检查已保存的订阅,后续默认每 3 小时检查一次。可以调整间隔,或指定每天的时间和时区。留空数据集时,订阅仅更新磁力目录。
21
+
22
+ 勾选自动下载后,选择要同步的数据集和频率。填写日期可补齐指定范围,留空日期则跟进新发布和新版本。首次拿到该范围的目录时只取最新覆盖。已下载或已覆盖的数据会跳过,手动暂停、取消的任务仍由用户控制。
23
+
24
+ 传输设置显示上次检查结果和下次检查时间。目录源暂时不可用时,可以查看错误,本地已有的数据仍可继续共享。
25
+
26
+ 也可用 CLI 或 Python 保存订阅。
27
+
28
+ ```bash
29
+ fqdb subscribe cn/stock/base --frequency 1d --download
30
+ ```
31
+
32
+ ```python
33
+ import fqdb
34
+
35
+ fqdb.subscribe("cn/stock/base", frequency="1d", download=True)
36
+ ```
37
+
38
+ ## 命令行做种
39
+
40
+ ```bash
41
+ fqdb -d /path/to/fqdb-data provider start --dataset cn/stock/base/1d
42
+ fqdb -d /path/to/fqdb-data provider status
43
+ fqdb -d /path/to/fqdb-data provider stop
44
+ ```
45
+
46
+ 传输页分别显示当前总上传上限和保存的纯做种上限。
47
+
48
+ | 传输状态 | 总上传上限 |
49
+ | --- | --- |
50
+ | 正在接收下载分片 | 不限速,包括同一后台正在上传的旧种子 |
51
+ | 没有下载分片传输 | 恢复保存的纯做种上限,新安装默认 500 KB/s(500,000 B/s) |
52
+
53
+ 网页使用 MB/s,500 KB/s 显示为 0.5 MB/s。`provider start --upload-limit` 使用 B/s。将纯做种上限设为 `0` 时,纯做种也不限速。
54
+
55
+ 新安装默认启用 DHT、PEX 等节点发现,并在本机 IPv4 网络接口上监听 BT。已有监听地址和发现设置继续生效,管理网页默认只监听 `127.0.0.1`。公网可达性取决于 NAT、端口和对端在线情况。局域网也可通过 `fqdb peers add NODE_IP NODE_PORT` 添加已知节点。
56
+
57
+ ```bash
58
+ fqdb -d /path/to/fqdb-data provider priority set 192.0.2.10 --level high
59
+ fqdb -d /path/to/fqdb-data provider priority list
60
+ fqdb -d /path/to/fqdb-data provider priority remove 192.0.2.10
61
+ ```
62
+
63
+ 将示例地址换成接收方的 IPv4 或 IPv6。IP 规则变更在目标节点重连时生效。纯做种限速下,多个节点争用带宽时,libtorrent 会优先给指定 IP 分配可用带宽。下载期间解除总上限后,优先 IP 的效果可能不明显,实际速度取决于可用带宽。
@@ -0,0 +1,37 @@
1
+ # 数据包格式
2
+
3
+ FreeQuantDB 管理符合约定的 Parquet 数据包。市场、资产、数据类型、频率和期间由目录确定。
4
+
5
+ ## 目录结构
6
+
7
+ 默认数据根目录是 `~/.fqdb`。运行 `fqdb gateway -d ~/fqdb_data` 可指定根目录并保存该路径。
8
+
9
+ 数据包相对于根目录的路径为 `data/<市场>/<资产>/<数据类型>/<频率>/<数据包相对路径>`。分包周期和文件名以各数据集的目录为准。
10
+
11
+ 以下是 A 股 2005 年日线包的目录示例。
12
+
13
+ ```text
14
+ catalog/cn/stock/base/1d/index.json
15
+ catalog/cn/stock/base/1d/2005/2005.parquet.json
16
+ data/cn/stock/base/1d/2005/2005.parquet
17
+ ```
18
+
19
+ 数据集索引记录字段、标的列和时间列。包说明记录实际日期范围、行数、标的数、交易日数、字节数和磁力链接。手工维护的本地包可以省略磁力链接。
20
+
21
+ ## 内置行情字段
22
+
23
+ | 频率 | 字段 |
24
+ | --- | --- |
25
+ | 日线通用 | `instrument`、`trading_date`、`open`、`high`、`low`、`close`、`volume`、`amount`、`prev_close` |
26
+ | 期货日线新增 | `settlement`、`prev_settlement`、`open_interest`、`limit_up`、`limit_down` |
27
+ | 分钟 | `instrument`、`trading_time`、`open`、`high`、`low`、`close`、`volume`、`amount` |
28
+
29
+ `instrument` 是字符串,`trading_date` 是日期,`trading_time` 含时区,量价字段是双精度数值。SDK 按本地数据离线查询。缺少可信交易日证据时,跨夜记录的所属交易日显示为待核对。
30
+
31
+ 期货 `instrument` 包含合约代码和交易所后缀。大商所 `L`、`PP` 和 `V` 的月均价合约保留代码中的 `F`,例如 `L2602F.DCE`。[期货日线字段口径](../catalog/cn/future/base/1d/README.md)
32
+
33
+ 指数日线的量价字段保留各指数的口径,`close` 是必填的正数点位。开、高、低、前收盘参考点位和量额缺失时以 Parquet 空值表示。指数代码可使用 `.INDX` 命名空间。[指数日线覆盖与字段](../catalog/cn/index/base/1d/README.md)
34
+
35
+ ## 下载与核对
36
+
37
+ 官方磁力说明可同步到本机,也可从同结构的镜像或本地文件导入。下载完成采用 BitTorrent 分片校验结果。包说明和实际文件可在看板中核对,或用 `fqdb catalog check` 比较预期与实测值。[数据下载](../catalog/README.md)
@@ -0,0 +1,22 @@
1
+ # Python支持与开发环境
2
+
3
+ 目标为标准CPython **3.11及以上**,不设置固定上限。主开发、测试和本机服务使用独立的 `.venvs/FQDB` / CPython3.11;其他解释器只用于兼容验证。包、导入与命令统一为 `fqdb`。
4
+
5
+ ```bash
6
+ python3.11 -m venv --prompt FQDB .venvs/FQDB
7
+ source .venvs/FQDB/bin/activate
8
+ python -m pip install '.[dev]'
9
+ ```
10
+
11
+ Python 包依赖 libtorrent、PyArrow 和 Pandas 等组件。缺少 libtorrent 绑定时,可通过 `scripts/build_libtorrent.py` 构建。[官方绑定文档](https://libtorrent.org/python_binding.html)
12
+
13
+ 使用仓库外的独立目录运行合成数据测试。
14
+
15
+ ```bash
16
+ FQDB_TEST_DATA_ROOT=/path/to/fqdb-tests python -m pytest -q
17
+ python -m ruff check src tests examples scripts
18
+ ```
19
+
20
+ 安装 wheel 后,可以用 `python scripts/check_python_install.py -d /path/to/fqdb-install-check` 验证已安装的 SDK、CLI 和网页。测试目录须为空或尚未创建。
21
+
22
+ 新增命令、服务动作、页面或资产时,请查阅[架构与扩展入口](ARCHITECTURE.md)。
@@ -0,0 +1,74 @@
1
+ """Explicit synthetic six-dataset example, requiring a new independent root.
2
+
3
+ python examples/synthetic_local.py -d /path/to/SYNTHETIC-demo
4
+ No real source request, public announce or remote publication.
5
+ """
6
+
7
+ import argparse
8
+ import json
9
+ import os
10
+ import shlex
11
+ from pathlib import Path
12
+
13
+ import pyarrow as pa
14
+ import pyarrow.parquet as pq
15
+
16
+ os.environ["FQDB_AUTOSTART"] = "0"
17
+
18
+ from fqdb.demo import market_frame, market_schema
19
+ from fqdb.layout import runtime_path
20
+ from fqdb.schema.market import arrow_schema
21
+ from fqdb.service.client import Client
22
+
23
+ parser = argparse.ArgumentParser()
24
+ parser.add_argument("-d", "--data-dir", type=Path, required=True)
25
+ args = parser.parse_args()
26
+ root = args.data_dir.expanduser().resolve()
27
+ if root.exists() and any(root.iterdir()):
28
+ raise SystemExit("Use a new empty SYNTHETIC data root; existing data is never overwritten")
29
+ client = Client(root)
30
+ client.config.ensure().update(listen="127.0.0.1:0", discovery=False)
31
+ days = ["2026-11-13", "2026-11-17"]
32
+ outputs = []
33
+ for asset in ("stock", "etf", "future"):
34
+ schema = market_schema(asset, days=days)
35
+ client.call("register", schema.to_dict())
36
+ for frequency in ("1d", "1m"):
37
+ data = market_frame(asset, frequency, days=days, night=asset == "future")
38
+ path = runtime_path(root, "imports") / ("SYNTHETIC-" + asset + "-" + frequency + ".parquet")
39
+ pq.write_table(
40
+ pa.Table.from_pandas(data, schema=arrow_schema(schema, frequency), preserve_index=False),
41
+ path,
42
+ compression="zstd",
43
+ )
44
+ try:
45
+ scope = {"dataset": schema.id, "frequency": frequency}
46
+ result = client.call(
47
+ "publish",
48
+ scope
49
+ | {
50
+ "input_path": str(path),
51
+ **({"trading_dates": data.attrs["trading_dates"]} if frequency == "1m" else {}),
52
+ },
53
+ )
54
+ outputs.extend(result["entries"])
55
+ for granularity, period in (("month", "202611"), ("year", "2026")):
56
+ outputs.extend(
57
+ client.call("aggregate", scope | {"granularity": granularity, "period": period})[
58
+ "entries"
59
+ ]
60
+ )
61
+ finally:
62
+ path.unlink(missing_ok=True)
63
+ print(
64
+ json.dumps(
65
+ {
66
+ "SYNTHETIC_ONLY": True,
67
+ "packages": len(outputs),
68
+ "provider_enabled": False,
69
+ "external_publication": False,
70
+ "gateway_command": shlex.join(["python", "-m", "fqdb", "gateway", "-d", str(root)]),
71
+ },
72
+ indent=2,
73
+ )
74
+ )
@@ -0,0 +1,47 @@
1
+ [build-system]
2
+ requires = ["setuptools>=77", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "fqdb"
7
+ version = "0.1.0"
8
+ description = "Local-first quantitative data packages, embedded BitTorrent and offline queries"
9
+ readme = "README.md"
10
+ license = "Apache-2.0"
11
+ license-files = ["LICENSE"]
12
+ requires-python = ">=3.11"
13
+ classifiers = [
14
+ "Programming Language :: Python :: 3",
15
+ "Programming Language :: Python :: 3.11",
16
+ "Programming Language :: Python :: 3.12",
17
+ "Programming Language :: Python :: 3.13",
18
+ "Programming Language :: Python :: 3.14",
19
+ "Programming Language :: Python :: 3.15",
20
+ ]
21
+ dependencies = ["libtorrent>=2.0.11,<3", "pyarrow>=18,<27", "pandas>=2.2,<4", "fastapi>=0.115,<1", "uvicorn>=0.32,<1", "httpx>=0.28,<1", "filelock>=3.16,<4"]
22
+
23
+ [project.optional-dependencies]
24
+ dev = ["pytest>=8,<10", "build>=1.2,<2", "ruff>=0.9,<1", "playwright>=1.49,<2"]
25
+
26
+ [project.scripts]
27
+ fqdb = "_fqdb_cli:main"
28
+
29
+ [tool.setuptools]
30
+ py-modules = ["_fqdb_cli"]
31
+
32
+ [tool.setuptools.packages.find]
33
+ where = ["src"]
34
+
35
+ [tool.setuptools.package-data]
36
+ fqdb = ["web/static/*", "web/static/pages/*.js", "web/static/components/*.js"]
37
+
38
+ [tool.pytest.ini_options]
39
+ testpaths = ["tests"]
40
+ addopts = "-ra"
41
+
42
+ [tool.ruff]
43
+ line-length = 110
44
+ target-version = "py311"
45
+
46
+ [tool.ruff.lint]
47
+ select = ["E4", "E7", "E9", "F"]