PySqlParse
Find table names and other information in a SQL query
Installation
pip3 install pysqlparse
Use
Import
from pysqlparse import parser
...
get_table_names
Returns a set of all table names (without aliases) found in the SQL string.
from pysqlparse import parser
print(parser.get_table_names('''
SELECT *
FROM requests.by_account m
INNER JOIN customer_data.styles s ON m.version = s.id
LEFT JOIN profiles.users u ON m.csm = u.id
'''))
Returns:
{'request.by_account', 'customer_data.styles', 'profiles.users'}
Metadata
Release files for pysqlparse 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pysqlparse-0.0.2.tar.gz | 5.7 kB | Without provenance | Details for pysqlparse-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pysqlparse-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for pysqlparse-0.0.2-py3-none-any.whl |
Total release size: 11.9 kB
Release files / pysqlparse-0.0.2.tar.gz
| Download URL | pysqlparse-0.0.2.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2073e2361e629104356fade4cc4126adb8c0c4ae734baa22047c89f17ddfe41a
|
|
BLAKE2b-256 checksum How to use checksums |
5675a07aa2f2f0ca30b3d32b73a66978c271f93476e411d5f37a57ea740a26a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.9
|
Release files / pysqlparse-0.0.2-py3-none-any.whl
| Download URL | pysqlparse-0.0.2-py3-none-any.whl |
|---|---|
| Size | 6.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
add4843b2ddd550f006899005b3e22cca610f0ddec8fb8585738d45cf22e8b33
|
|
BLAKE2b-256 checksum How to use checksums |
3a7111bd1ae39b4a04dc8ea5931bda0ff09925ead815211caa8fa1db975e418c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.9
|
Security for pysqlparse 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.