hogql-parser 1.3.4__cp312-cp312-macosx_14_0_arm64.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.

Potentially problematic release.


This version of hogql-parser might be problematic. Click here for more details.

@@ -0,0 +1,36 @@
1
+ Metadata-Version: 2.4
2
+ Name: hogql_parser
3
+ Version: 1.3.4
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
+ License: MIT
11
+ Classifier: Development Status :: 5 - Production/Stable
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: license
27
+ Dynamic: maintainer
28
+ Dynamic: maintainer-email
29
+ Dynamic: requires-python
30
+ Dynamic: summary
31
+
32
+ # HogQL Parser
33
+
34
+ Blazing fast HogQL parsing. This package can only work in the context of the PostHog Django app, as it imports from `posthog.hogql`.
35
+
36
+ You can test changes locally by running `pip install ./hogql_parser`
@@ -0,0 +1,7 @@
1
+ hogql_parser.cpython-312-darwin.so,sha256=5ENAVLwe89EG8Nphp8XDQnf09eSvjqKC6g6KMJxpLN4,1413232
2
+ hogql_parser.dylibs/libantlr4-runtime.4.13.2.dylib,sha256=kWneUwucCYh2eb0m7Ry1sP_QVXpOzJ9BfbHLN-ry3qc,881920
3
+ hogql_parser-stubs/__init__.pyi,sha256=nZ7bOGDxG4b78VuWjeqR3fagwJGf92e1gZ9ivPFLXJ8,2585
4
+ hogql_parser-1.3.4.dist-info/RECORD,,
5
+ hogql_parser-1.3.4.dist-info/WHEEL,sha256=VrhWOWJdu4wN9IKhAFBqWPMo6yuww-SFg9GbWc0qbmI,136
6
+ hogql_parser-1.3.4.dist-info/top_level.txt,sha256=_zQ0sWliIKqAQne95N3DqKdj6b7Vo6qG9iVgNgV7t8s,32
7
+ hogql_parser-1.3.4.dist-info/METADATA,sha256=81v9ywKwcnfMcEIz_od1DjddEdkgQBzE0x_HA10ZWq8,1162
@@ -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_14_0_arm64
5
+ Generator: delocate 0.13.0
6
+
@@ -0,0 +1,2 @@
1
+ hogql_parser
2
+ hogql_parser-stubs
@@ -0,0 +1,79 @@
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
+ ...
45
+
46
+ def parse_expr_json(expr: str, /, *, is_internal: bool = False) -> str:
47
+ """Parse the HogQL expression string into a JSON AST.
48
+
49
+ If the expr `is_internal`, spans and notices won't be included in the AST.
50
+ """
51
+ ...
52
+
53
+ def parse_order_expr_json(expr: str, /, *, is_internal: bool = False) -> str:
54
+ """Parse the ORDER BY clause string into a JSON AST.
55
+
56
+ If the expr `is_internal`, spans and notices won't be included in the AST.
57
+ """
58
+ ...
59
+
60
+ def parse_select_json(expr: str, /, *, is_internal: bool = False) -> str:
61
+ """Parse the HogQL SELECT statement string into a JSON AST.
62
+
63
+ If the expr `is_internal`, spans and notices won't be included in the AST.
64
+ """
65
+ ...
66
+
67
+ def parse_full_template_string_json(expr: str, /, *, is_internal: bool = False) -> str:
68
+ """Parse a Hog template string into a JSON AST.
69
+
70
+ If the expr `is_internal`, spans and notices won't be included in the AST.
71
+ """
72
+ ...
73
+
74
+ def parse_program_json(source: str, /, *, is_internal: bool = False) -> str:
75
+ """Parse a Hog program into a JSON AST.
76
+
77
+ If the expr `is_internal`, spans and notices won't be included in the AST.
78
+ """
79
+ ...
Binary file