hogql-parser 1.2.13__cp312-cp312-macosx_13_0_x86_64.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.
@@ -0,0 +1,35 @@
1
+ Metadata-Version: 2.4
2
+ Name: hogql_parser
3
+ Version: 1.2.13
4
+ Summary: HogQL parser for internal PostHog use
5
+ Home-page: https://github.com/PostHog/posthog/tree/master/common/hogql_parser
6
+ Author: PostHog Inc.
7
+ Author-email: hey@posthog.com
8
+ Maintainer: PostHog Inc.
9
+ Maintainer-email: hey@posthog.com
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Operating System :: MacOS
13
+ Classifier: Operating System :: POSIX :: Linux
14
+ Classifier: Programming Language :: Python
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Requires-Python: >=3.10
19
+ Description-Content-Type: text/markdown
20
+ Dynamic: author
21
+ Dynamic: author-email
22
+ Dynamic: classifier
23
+ Dynamic: description
24
+ Dynamic: description-content-type
25
+ Dynamic: home-page
26
+ Dynamic: maintainer
27
+ Dynamic: maintainer-email
28
+ Dynamic: requires-python
29
+ Dynamic: summary
30
+
31
+ # HogQL Parser
32
+
33
+ Blazing fast HogQL parsing. This package can only work in the context of the PostHog Django app, as it imports from `posthog.hogql`.
34
+
35
+ You can test changes locally by running `pip install ./hogql_parser`
@@ -0,0 +1,7 @@
1
+ hogql_parser.cpython-312-darwin.so,sha256=6wPhH83cf4lfrZxoFlbSEIDFNbTqqxKr-woflKHHbh0,1172272
2
+ hogql_parser-1.2.13.dist-info/RECORD,,
3
+ hogql_parser-1.2.13.dist-info/WHEEL,sha256=teO2xh-FJ1HNVGe5DhoP69xaQDzWk7o1JLSQ2CMfYdA,137
4
+ hogql_parser-1.2.13.dist-info/top_level.txt,sha256=_zQ0sWliIKqAQne95N3DqKdj6b7Vo6qG9iVgNgV7t8s,32
5
+ hogql_parser-1.2.13.dist-info/METADATA,sha256=n1NDKeqi1_ucvNC4nMJPmL5TJDjBSmE_zDHRZp7ZLik,1184
6
+ hogql_parser.dylibs/libantlr4-runtime.4.13.2.dylib,sha256=_DIoNsbmJcO9koyiStag8JI_MW7ONDDiL3VcE1D1oW0,870544
7
+ hogql_parser-stubs/__init__.pyi,sha256=SBt-9lpd3hqSAD3RFjMqNc2P41IGke3hOfZhrNh4_jg,1436
@@ -0,0 +1,6 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: false
4
+ Tag: cp312-cp312-macosx_13_0_x86_64
5
+ Generator: delocate 0.13.0
6
+
@@ -0,0 +1,2 @@
1
+ hogql_parser
2
+ hogql_parser-stubs
@@ -0,0 +1,44 @@
1
+ from posthog.hogql.ast import Program, SelectQuery, SelectSetQuery
2
+ from posthog.hogql.base import AST
3
+
4
+ def parse_expr(expr: str, /, *, is_internal: bool = False) -> AST:
5
+ """Parse the HogQL expression string into an AST.
6
+
7
+ If the expr `is_internal`, spans and notices won't be included in the AST.
8
+ """
9
+ ...
10
+
11
+ def parse_order_expr(expr: str, /, *, is_internal: bool = False) -> AST:
12
+ """Parse the ORDER BY clause string into an AST.
13
+
14
+ If the expr `is_internal`, spans and notices won't be included in the AST.
15
+ """
16
+ ...
17
+
18
+ def parse_select(expr: str, /, *, is_internal: bool = False) -> SelectQuery | SelectSetQuery:
19
+ """Parse the HogQL SELECT statement string into an AST.
20
+
21
+ If the expr `is_internal`, spans and notices won't be included in the AST.
22
+ """
23
+ ...
24
+
25
+ def parse_full_template_string(expr: str, /, *, is_internal: bool = False) -> AST:
26
+ """Parse a Hog template string into an AST.
27
+
28
+ If the expr `is_internal`, spans and notices won't be included in the AST.
29
+ """
30
+ ...
31
+
32
+ def parse_string_literal_text(value: str, /) -> str:
33
+ """Unquote the string (an identifier or a string literal).
34
+
35
+ If the expr is `internal`, spans and notices won't be included in the AST.
36
+ """
37
+ ...
38
+
39
+ def parse_program(source: str, /, *, is_internal: bool = False) -> Program:
40
+ """Parse a Hog program.
41
+
42
+ If the expr `is_internal`, spans and notices won't be included in the AST.
43
+ """
44
+ ...
Binary file