One more blog post about ddbsh :)

Be honest, you were looking to see (with morbid fascination) whether I’d post one more time about dynamodb-shell.

Ok, here it is – this time it is not produced by AI, there will be no load bearing seams, and no “you are so right” here. And I’m sorry, this one will likely be the last blog post on dynamodb-shell for a while.

TL;DR

pip install ddbsh

Yup, that’s it!

What, really?

Yes, really. Check out https://pypi.org/project/ddbsh/ (and https://pypi.org/project/libddbsh/)

# virtualenv ddbsh
created virtual environment CPython3.14.7.final.0-64-arm64 in 372ms
creator CPython3macOsBrew(dest=/Users/amrithie/Desktop/ddbsh, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, via=copy, app_data_dir=/Users/amrithie/Library/Caches/virtualenv)
added seed packages: pip==26.2.2
activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator,XonshActivator
# cd ddbsh
# source bin/activate
(ddbsh) # pip install -r requirements.txt
[...]
ddbsh) # python3
Python 3.14.7 (main, Aug 5 2026, 10:29:49) [Clang 21.0.0 (clang-2100.1.1.101)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ddbsh
>>> conn = ddbsh.connect()
>>> print(conn.run("create table demo (a number) primary key (a hash)"))
CREATE
>>> print(conn.run("describe demo"))
Name: demo (ACTIVE)
Key: HASH a
Attributes: a, N
Created at: 2026-11-26T23:10:31Z
Table ARN: arn:aws:dynamodb:us-east-1:632195519165:table/demo
Table size (bytes): 0
Item Count: 0
Deletion Protection: Disabled
Billing Mode: On Demand
Warm Throughput: (12000 RCU, 4000 WCU, Status ACTIVE)
PITR is Disabled.
GSI: None
LSI: None
VSI: None
Stream: Disabled
Table Class: STANDARD
SSE: Not set
>>> print(conn.run('insert into demo (a, b, c) values (3, "three", ""), (4, "four", ""), (5, "five", "")'))
INSERT
INSERT
INSERT
>>> print(conn.run('select * from demo'))
{a: 3, b: three, c: }
{a: 4, b: four, c: }
{a: 5, b: five, c: }
>>>

The entire libddbsh parser library is now available through python. You also get the convenience of the processing results with a cursor if you so desire.

>>> cur = conn.cursor()
>>> cur.execute("select * from demo where a > 3")
<ddbsh.Cursor object at 0x107f4d2b0>
>>> for row in cur:
... print(row["a"], row["b"])
...
4 four
5 five
>>>

Have fun!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.