onetick-py 1.162.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 (160) hide show
  1. onetick_py-1.162.2/LICENSE +21 -0
  2. onetick_py-1.162.2/PKG-INFO +148 -0
  3. onetick_py-1.162.2/README.md +86 -0
  4. onetick_py-1.162.2/pyproject.toml +46 -0
  5. onetick_py-1.162.2/requirements.strict.txt +9 -0
  6. onetick_py-1.162.2/requirements.txt +32 -0
  7. onetick_py-1.162.2/setup.cfg +4 -0
  8. onetick_py-1.162.2/setup.py +36 -0
  9. onetick_py-1.162.2/src/locator_parser/__init__.py +0 -0
  10. onetick_py-1.162.2/src/locator_parser/acl.py +73 -0
  11. onetick_py-1.162.2/src/locator_parser/actions.py +266 -0
  12. onetick_py-1.162.2/src/locator_parser/common.py +365 -0
  13. onetick_py-1.162.2/src/locator_parser/io.py +41 -0
  14. onetick_py-1.162.2/src/locator_parser/locator.py +150 -0
  15. onetick_py-1.162.2/src/onetick/__init__.py +101 -0
  16. onetick_py-1.162.2/src/onetick/doc_utilities/__init__.py +3 -0
  17. onetick_py-1.162.2/src/onetick/doc_utilities/napoleon.py +40 -0
  18. onetick_py-1.162.2/src/onetick/doc_utilities/ot_doctest.py +140 -0
  19. onetick_py-1.162.2/src/onetick/doc_utilities/snippets.py +280 -0
  20. onetick_py-1.162.2/src/onetick/lib/__init__.py +4 -0
  21. onetick_py-1.162.2/src/onetick/lib/instance.py +138 -0
  22. onetick_py-1.162.2/src/onetick/py/__init__.py +290 -0
  23. onetick_py-1.162.2/src/onetick/py/_stack_info.py +89 -0
  24. onetick_py-1.162.2/src/onetick/py/_version.py +2 -0
  25. onetick_py-1.162.2/src/onetick/py/aggregations/__init__.py +11 -0
  26. onetick_py-1.162.2/src/onetick/py/aggregations/_base.py +645 -0
  27. onetick_py-1.162.2/src/onetick/py/aggregations/_docs.py +912 -0
  28. onetick_py-1.162.2/src/onetick/py/aggregations/compute.py +286 -0
  29. onetick_py-1.162.2/src/onetick/py/aggregations/functions.py +2216 -0
  30. onetick_py-1.162.2/src/onetick/py/aggregations/generic.py +104 -0
  31. onetick_py-1.162.2/src/onetick/py/aggregations/high_low.py +80 -0
  32. onetick_py-1.162.2/src/onetick/py/aggregations/num_distinct.py +83 -0
  33. onetick_py-1.162.2/src/onetick/py/aggregations/order_book.py +427 -0
  34. onetick_py-1.162.2/src/onetick/py/aggregations/other.py +1014 -0
  35. onetick_py-1.162.2/src/onetick/py/backports.py +26 -0
  36. onetick_py-1.162.2/src/onetick/py/cache.py +373 -0
  37. onetick_py-1.162.2/src/onetick/py/callback/__init__.py +5 -0
  38. onetick_py-1.162.2/src/onetick/py/callback/callback.py +275 -0
  39. onetick_py-1.162.2/src/onetick/py/callback/callbacks.py +131 -0
  40. onetick_py-1.162.2/src/onetick/py/compatibility.py +752 -0
  41. onetick_py-1.162.2/src/onetick/py/configuration.py +736 -0
  42. onetick_py-1.162.2/src/onetick/py/core/__init__.py +0 -0
  43. onetick_py-1.162.2/src/onetick/py/core/_csv_inspector.py +93 -0
  44. onetick_py-1.162.2/src/onetick/py/core/_internal/__init__.py +0 -0
  45. onetick_py-1.162.2/src/onetick/py/core/_internal/_manually_bound_value.py +6 -0
  46. onetick_py-1.162.2/src/onetick/py/core/_internal/_nodes_history.py +250 -0
  47. onetick_py-1.162.2/src/onetick/py/core/_internal/_op_utils/__init__.py +0 -0
  48. onetick_py-1.162.2/src/onetick/py/core/_internal/_op_utils/every_operand.py +9 -0
  49. onetick_py-1.162.2/src/onetick/py/core/_internal/_op_utils/is_const.py +10 -0
  50. onetick_py-1.162.2/src/onetick/py/core/_internal/_per_tick_scripts/tick_list_sort_template.script +121 -0
  51. onetick_py-1.162.2/src/onetick/py/core/_internal/_proxy_node.py +140 -0
  52. onetick_py-1.162.2/src/onetick/py/core/_internal/_state_objects.py +2307 -0
  53. onetick_py-1.162.2/src/onetick/py/core/_internal/_state_vars.py +87 -0
  54. onetick_py-1.162.2/src/onetick/py/core/_source/__init__.py +0 -0
  55. onetick_py-1.162.2/src/onetick/py/core/_source/_symbol_param.py +95 -0
  56. onetick_py-1.162.2/src/onetick/py/core/_source/schema.py +97 -0
  57. onetick_py-1.162.2/src/onetick/py/core/_source/source_methods/__init__.py +0 -0
  58. onetick_py-1.162.2/src/onetick/py/core/_source/source_methods/aggregations.py +810 -0
  59. onetick_py-1.162.2/src/onetick/py/core/_source/source_methods/applyers.py +296 -0
  60. onetick_py-1.162.2/src/onetick/py/core/_source/source_methods/columns.py +141 -0
  61. onetick_py-1.162.2/src/onetick/py/core/_source/source_methods/data_quality.py +301 -0
  62. onetick_py-1.162.2/src/onetick/py/core/_source/source_methods/debugs.py +270 -0
  63. onetick_py-1.162.2/src/onetick/py/core/_source/source_methods/drops.py +120 -0
  64. onetick_py-1.162.2/src/onetick/py/core/_source/source_methods/fields.py +619 -0
  65. onetick_py-1.162.2/src/onetick/py/core/_source/source_methods/filters.py +1001 -0
  66. onetick_py-1.162.2/src/onetick/py/core/_source/source_methods/joins.py +1393 -0
  67. onetick_py-1.162.2/src/onetick/py/core/_source/source_methods/merges.py +566 -0
  68. onetick_py-1.162.2/src/onetick/py/core/_source/source_methods/misc.py +1325 -0
  69. onetick_py-1.162.2/src/onetick/py/core/_source/source_methods/pandases.py +155 -0
  70. onetick_py-1.162.2/src/onetick/py/core/_source/source_methods/renames.py +356 -0
  71. onetick_py-1.162.2/src/onetick/py/core/_source/source_methods/sorts.py +183 -0
  72. onetick_py-1.162.2/src/onetick/py/core/_source/source_methods/switches.py +142 -0
  73. onetick_py-1.162.2/src/onetick/py/core/_source/source_methods/symbols.py +117 -0
  74. onetick_py-1.162.2/src/onetick/py/core/_source/source_methods/times.py +627 -0
  75. onetick_py-1.162.2/src/onetick/py/core/_source/source_methods/writes.py +702 -0
  76. onetick_py-1.162.2/src/onetick/py/core/_source/symbol.py +202 -0
  77. onetick_py-1.162.2/src/onetick/py/core/_source/tmp_otq.py +222 -0
  78. onetick_py-1.162.2/src/onetick/py/core/column.py +209 -0
  79. onetick_py-1.162.2/src/onetick/py/core/column_operations/__init__.py +0 -0
  80. onetick_py-1.162.2/src/onetick/py/core/column_operations/_methods/__init__.py +4 -0
  81. onetick_py-1.162.2/src/onetick/py/core/column_operations/_methods/_internal.py +28 -0
  82. onetick_py-1.162.2/src/onetick/py/core/column_operations/_methods/conversions.py +215 -0
  83. onetick_py-1.162.2/src/onetick/py/core/column_operations/_methods/methods.py +294 -0
  84. onetick_py-1.162.2/src/onetick/py/core/column_operations/_methods/op_types.py +150 -0
  85. onetick_py-1.162.2/src/onetick/py/core/column_operations/accessors/__init__.py +0 -0
  86. onetick_py-1.162.2/src/onetick/py/core/column_operations/accessors/_accessor.py +30 -0
  87. onetick_py-1.162.2/src/onetick/py/core/column_operations/accessors/decimal_accessor.py +92 -0
  88. onetick_py-1.162.2/src/onetick/py/core/column_operations/accessors/dt_accessor.py +464 -0
  89. onetick_py-1.162.2/src/onetick/py/core/column_operations/accessors/float_accessor.py +160 -0
  90. onetick_py-1.162.2/src/onetick/py/core/column_operations/accessors/str_accessor.py +1374 -0
  91. onetick_py-1.162.2/src/onetick/py/core/column_operations/base.py +1061 -0
  92. onetick_py-1.162.2/src/onetick/py/core/cut_builder.py +149 -0
  93. onetick_py-1.162.2/src/onetick/py/core/db_constants.py +20 -0
  94. onetick_py-1.162.2/src/onetick/py/core/eval_query.py +244 -0
  95. onetick_py-1.162.2/src/onetick/py/core/lambda_object.py +442 -0
  96. onetick_py-1.162.2/src/onetick/py/core/multi_output_source.py +193 -0
  97. onetick_py-1.162.2/src/onetick/py/core/per_tick_script.py +2253 -0
  98. onetick_py-1.162.2/src/onetick/py/core/query_inspector.py +465 -0
  99. onetick_py-1.162.2/src/onetick/py/core/source.py +1663 -0
  100. onetick_py-1.162.2/src/onetick/py/db/__init__.py +2 -0
  101. onetick_py-1.162.2/src/onetick/py/db/_inspection.py +1042 -0
  102. onetick_py-1.162.2/src/onetick/py/db/db.py +1423 -0
  103. onetick_py-1.162.2/src/onetick/py/db/utils.py +64 -0
  104. onetick_py-1.162.2/src/onetick/py/docs/__init__.py +0 -0
  105. onetick_py-1.162.2/src/onetick/py/docs/docstring_parser.py +112 -0
  106. onetick_py-1.162.2/src/onetick/py/docs/utils.py +81 -0
  107. onetick_py-1.162.2/src/onetick/py/functions.py +2354 -0
  108. onetick_py-1.162.2/src/onetick/py/license.py +188 -0
  109. onetick_py-1.162.2/src/onetick/py/log.py +88 -0
  110. onetick_py-1.162.2/src/onetick/py/math.py +947 -0
  111. onetick_py-1.162.2/src/onetick/py/misc.py +437 -0
  112. onetick_py-1.162.2/src/onetick/py/oqd/__init__.py +22 -0
  113. onetick_py-1.162.2/src/onetick/py/oqd/eps.py +1195 -0
  114. onetick_py-1.162.2/src/onetick/py/oqd/sources.py +325 -0
  115. onetick_py-1.162.2/src/onetick/py/otq.py +211 -0
  116. onetick_py-1.162.2/src/onetick/py/pyomd_mock.py +47 -0
  117. onetick_py-1.162.2/src/onetick/py/run.py +841 -0
  118. onetick_py-1.162.2/src/onetick/py/servers.py +173 -0
  119. onetick_py-1.162.2/src/onetick/py/session.py +1342 -0
  120. onetick_py-1.162.2/src/onetick/py/sources/__init__.py +19 -0
  121. onetick_py-1.162.2/src/onetick/py/sources/cache.py +167 -0
  122. onetick_py-1.162.2/src/onetick/py/sources/common.py +126 -0
  123. onetick_py-1.162.2/src/onetick/py/sources/csv.py +642 -0
  124. onetick_py-1.162.2/src/onetick/py/sources/custom.py +85 -0
  125. onetick_py-1.162.2/src/onetick/py/sources/data_file.py +305 -0
  126. onetick_py-1.162.2/src/onetick/py/sources/data_source.py +1049 -0
  127. onetick_py-1.162.2/src/onetick/py/sources/empty.py +94 -0
  128. onetick_py-1.162.2/src/onetick/py/sources/odbc.py +337 -0
  129. onetick_py-1.162.2/src/onetick/py/sources/order_book.py +238 -0
  130. onetick_py-1.162.2/src/onetick/py/sources/parquet.py +168 -0
  131. onetick_py-1.162.2/src/onetick/py/sources/pit.py +191 -0
  132. onetick_py-1.162.2/src/onetick/py/sources/query.py +495 -0
  133. onetick_py-1.162.2/src/onetick/py/sources/snapshots.py +419 -0
  134. onetick_py-1.162.2/src/onetick/py/sources/split_query_output_by_symbol.py +198 -0
  135. onetick_py-1.162.2/src/onetick/py/sources/symbology_mapping.py +123 -0
  136. onetick_py-1.162.2/src/onetick/py/sources/symbols.py +357 -0
  137. onetick_py-1.162.2/src/onetick/py/sources/ticks.py +825 -0
  138. onetick_py-1.162.2/src/onetick/py/sql.py +70 -0
  139. onetick_py-1.162.2/src/onetick/py/state.py +256 -0
  140. onetick_py-1.162.2/src/onetick/py/types.py +2056 -0
  141. onetick_py-1.162.2/src/onetick/py/utils/__init__.py +70 -0
  142. onetick_py-1.162.2/src/onetick/py/utils/acl.py +93 -0
  143. onetick_py-1.162.2/src/onetick/py/utils/config.py +186 -0
  144. onetick_py-1.162.2/src/onetick/py/utils/default.py +49 -0
  145. onetick_py-1.162.2/src/onetick/py/utils/file.py +38 -0
  146. onetick_py-1.162.2/src/onetick/py/utils/helpers.py +76 -0
  147. onetick_py-1.162.2/src/onetick/py/utils/locator.py +94 -0
  148. onetick_py-1.162.2/src/onetick/py/utils/perf.py +499 -0
  149. onetick_py-1.162.2/src/onetick/py/utils/query.py +49 -0
  150. onetick_py-1.162.2/src/onetick/py/utils/render.py +1139 -0
  151. onetick_py-1.162.2/src/onetick/py/utils/script.py +244 -0
  152. onetick_py-1.162.2/src/onetick/py/utils/temp.py +471 -0
  153. onetick_py-1.162.2/src/onetick/py/utils/types.py +118 -0
  154. onetick_py-1.162.2/src/onetick/py/utils/tz.py +82 -0
  155. onetick_py-1.162.2/src/onetick_py.egg-info/PKG-INFO +148 -0
  156. onetick_py-1.162.2/src/onetick_py.egg-info/SOURCES.txt +158 -0
  157. onetick_py-1.162.2/src/onetick_py.egg-info/dependency_links.txt +1 -0
  158. onetick_py-1.162.2/src/onetick_py.egg-info/entry_points.txt +2 -0
  159. onetick_py-1.162.2/src/onetick_py.egg-info/requires.txt +85 -0
  160. onetick_py-1.162.2/src/onetick_py.egg-info/top_level.txt +2 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 OneMarketData, LLC
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,148 @@
1
+ Metadata-Version: 2.4
2
+ Name: onetick-py
3
+ Version: 1.162.2
4
+ Summary: Python package that allows you to work with OneTick
5
+ Author-email: solutions <solutions@onetick.com>
6
+ License-Expression: MIT
7
+ Project-URL: Documentation, https://docs.pip.distribution.sol.onetick.com
8
+ Project-URL: OneTick, https://onetick.com/
9
+ Classifier: Topic :: Database :: Front-Ends
10
+ Classifier: Topic :: Scientific/Engineering
11
+ Classifier: Programming Language :: Python :: 3.8
12
+ Classifier: Programming Language :: Python :: 3.9
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Environment :: Console
18
+ Requires-Python: >=3.8
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Requires-Dist: pandas==1.1.5; python_version == "3.6"
22
+ Requires-Dist: pandas==1.3.4; python_version == "3.7"
23
+ Requires-Dist: pandas<2.1.0,>=1.3.4; python_version == "3.8"
24
+ Requires-Dist: pandas<2.3.0,>=1.3.4; python_version == "3.9"
25
+ Requires-Dist: pandas<2.3.0,>=1.5.1; python_version == "3.10"
26
+ Requires-Dist: pandas<2.3.0,>=1.5.3; python_version == "3.11"
27
+ Requires-Dist: pandas<2.3.0,>=2.2.0; python_version >= "3.12"
28
+ Requires-Dist: pyarrow; python_version >= "3.12"
29
+ Requires-Dist: numpy==1.19.5; python_version <= "3.7"
30
+ Requires-Dist: numpy==1.21.6; python_version == "3.8"
31
+ Requires-Dist: numpy<2.3.0,>=1.20.3; python_version >= "3.9"
32
+ Requires-Dist: coolname
33
+ Requires-Dist: python-dateutil
34
+ Requires-Dist: python-dotenv
35
+ Requires-Dist: tzlocal
36
+ Requires-Dist: tzdata
37
+ Requires-Dist: backports.zoneinfo==0.2.1; python_version < "3.9"
38
+ Requires-Dist: typing_extensions==4.7.1; python_version < "3.8"
39
+ Requires-Dist: singledispatchmethod==1.0; python_version < "3.8"
40
+ Requires-Dist: backports.cached-property==1.0.2; python_version <= "3.8"
41
+ Requires-Dist: backports.functools-lru-cache==1.6.6; python_version <= "3.8"
42
+ Requires-Dist: astunparse==1.6.3; python_version <= "3.8"
43
+ Requires-Dist: graphviz==0.20.1; python_version > "3.6"
44
+ Requires-Dist: packaging>=21.0
45
+ Provides-Extra: strict
46
+ Requires-Dist: numpy==1.19.5; python_version <= "3.7" and extra == "strict"
47
+ Requires-Dist: numpy==1.21.6; python_version == "3.8" and extra == "strict"
48
+ Requires-Dist: numpy==1.23.0; (python_version >= "3.9" and python_version <= "3.10") and extra == "strict"
49
+ Requires-Dist: numpy==1.26.4; (python_version >= "3.11" and python_version <= "3.12") and extra == "strict"
50
+ Requires-Dist: pandas==1.1.5; python_version == "3.6" and extra == "strict"
51
+ Requires-Dist: pandas==1.3.4; (python_version >= "3.7" and python_version <= "3.9") and extra == "strict"
52
+ Requires-Dist: pandas==1.5.1; python_version == "3.10" and extra == "strict"
53
+ Requires-Dist: pandas==1.5.3; python_version == "3.11" and extra == "strict"
54
+ Requires-Dist: pandas==2.2.0; python_version >= "3.12" and extra == "strict"
55
+ Provides-Extra: webapi
56
+ Requires-Dist: onetick.query_webapi; extra == "webapi"
57
+ Provides-Extra: polars
58
+ Requires-Dist: polars==1.12.0; extra == "polars"
59
+ Dynamic: license-file
60
+ Dynamic: provides-extra
61
+ Dynamic: requires-dist
62
+
63
+ # Overview
64
+
65
+ ``onetick.py`` is a versatile and efficient Python library designed for handling tick data with ease.
66
+ It harnesses the power of OneTick, the industry-leading tick analytics technology, to process tick
67
+ data at unparalleled speeds. This library is tailored both for existing OneTick users,
68
+ as a Python interface into OneTick, and for new users who seek an intuitive tool for tick data analysis
69
+ that comes with tick data from 200+ exchanges.
70
+
71
+ The primary strength of ``onetick.py`` lies in its similarity to the popular Python library, Pandas.
72
+ Users familiar with Pandas find ``onetick.py`` easy to learn. In particular, ``onetick.py`` users
73
+ can think in terms of Python expressions, built-ins, and native math operations on tick fields.
74
+
75
+ ``onetick.py`` goes far beyond the functionality that exists in Pandas exposing all of the power of OneTick
76
+ (decades of development for the capital markets use cases) in a Pandas-like style. Crucially, the
77
+ Pandas-like syntax is translated into the OneTick query language, executing on the high-performance
78
+ OneTick tick server engine. In a nutshell, ``onetick.py`` combines the ease of use of Python
79
+ with the performance of OneTick.
80
+
81
+ ## Installation
82
+
83
+ The latest version of ``onetick-py`` is available on PyPI: <https://pypi.org/project/onetick-py/>.
84
+
85
+ pip install onetick-py[webapi]
86
+
87
+ Use ``webapi`` extra to easily use it with remote OneTick Cloud server.
88
+
89
+ See [Getting Started](https://docs.pip.distribution.sol.onetick.com/static/getting_started/root.html)
90
+ section in the documentation to see how quickly set up ``onetick-py`` configuration
91
+ and authentication and start running queries.
92
+
93
+ For other installation options, including using ``onetick-py`` with locally installed OneTick server,
94
+ see [Installation](https://docs.pip.distribution.sol.onetick.com/static/installation/webapi.html)
95
+ section in the documentation.
96
+
97
+ ## Key Features
98
+
99
+ - **Pandas-like API**: Familiar syntax and functions for those accustomed to Pandas.
100
+ - **High-Performance**: Executes complex queries rapidly using the underlying OneTick C++ engine.
101
+ - **Real-time processing / CEP**: Same intuitive syntax for real-time and historical analytics.
102
+ - **Convenient Data Inspection and Testing**: Integrated tools for debugging, data inspection, and testing with pytest.
103
+ - **Enterprise-Grade Features**: Includes support for authentication, access control, encryption, and entitlements.
104
+ - **Comprehensive Documentation**: Public multiversion documentation with examples, guides, and use cases.
105
+
106
+ ## Applications
107
+
108
+ - **TCA / BestEx**: Quickly implement your own TCA / BestEx analytics.
109
+ - **Quant research**: Ideal for complex, high-performance tick data analysis.
110
+ - **Algorithmic Trading**: Efficient for developing and testing trading algorithms.
111
+ - **Data Visualization**: Compatible with OneTick's visualization tool, OneTick Dashboard.
112
+ - **Machine Learning**: Integrates with the OneTick ML library [onetick-ml](https://dsframework.pip.distribution.sol.onetick.com/intro.html).
113
+ - **Industry Applications**: Industry leading OneTick's Trade Surveillance and BestEx/TCA solutions are written in ``onetick.py``.
114
+
115
+ ## Advantages Over Competitors
116
+
117
+ - **Ease of Use**: The only language that provides the performance of a DSL without having to learn a new syntax.
118
+ - **Performance**: Demonstrates superior performance and memory efficiency compared to similar tools.
119
+ - **Parallel Processing**: Natively parallelizable by security and by day.
120
+ - **Production-Ready**: Ideal for debugging, testing, and CI/CD.
121
+
122
+ ## Ways to use ``onetick.py``
123
+
124
+ ``onetick.py`` can be used to analyze data managed and hosted by OneTick or managed and
125
+ hosted by the customer in a local OneTick installation.
126
+
127
+ ### Hosted OneTick
128
+
129
+ - Hosted OneTick comes with high quality tick data, daily data, and reference data for 200+ global markets.
130
+ - OneTick offers T+1 and real-time tick data that is normalized and quality checked.
131
+ - OneTick supports a variety of symbologies and handles corporate action adjustments.
132
+ - The installation is a simple ``pip install`` (details [here](https://docs.pip.distribution.sol.onetick.com/static/installation/webapi.html)).
133
+
134
+ ### Local OneTick
135
+
136
+ - Manage all of your market data and order flow in the industry-leading tick management platform OneTick.
137
+ - Have your users access and analyze the data via a simple and intuitive ``onetick.py`` API.
138
+ - Managed services options are available.
139
+ - Installation details are [here](https://docs.pip.distribution.sol.onetick.com/static/installation/onprem.html).
140
+
141
+ ## OneTick
142
+
143
+ ``onetick-py`` is part of a bigger tick management OneTick ecosystem. You may want to turn to OneTick for
144
+
145
+ - Visual query designer.
146
+ - Collecting, loading, and storing tick data.
147
+ - Other APIs including C++, C#, Java, R, Matlab.
148
+ - Learn more at [onetick.com/onetick-tick-analytics-platform](https://www.onetick.com/onetick-tick-analytics-platform).
@@ -0,0 +1,86 @@
1
+ # Overview
2
+
3
+ ``onetick.py`` is a versatile and efficient Python library designed for handling tick data with ease.
4
+ It harnesses the power of OneTick, the industry-leading tick analytics technology, to process tick
5
+ data at unparalleled speeds. This library is tailored both for existing OneTick users,
6
+ as a Python interface into OneTick, and for new users who seek an intuitive tool for tick data analysis
7
+ that comes with tick data from 200+ exchanges.
8
+
9
+ The primary strength of ``onetick.py`` lies in its similarity to the popular Python library, Pandas.
10
+ Users familiar with Pandas find ``onetick.py`` easy to learn. In particular, ``onetick.py`` users
11
+ can think in terms of Python expressions, built-ins, and native math operations on tick fields.
12
+
13
+ ``onetick.py`` goes far beyond the functionality that exists in Pandas exposing all of the power of OneTick
14
+ (decades of development for the capital markets use cases) in a Pandas-like style. Crucially, the
15
+ Pandas-like syntax is translated into the OneTick query language, executing on the high-performance
16
+ OneTick tick server engine. In a nutshell, ``onetick.py`` combines the ease of use of Python
17
+ with the performance of OneTick.
18
+
19
+ ## Installation
20
+
21
+ The latest version of ``onetick-py`` is available on PyPI: <https://pypi.org/project/onetick-py/>.
22
+
23
+ pip install onetick-py[webapi]
24
+
25
+ Use ``webapi`` extra to easily use it with remote OneTick Cloud server.
26
+
27
+ See [Getting Started](https://docs.pip.distribution.sol.onetick.com/static/getting_started/root.html)
28
+ section in the documentation to see how quickly set up ``onetick-py`` configuration
29
+ and authentication and start running queries.
30
+
31
+ For other installation options, including using ``onetick-py`` with locally installed OneTick server,
32
+ see [Installation](https://docs.pip.distribution.sol.onetick.com/static/installation/webapi.html)
33
+ section in the documentation.
34
+
35
+ ## Key Features
36
+
37
+ - **Pandas-like API**: Familiar syntax and functions for those accustomed to Pandas.
38
+ - **High-Performance**: Executes complex queries rapidly using the underlying OneTick C++ engine.
39
+ - **Real-time processing / CEP**: Same intuitive syntax for real-time and historical analytics.
40
+ - **Convenient Data Inspection and Testing**: Integrated tools for debugging, data inspection, and testing with pytest.
41
+ - **Enterprise-Grade Features**: Includes support for authentication, access control, encryption, and entitlements.
42
+ - **Comprehensive Documentation**: Public multiversion documentation with examples, guides, and use cases.
43
+
44
+ ## Applications
45
+
46
+ - **TCA / BestEx**: Quickly implement your own TCA / BestEx analytics.
47
+ - **Quant research**: Ideal for complex, high-performance tick data analysis.
48
+ - **Algorithmic Trading**: Efficient for developing and testing trading algorithms.
49
+ - **Data Visualization**: Compatible with OneTick's visualization tool, OneTick Dashboard.
50
+ - **Machine Learning**: Integrates with the OneTick ML library [onetick-ml](https://dsframework.pip.distribution.sol.onetick.com/intro.html).
51
+ - **Industry Applications**: Industry leading OneTick's Trade Surveillance and BestEx/TCA solutions are written in ``onetick.py``.
52
+
53
+ ## Advantages Over Competitors
54
+
55
+ - **Ease of Use**: The only language that provides the performance of a DSL without having to learn a new syntax.
56
+ - **Performance**: Demonstrates superior performance and memory efficiency compared to similar tools.
57
+ - **Parallel Processing**: Natively parallelizable by security and by day.
58
+ - **Production-Ready**: Ideal for debugging, testing, and CI/CD.
59
+
60
+ ## Ways to use ``onetick.py``
61
+
62
+ ``onetick.py`` can be used to analyze data managed and hosted by OneTick or managed and
63
+ hosted by the customer in a local OneTick installation.
64
+
65
+ ### Hosted OneTick
66
+
67
+ - Hosted OneTick comes with high quality tick data, daily data, and reference data for 200+ global markets.
68
+ - OneTick offers T+1 and real-time tick data that is normalized and quality checked.
69
+ - OneTick supports a variety of symbologies and handles corporate action adjustments.
70
+ - The installation is a simple ``pip install`` (details [here](https://docs.pip.distribution.sol.onetick.com/static/installation/webapi.html)).
71
+
72
+ ### Local OneTick
73
+
74
+ - Manage all of your market data and order flow in the industry-leading tick management platform OneTick.
75
+ - Have your users access and analyze the data via a simple and intuitive ``onetick.py`` API.
76
+ - Managed services options are available.
77
+ - Installation details are [here](https://docs.pip.distribution.sol.onetick.com/static/installation/onprem.html).
78
+
79
+ ## OneTick
80
+
81
+ ``onetick-py`` is part of a bigger tick management OneTick ecosystem. You may want to turn to OneTick for
82
+
83
+ - Visual query designer.
84
+ - Collecting, loading, and storing tick data.
85
+ - Other APIs including C++, C#, Java, R, Matlab.
86
+ - Learn more at [onetick.com/onetick-tick-analytics-platform](https://www.onetick.com/onetick-tick-analytics-platform).
@@ -0,0 +1,46 @@
1
+ [build-system]
2
+ requires = [
3
+ "setuptools",
4
+ ]
5
+ build-backend = "setuptools.build_meta"
6
+
7
+ [project]
8
+ name = "onetick-py"
9
+ description = "Python package that allows you to work with OneTick"
10
+ readme = {file = "README.md", content-type = "text/markdown"}
11
+ authors = [
12
+ {name = "solutions", email="solutions@onetick.com"},
13
+ ]
14
+ dynamic = [
15
+ "version",
16
+ "scripts",
17
+ "dependencies",
18
+ "optional-dependencies",
19
+ ]
20
+ license = "MIT"
21
+ license-files = ["LICENSE"]
22
+ requires-python = ">= 3.8"
23
+ classifiers = [
24
+ "Topic :: Database :: Front-Ends",
25
+ "Topic :: Scientific/Engineering",
26
+ "Programming Language :: Python :: 3.8",
27
+ "Programming Language :: Python :: 3.9",
28
+ "Programming Language :: Python :: 3.10",
29
+ "Programming Language :: Python :: 3.11",
30
+ "Programming Language :: Python :: 3.12",
31
+ "Operating System :: OS Independent",
32
+ "Environment :: Console",
33
+ ]
34
+
35
+ [project.urls]
36
+ Documentation = "https://docs.pip.distribution.sol.onetick.com"
37
+ OneTick = "https://onetick.com/"
38
+
39
+ [tool.setuptools.packages.find]
40
+ where = ["src"]
41
+
42
+ [tool.setuptools.package-data]
43
+ "*" = ["**/_per_tick_scripts/*.script"]
44
+
45
+ [tool.black]
46
+ line-length = 120
@@ -0,0 +1,9 @@
1
+ numpy==1.19.5; python_version <= '3.7'
2
+ numpy==1.21.6; python_version == '3.8'
3
+ numpy==1.23.0; python_version >= '3.9' and python_version <= '3.10'
4
+ numpy==1.26.4; python_version >= '3.11' and python_version <= '3.12'
5
+ pandas==1.1.5; python_version == '3.6'
6
+ pandas==1.3.4; python_version >= '3.7' and python_version <= '3.9'
7
+ pandas==1.5.1; python_version == '3.10'
8
+ pandas==1.5.3; python_version == '3.11'
9
+ pandas==2.2.0; python_version >= '3.12'
@@ -0,0 +1,32 @@
1
+ # open source packages
2
+ pandas==1.1.5; python_version == '3.6'
3
+ pandas==1.3.4; python_version == '3.7'
4
+ pandas >= 1.3.4, < 2.1.0; python_version == '3.8'
5
+ pandas >= 1.3.4, < 2.3.0; python_version == '3.9'
6
+ pandas >= 1.5.1, < 2.3.0; python_version == '3.10'
7
+ pandas >= 1.5.3, < 2.3.0; python_version == '3.11'
8
+ pandas >= 2.2.0, < 2.3.0; python_version >= '3.12'
9
+
10
+ # required by pandas, otherwise produces DeprecationWarning
11
+ pyarrow; python_version >= '3.12'
12
+
13
+ numpy==1.19.5; python_version <= '3.7'
14
+ numpy==1.21.6; python_version == '3.8'
15
+ numpy >= 1.20.3, < 2.3.0; python_version >= '3.9'
16
+
17
+ coolname
18
+ python-dateutil
19
+ python-dotenv
20
+ tzlocal
21
+ tzdata
22
+
23
+ # backports
24
+ backports.zoneinfo==0.2.1; python_version < '3.9'
25
+ typing_extensions==4.7.1; python_version < '3.8'
26
+ singledispatchmethod==1.0; python_version < '3.8'
27
+ backports.cached-property==1.0.2; python_version <= '3.8'
28
+ backports.functools-lru-cache==1.6.6; python_version <= '3.8'
29
+ astunparse==1.6.3; python_version <= '3.8'
30
+
31
+ graphviz==0.20.1; python_version > '3.6'
32
+ packaging >= 21.0
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,36 @@
1
+ from pathlib import Path
2
+ from setuptools import setup
3
+
4
+
5
+ with open('src/onetick/py/_version.py') as f:
6
+ version = None
7
+ for line in f:
8
+ if line.startswith('#'):
9
+ continue
10
+ _, _, version = line.partition('=')
11
+ version = version.strip().strip("'").strip('"')
12
+ if not version:
13
+ raise RuntimeError("Can't find version in src/onetick/py/_version.py")
14
+
15
+ with open('requirements.txt') as f:
16
+ required = f.read().splitlines()
17
+
18
+ strict_requirements = Path('requirements.strict.txt').read_text().splitlines()
19
+
20
+ setup(name='onetick-py',
21
+ version=version,
22
+ install_requires=required,
23
+ extras_require={
24
+ 'strict': strict_requirements,
25
+ 'webapi': [
26
+ 'onetick.query_webapi',
27
+ ],
28
+ 'polars': [
29
+ 'polars==1.12.0',
30
+ ]
31
+ },
32
+ entry_points={
33
+ 'console_scripts': [
34
+ 'jupyter-onetick_snippets = onetick.doc_utilities.snippets:main',
35
+ ],
36
+ })
File without changes
@@ -0,0 +1,73 @@
1
+ from locator_parser.common import Entity
2
+ from locator_parser.actions import DoNothing
3
+
4
+
5
+ class Allow(Entity):
6
+ TAG = "ALLOW"
7
+ SINGLE = True
8
+
9
+
10
+ class DB(Entity):
11
+ TAG = "DB"
12
+ HAS_PROPERTIES = True
13
+ CHILDREN = [Allow]
14
+
15
+
16
+ class DBs(Entity):
17
+ TAG = "DATABASES"
18
+ CHILDREN = [DB]
19
+
20
+
21
+ class User(Entity):
22
+ TAG = "USER"
23
+ SINGLE = True
24
+
25
+
26
+ class Role(Entity):
27
+ TAG = "ROLE"
28
+ HAS_PROPERTIES = True
29
+ CHILDREN = [User]
30
+
31
+
32
+ class Roles(Entity):
33
+ TAG = "ROLES"
34
+ CHILDREN = [Role]
35
+
36
+
37
+ class EP(Entity):
38
+ TAG = "EP"
39
+ HAS_PROPERTIES = True
40
+ CHILDREN = [Allow]
41
+
42
+
43
+ class EPs(Entity):
44
+ TAG = "EVENT_PROCESSORS"
45
+ CHILDREN = [EP]
46
+
47
+
48
+ def parse_acl(reader, writer, action=DoNothing()):
49
+ writer.refresh()
50
+ reader.set_writer(writer)
51
+
52
+ roles_p = Roles()
53
+ databases_p = DBs()
54
+ eps_p = EPs()
55
+
56
+ for _ in reader:
57
+ roles_p(reader, writer, action)
58
+ databases_p(reader, writer, action)
59
+ eps_p(reader, writer, action)
60
+
61
+
62
+ # ----------------------------------------- #
63
+ # set parent
64
+ for _, cls in list(globals().items()):
65
+ try:
66
+ if issubclass(cls, Entity) and cls != Entity:
67
+ for child in cls.CHILDREN:
68
+ child.PARENT = Entity
69
+
70
+ if not cls.HAS_PROPERTIES and not cls.SINGLE:
71
+ child.PARENT = cls
72
+ except Exception:
73
+ continue