PySQL
Python wrapper for making MySQL queries easier to execute
Installation
- Clone the repository to your local machine
git clone https://github.com/Devansh3712/PySQL.git
-
Installation pre-requisites
MySQL local server
-
PyPi package
Windows
pip install pysql-cli
Linux / MacOS
pip3 install pysql-cli
- Automatic Installation
Open the PySQL directory and run the install file
Windows
install.bat
Linux / MacOS
chmod +x ./install.sh
./install.sh
- Manual Setup
Open the PySQL directory
using requirements.txt
pip install -r requirements.txt
using poetry
poetry install
Usage
-
Using the pip package
pysql: Basic PySQL CLIcpysql: Colored PySQL CLI
pysql
cpysql
-
Using the Python command-line wrapper
.py filemain.py: Basic PySQL CLImain_c.py: Colored PySQL CLI
Windows
python pysql/main.py
python pysql/main_c.py
Linux
python3 pysql/main.py
python3 pysql/main_c.py
Commands
List of available commands
ALL COMMANDS
select TB_NAME, COLUMNS, ARGS Displays selected columns of a table
insert -s TB_NAME, ARGS Insert a single row in a table
-m TB_NAME, NUM, ARGS Insert `NUM` rows in a table
-f TB_NAME, FILE_NAME Insert values in a table from CSV file
update TB_NAME, COLUMNS, ARGS Updates values of columns in a table
delete TB_NAME, COLUMN Deletes values of row in a table
showdb Display all databases in MySQL server
usedb Use a database
createdb DB_NAME Create a new database
dropdb DB_NAME Delete a database
showtb Display all tables in current db
createtb TB_NAME, ARGS Create a new table in current db
droptb TB_NAME Delete a table in current db
trunctb TB_NAME Truncate a table in current db
desctb TB_NAME Display structure of a table in current db
altertb TB_NAME, ARGS Alter contents of table in current db
exportdb DB_NAME, PATH Export db as `.sql` file to path
exporttb -json TB_NAME, PATH Export table as `.txt` file to path
-csv TB_NAME, PATH Export table as `.csv` file to path
-sql TB_NAME, PATH Export table schema as `.sql` file to path
exportall -json PATH Export all tables in db as `.txt` file to path
-csv PATH Export all tables in db as `.csv` file to path
-sql PATH Export all tables schema in db as `.sql` file to path
importdb DB_NAME, PATH Import `.sql` file into input database
importtb DB_NAME, PATH Import `.sql` table schema into input table
Metadata
Release files for pysql-cli 1.1.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 |
|---|---|---|---|---|
| pysql-cli-1.1.2.tar.gz | 20.5 kB | Without provenance | Details for pysql-cli-1.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pysql_cli-1.1.2-py3-none-any.whl | Python 3 | none | any | Details for pysql_cli-1.1.2-py3-none-any.whl |
Total release size: 49.2 kB
Release files / pysql-cli-1.1.2.tar.gz
| Download URL | pysql-cli-1.1.2.tar.gz |
|---|---|
| Size | 20.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4ae008c439819b85da9998ef8c912607a28e8a3f7dd62cf8e155510959b8d906
|
|
BLAKE2b-256 checksum How to use checksums |
08ae08f7b3e3352a84a99ac7b015faea113d6da16f4beb7a7e77a850031cfb20
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Release files / pysql_cli-1.1.2-py3-none-any.whl
| Download URL | pysql_cli-1.1.2-py3-none-any.whl |
|---|---|
| Size | 28.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c529b1d60c40a83a9ae7e3575ef9e09dac081260327506116a27eea07c868267
|
|
BLAKE2b-256 checksum How to use checksums |
1abdfd4bd97c57f4721c38a6608b2bf7befd753732e9ea371f1b1508f128aaad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Security for pysql-cli 1.1.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.