Developers are struggling to execute a query and what if you need to execute another query somewhere else? That's a lot of code to rewrite again. You don't have to do this because QuickSQLConnector got you covered!. Quick SQL Connector is a python library that lets you execute MySQL, PostgreSQL, and SQLite queries with just one line of code.
Reducing 80% lines of code and get more done and it's all done in the same syntax with all SQL databases mentioned.
Installation 💿
USING PIP
pip install quicksqlconnector
FOR LINUX FRIENDS
python3 pip install quicksqlconnector
To update Quick SQL Connector to the latest version, add --upgrade flag to the above commands.
Write your first query.
Use 'quicksqlconnector' keyword to import
from quicksqlconnector import quicksqlconnector
Creating instance of module
DB = quicksqlconnector('database','host', port, 'username', 'password')
NOTE : If you're using SQLite, you must provide database file name as follows.
DB = quicksqlconnector('sqlite3', database_name='my_example_database')
For database, it has 3 options (case-sensitive).
mysqlsqlite3postgres
quicksqlconnector only have one method which is 'query'.
DB.query('query','parameters:optional')
FOR SQLite, you don't need to use parameterized quieries as it is not supported in SQLite.
It has two arguments, query and parameters, parameters are optional.
# EXAMPLES FOR 'MYSQL'
DB.query("SELECT * FROM test where id= %s", (input_user,))
DB.query("SELECT * FROM test")
DB.query('CREATE TABLE test(name varchar(10), id int(10))')
DB.query("INSERT INTO test values(%s, %s)", ('harry', 13))
# EXAMPLES FOR 'SQLITE'
DB.query('DROP TABLE movie')
DB.query("CREATE TABLE movie(title varchar(1), year int(1), score int(1))")
# EXAMPLE FOR 'POSTGRESQL'
DB.query('SELECT datname FROM pg_database')
See test.py for more examples.
🔗Useful Links
| Route | Link |
|---|---|
| Buy me a Coffee | Visit |
| Visit | |
| PyPi | Visit |
| Website | Visit |
Metadata
Release files for quicksqlconnector 1.5.3
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 |
|---|---|---|---|---|
| quicksqlconnector-1.5.3.tar.gz | 4.0 kB | Without provenance | Details for quicksqlconnector-1.5.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| quicksqlconnector-1.5.3-py3-none-any.whl | Python 3 | none | any | Details for quicksqlconnector-1.5.3-py3-none-any.whl |
Total release size: 9.4 kB
Release files / quicksqlconnector-1.5.3.tar.gz
| Download URL | quicksqlconnector-1.5.3.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2bc12761f0bc934d63e2a0ee61b0e2249f71ccd51c74b51277996b7fc681fa8c
|
|
BLAKE2b-256 checksum How to use checksums |
fbba981abf0ac9c264dca7c4f1cbe5a28ff245c0dbf85e95a9c50c3aae234e1c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.2
|
Release files / quicksqlconnector-1.5.3-py3-none-any.whl
| Download URL | quicksqlconnector-1.5.3-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
16ee75716f3f7823a4492c6c8ec6208429af627477b3a96533c5efe0d55f25e3
|
|
BLAKE2b-256 checksum How to use checksums |
79c26d78442db2a2501f15301188ce432ffdc31b47b7cee9ea2fd9e720d863e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.2
|
Security for quicksqlconnector 1.5.3
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.