duosql
An easy way to demo database transactions.
Prerequisite
- Python 3.5+
- tmux
Install
pip3 install duosql
Usage
- Create a .duo script file. For example:
# connect command
connect: mysql -ujohnlinp -psecret duosql
# create table and populate data
left: CREATE TABLE IF NOT EXISTS person (id INT NOT NULL AUTO_INCREMENT, name VARCHAR(255) NOT NULL, PRIMARY KEY (id));
left: INSERT INTO person (name) VALUES ('John Lin');
# start left transaction
left: BEGIN;
left: SELECT COUNT(*) FROM person FOR UPDATE;
# start right transaction
right: BEGIN;
right: SELECT COUNT(*) FROM person FOR UPDATE;
-
Run
duosql <script-file>in a tmux session. -
Watch.
Metadata
Release files for duosql 0.1.4
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 |
|---|---|---|---|---|
| duosql-0.1.4.tar.gz | 2.9 kB | Without provenance | Details for duosql-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| duosql-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for duosql-0.1.4-py3-none-any.whl |
Total release size: 6.9 kB
Release files / duosql-0.1.4.tar.gz
| Download URL | duosql-0.1.4.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1238781e4979b68536f9a1fbbc46cb1f21a832d76fb5817d3ecb2e505c071067
|
|
BLAKE2b-256 checksum How to use checksums |
5affc005dd441d8aebf20b37ae8742b5b7968e21a1dba909caa207e53ff71431
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/2.7.16
|
Release files / duosql-0.1.4-py3-none-any.whl
| Download URL | duosql-0.1.4-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e8502143ebfa13c3968e62d8f3d41f3632e6b62087a25343d2deb611e443e5cc
|
|
BLAKE2b-256 checksum How to use checksums |
4b7e76ad52c3a8149d3f4507408be10db1d6deb2aa11394d75fd08708486cd85
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/2.7.16
|
Security for duosql 0.1.4
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.