sql-impressao 1.0.0__cp313-cp313-win_amd64.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.
rust-toolchain.toml ADDED
@@ -0,0 +1,2 @@
1
+ [toolchain]
2
+ channel = "1.81"
@@ -0,0 +1,5 @@
1
+ from .sql_impressao import *
2
+
3
+ __doc__ = sql_impressao.__doc__
4
+ if hasattr(sql_impressao, "__all__"):
5
+ __all__ = sql_impressao.__all__
@@ -0,0 +1,119 @@
1
+ Metadata-Version: 2.4
2
+ Name: sql-impressao
3
+ Version: 1.0.0
4
+ Classifier: Development Status :: 5 - Production/Stable
5
+ Classifier: Framework :: Django
6
+ Classifier: Intended Audience :: Developers
7
+ Classifier: License :: OSI Approved :: MIT License
8
+ Classifier: Natural Language :: English
9
+ Classifier: Operating System :: OS Independent
10
+ Classifier: Programming Language :: Python :: 3 :: Only
11
+ Classifier: Programming Language :: Python :: 3.9
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ License-File: LICENSE
17
+ Summary: A SQL fingerprinter.
18
+ Keywords: SQL
19
+ Author-email: Adam Johnson <me@adamj.eu>
20
+ Requires-Python: >=3.9
21
+ Description-Content-Type: text/x-rst; charset=UTF-8
22
+ Project-URL: Changelog, https://github.com/adamchainz/sql-impressao/blob/main/CHANGELOG.rst
23
+ Project-URL: Funding, https://adamj.eu/books/
24
+ Project-URL: Repository, https://github.com/adamchainz/sql-impressao
25
+
26
+ =============
27
+ sql-impressao
28
+ =============
29
+
30
+ .. image:: https://img.shields.io/github/actions/workflow/status/adamchainz/sql-impressao/main.yml.svg?branch=main&style=for-the-badge
31
+ :target: https://github.com/adamchainz/sql-impressao/actions?workflow=CI
32
+
33
+ .. image:: https://img.shields.io/pypi/v/sql-impressao.svg?style=for-the-badge
34
+ :target: https://pypi.org/project/sql-impressao/
35
+
36
+ .. image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white&style=for-the-badge
37
+ :target: https://github.com/pre-commit/pre-commit
38
+ :alt: pre-commit
39
+
40
+ Python bindings for `sql-fingerprint <https://github.com/adamchainz/sql-fingerprint>`__, a SQL fingerprinter.
41
+ (*Impressão digital* is Portuguese for “fingerprint”.)
42
+
43
+ A quick example:
44
+
45
+ .. code-block:: python-console
46
+
47
+ >>> from sql_impressao import fingerprint_one
48
+ >>> fingerprint_one('SELECT a, b FROM cheeses WHERE origin = "France" ORDER BY age DESC')
49
+ 'SELECT ... FROM cheeses WHERE ... ORDER BY ...'
50
+
51
+ ----
52
+
53
+ **Improve your Django and Git skills** with `my books <https://adamj.eu/books/>`__.
54
+
55
+ ----
56
+
57
+ Installation
58
+ ============
59
+
60
+ With **pip**:
61
+
62
+ .. code-block:: sh
63
+
64
+ python -m pip install sql-impressao
65
+
66
+ Python 3.9 to 3.13 supported.
67
+
68
+ Usage
69
+ =====
70
+
71
+ ``fingerprint_one(sql: str, *, dialect: str | None = None) -> str``
72
+ -------------------------------------------------------------------
73
+
74
+ Generate the fingerprint for a single SQL string.
75
+
76
+ ``sql`` is the SQL string to fingerprint.
77
+ It may contain multiple statements separated by semicolons.
78
+
79
+ ``dialect`` is an optional string that specifies the SQL dialect to use.
80
+ Supported names include:
81
+
82
+ * ``generic`` - the default, a generic SQL dialect.
83
+ * ``mysql`` - MySQL dialect.
84
+ * ``postgresql`` or ``postgres`` - PostgreSQL dialect.
85
+ * ``sqlite`` - SQLite dialect.
86
+
87
+ See the `source of the underlying function <https://github.com/apache/datafusion-sqlparser-rs/blob/776b10afe608a88811b807ab795831d55f186ee3/src/dialect/mod.rs#L1038-L1059>`__ for a full list.
88
+
89
+ Example:
90
+
91
+ .. code-block:: python
92
+
93
+ from sql_impressao import fingerprint_one
94
+
95
+ sql = 'SELECT a, b FROM cheeses WHERE origin = "France" ORDER BY age DESC'
96
+ fingerprint = fingerprint_one(sql)
97
+ assert fingerprint == "SELECT ... FROM cheeses WHERE ... ORDER BY ..."
98
+
99
+ ``fingerprint_many(sql: list[str], *, dialect: str | None = None) -> list[str]``
100
+ --------------------------------------------------------------------------------
101
+
102
+ Generate the fingerprints for a list of SQL strings.
103
+ Doing so for a batch of strings allows sharing some state, such as savepoint ID aliases.
104
+
105
+ ``sql`` is a list of SQL strings to fingerprint.
106
+ Each string may contain multiple statements separated by semicolons.
107
+
108
+ ``dialect`` is an optional string that specifies the SQL dialect to use, as above.
109
+
110
+ Example:
111
+
112
+ .. code-block:: python
113
+
114
+ from sql_impressao import fingerprint_many
115
+
116
+ sqls = ["SELECT a, b FROM c", "SELECT b, c FROM d"]
117
+ fingerprints = fingerprint_many(sqls)
118
+ assert fingerprints == ["SELECT ... FROM c", "SELECT ... FROM d"]
119
+
@@ -0,0 +1,7 @@
1
+ sql_impressao-1.0.0.dist-info/METADATA,sha256=u_W-jW4yjy3FCWXZ6pudI01FBjWMZ1bAKHBLNgsT74Q,4154
2
+ sql_impressao-1.0.0.dist-info/WHEEL,sha256=6gg8M7kMeWmDzkhJuJzWLhBYdt7OGDF81wlSJjN85_E,96
3
+ sql_impressao-1.0.0.dist-info/licenses/LICENSE,sha256=Y8m99VQIwLGhEysJgQo8isGs30MVhcrkOFklqK9C2ik,1090
4
+ rust-toolchain.toml,sha256=feZgzJbUe2qE8vLd6V0CevHqfgLedEINmW2fBFdp0qk,31
5
+ sql_impressao/__init__.py,sha256=P-j0dQhlhHg9uiny7r5GqlhTRNFwasYLGLA9kjAc0sU,135
6
+ sql_impressao/sql_impressao.cp313-win_amd64.pyd,sha256=9mi9LUHNMyeq9cOSdc-RDHsi1U-xW69mE2ssXcSzkHE,4707328
7
+ sql_impressao-1.0.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.8.3)
3
+ Root-Is-Purelib: false
4
+ Tag: cp313-cp313-win_amd64
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Adam Johnson
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.