sqlalchemy_sql_shell
Usage
The program takes one argument: a SQLAlchemy database URL of the form: dialect+driver://username:password@host:port/database (see the SQLAlchemy docs on database URLs for more info). You may need to install additional packages for your database driver of choice (e.g.: mysql-python, psycopg2, pymssql, etc.)
Here’s some basic usage:
$ sqlalchemy_sql_shell
usage: sqlalchemy_sql_shell [-h] url
sqlalchemy_sql_shell: error: too few arguments
$ sqlalchemy_sql_shell sqlite:///
SQL> CREATE TABLE people ( first_name VARCHAR(128), last_name VARCHAR(128) );
SQL> INSERT INTO people VALUES ( 'John', 'Doe' ), ('Mike', 'Smith'), ('Guido', 'van Rossum');
result.rowcount = 3
SQL> SELECT * FROM people;
+------------+------------+
| first_name | last_name |
+============+============+
| John | Doe |
| Mike | Smith |
| Guido | van Rossum |
+------------+------------+
Multi-line queries are supported; A semi-colon signifies the end of the query:
SQL> SELECT * ...> FROM people ...> ; +------------+------------+ | first_name | last_name | +============+============+ | John | Doe | | Mike | Smith | | Guido | van Rossum | +------------+------------+
You can also pipe queries into the command for quick one-liners:
$ echo "SELECT 1 + 2;" | sqlalchemy_sql_shell sqlite:/// +-------+ | 1 + 2 | +=======+ | 3 | +-------+
Or redirect stdin:
$ cat samples/queries.sql SELECT 1 + 2; SELECT 3 + 4; SELECT 5 + 6; $ sqlalchemy_sql_shell sqlite:/// < samples/queries.sql +-------+ | 1 + 2 | +=======+ | 3 | +-------+ +-------+ | 3 + 4 | +=======+ | 7 | +-------+ +-------+ | 5 + 6 | +=======+ | 11 | +-------+
Metadata
Release files for sqlalchemy_sql_shell 0.0.0
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 |
|---|---|---|---|---|
| sqlalchemy_sql_shell-0.0.0.tar.gz | 3.9 kB | Without provenance | Details for sqlalchemy_sql_shell-0.0.0.tar.gz |
Release files / sqlalchemy_sql_shell-0.0.0.tar.gz
| Download URL | sqlalchemy_sql_shell-0.0.0.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
44e680eefe63f29dad1aadc99b087039685efe69d5f90b2e562c2f0c39a56d44
|
|
BLAKE2b-256 checksum How to use checksums |
dd6e67daff62fa014ece502b8af0eb9cab1dfa2e04d356fcad1dd21aef59719c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for sqlalchemy_sql_shell 0.0.0
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.