Skip to main content

duosql

An easy way to demo database transactions.

Prerequisite

  • Python 3.5+
  • tmux

Install

pip3 install duosql

Usage

  1. 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;
  1. Run duosql <script-file>.

  2. Watch.

Metadata

Release files for duosql 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for duosql 0.1.5
File Size Uploaded
duosql-0.1.5.tar.gz 3.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for duosql 0.1.5
File Interpreter ABI Platform
duosql-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 7.4 kB

Release files / duosql-0.1.5.tar.gz

Download URL duosql-0.1.5.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e6ef0e8dc948f1b40c022feafb7e1bccc31418b93222b42ad5093756f491d411
BLAKE2b-256 checksum
How to use checksums
4a5d91bb92ca5f631dd56653f80ae83c75ed9407c02d6d8cd36fcce7d23e0d62
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.5-py3-none-any.whl

Download URL duosql-0.1.5-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f137abd60590bd4d60059156d130b3781982f9fadcbf09c9ad04a5612b8fea7c
BLAKE2b-256 checksum
How to use checksums
99482b95508c8f687c56a0ac9d83c2145914423b61ecd13da37d0bf2256cbf8b
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 history Release notifications | RSS feed

0.1.8

2 release files

0.1.6

2 release files

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page