ransacklib 0.1.10__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.
- ransack/__init__.py +15 -0
- ransack/exceptions.py +118 -0
- ransack/function.py +38 -0
- ransack/operator.py +500 -0
- ransack/parser.py +174 -0
- ransack/py.typed +0 -0
- ransack/transformer.py +846 -0
- ransacklib-0.1.10.dist-info/METADATA +60 -0
- ransacklib-0.1.10.dist-info/RECORD +12 -0
- ransacklib-0.1.10.dist-info/WHEEL +5 -0
- ransacklib-0.1.10.dist-info/licenses/LICENSE +21 -0
- ransacklib-0.1.10.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ransacklib
|
|
3
|
+
Version: 0.1.10
|
|
4
|
+
Summary: A modern, extensible language for manipulation with structured data
|
|
5
|
+
Author-email: "Rajmund H. Hruška" <rajmund.hruska@cesnet.cz>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Repository, https://gitlab.cesnet.cz/713/mentat/ransack
|
|
8
|
+
Project-URL: Documentation, https://ransack-125e0a.gitlab-pages.cesnet.cz/index.html
|
|
9
|
+
Project-URL: Issues, https://gitlab.cesnet.cz/713/mentat/ransack/-/issues
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Requires-Python: >=3.9
|
|
15
|
+
Description-Content-Type: text/x-rst
|
|
16
|
+
License-File: LICENSE
|
|
17
|
+
Requires-Dist: lark<1.3.0,>=1.2.2
|
|
18
|
+
Requires-Dist: ipranges<0.2,>=0.1.12
|
|
19
|
+
Provides-Extra: dev
|
|
20
|
+
Requires-Dist: pytest; extra == "dev"
|
|
21
|
+
Requires-Dist: pytest-cov; extra == "dev"
|
|
22
|
+
Requires-Dist: flake8; extra == "dev"
|
|
23
|
+
Requires-Dist: flake8-pytest-style; extra == "dev"
|
|
24
|
+
Requires-Dist: flake8-bugbear; extra == "dev"
|
|
25
|
+
Requires-Dist: sphinx; extra == "dev"
|
|
26
|
+
Requires-Dist: sphinx_rtd_theme; extra == "dev"
|
|
27
|
+
Requires-Dist: black; extra == "dev"
|
|
28
|
+
Requires-Dist: mypy; extra == "dev"
|
|
29
|
+
Requires-Dist: isort; extra == "dev"
|
|
30
|
+
Dynamic: license-file
|
|
31
|
+
|
|
32
|
+
Welcome to ransack
|
|
33
|
+
==================
|
|
34
|
+
|
|
35
|
+
**ransack** is a modern, extensible language for manipulation with structured data.
|
|
36
|
+
|
|
37
|
+
Structured data --- like `JSON <https://json.org>`_, `YAML <https://yaml.org/>`_, `TOML <https://toml.io/>`_ and domain-specific formats such as `IDEA <https://idea.cesnet.cz>`_ --- form the backbone of many modern applications. These formats appear in configuration files, security logs, telemetry systems, and beyond.
|
|
38
|
+
|
|
39
|
+
**ransack** was designed to meet the increasing need for a robust and expressive language to query, filter, and inspect structured data. Whether used in Python code, as part of a log analysis tool, or as a compiler frontend for other systems, **ransack** provides a flexible foundation.
|
|
40
|
+
|
|
41
|
+
Why ransack?
|
|
42
|
+
------------
|
|
43
|
+
|
|
44
|
+
ransack is a new implementation and improvement over existing libraries like *Pynspect*, which was widely used in security monitoring systems like `NEMEA <https://nemea.liberouter.org/>`_ and `Mentat <https://mentat.cesnet.cz>`_. Compared to older tools, ransack:
|
|
45
|
+
|
|
46
|
+
- supports **user-defined variables**
|
|
47
|
+
- enables **multi-argument functions**
|
|
48
|
+
- is **extensible** and **modular**
|
|
49
|
+
- supports **multiple backends** (e.g., Python evaluation, SQL translation)
|
|
50
|
+
- offers a clean internal architecture for future enhancements
|
|
51
|
+
|
|
52
|
+
Key features
|
|
53
|
+
------------
|
|
54
|
+
|
|
55
|
+
- a simple and expressive syntax for filters and conditions
|
|
56
|
+
- support for context-aware variables and data scoping
|
|
57
|
+
- predefined functions
|
|
58
|
+
- support for IPv4/IPv6, datetimes, string and list manipulation
|
|
59
|
+
- safe and maintainable implementation using `Lark <https://lark-parser.readthedocs.io/en/stable/>`_ for parsing
|
|
60
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
ransack/__init__.py,sha256=QLp0go5FdQXrASgnBNaNKTxEEst54OBWYVG3KgTkVCU,313
|
|
2
|
+
ransack/exceptions.py,sha256=GWV2XlgGYeuGr5I3gPL3vlmakacOg--lAtFCy5iQbsw,3741
|
|
3
|
+
ransack/function.py,sha256=u2WR0ZpwETR1MsZCpur680PExeWqH6phQLSTI0DloGI,1080
|
|
4
|
+
ransack/operator.py,sha256=hpdPNZdSxTqCl6il6j6PZnqMH6HniBCiAdhjqL-dbik,16201
|
|
5
|
+
ransack/parser.py,sha256=aovOrJ4ZKcb0rSn8LJm2GiQZkn9JBaWssAfQ0pj9gUo,7010
|
|
6
|
+
ransack/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
+
ransack/transformer.py,sha256=Ku9DjD3zy4Z1JJduwR_IqqLxmk9BvMct2mmxjzxNaR0,28272
|
|
8
|
+
ransacklib-0.1.10.dist-info/licenses/LICENSE,sha256=mUbyu3f_FVAKt9MzuOjDggjsvV-WtwgSPlKPe_xKRBo,1074
|
|
9
|
+
ransacklib-0.1.10.dist-info/METADATA,sha256=yDcMa86-7G-gME6hHei7GlIzeGRIdENF0NN4tDwhAkk,2887
|
|
10
|
+
ransacklib-0.1.10.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
|
|
11
|
+
ransacklib-0.1.10.dist-info/top_level.txt,sha256=qVBXu4XHhFMobvS9sDB-r6EQB6hwLQUEiSvX0N7DelM,8
|
|
12
|
+
ransacklib-0.1.10.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Rajmund H. Hruska
|
|
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 @@
|
|
|
1
|
+
ransack
|