Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stevearc/dql
A SQL-ish language for DynamoDB
https://github.com/stevearc/dql
aws dynamodb python
Last synced: 10 days ago
JSON representation
A SQL-ish language for DynamoDB
- Host: GitHub
- URL: https://github.com/stevearc/dql
- Owner: stevearc
- License: mit
- Created: 2013-12-05T20:41:05.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2024-03-20T16:03:02.000Z (8 months ago)
- Last Synced: 2024-09-19T12:48:53.799Z (about 2 months ago)
- Topics: aws, dynamodb, python
- Language: Python
- Homepage: http://dql.readthedocs.org/
- Size: 628 KB
- Stars: 150
- Watchers: 9
- Forks: 13
- Open Issues: 6
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES.rst
- License: LICENSE
Awesome Lists containing this project
- starred-awesome - dql - A SQL-ish language for DynamoDB (Python)
README
DQL
===
:Build: |build|_ |coverage|_
:Documentation: http://dql.readthedocs.org/
:Downloads: http://pypi.python.org/pypi/dql
:Source: https://github.com/stevearc/dql.. |build| image:: https://github.com/stevearc/dql/actions/workflows/code-workflows.yml/badge.svg
.. _build: https://github.com/stevearc/dql/actions/workflows/code-workflows.yml
.. |coverage| image:: https://coveralls.io/repos/stevearc/dql/badge.png?branch=master
.. _coverage: https://coveralls.io/r/stevearc/dql?branch=masterA simple, SQL-ish language for DynamoDB
As of November 2020, Amazon has released `PartiQL
support `__
for DynamoDB. You should investigate that first to see if it addresses your
needs.Getting Started
---------------
Installation can be done in a variety of ways* An executable `pex `__ file is available on `the release page `__.
* You can run a script to generate the pex file yourself: ``curl -o- install.py https://raw.githubusercontent.com/stevearc/dql/master/bin/install.py | python``
* With pip: ``pip install dql``Examples
--------Here are some basic DQL examples to get you going:
Start the REPL::
$ dql
us-west-1>Creating a table::
us-west-1> CREATE TABLE forum_threads (name STRING HASH KEY,
> subject STRING RANGE KEY,
> THROUGHPUT (4, 2));Inserting data::
us-west-1> INSERT INTO forum_threads (name, subject, views, replies)
> VALUES ('Self Defense', 'Defense from Banana', 67, 4),
> ('Self Defense', 'Defense from Strawberry', 10, 0),
> ('Cheese Shop', 'Anyone seen the camembert?', 16, 1);Queries::
us-west-1> SCAN * FROM forum_threads;
us-west-1> SELECT count(*) FROM forum_threads WHERE name = 'Self Defense';
us-west-1> SELECT * FROM forum_threads WHERE name = 'Self Defense';Mutations::
us-west-1> UPDATE forum_threads ADD views 1 WHERE
> name = 'Self Defense' AND subject = 'Defense from Banana';
us-west-1> DELETE FROM forum_threads WHERE name = 'Cheese Shop';Changing tables::
us-west-1> ALTER TABLE forum_threads SET THROUGHPUT (8, 4);
us-west-1> DROP TABLE forum_threads;And don't forget to use ``help``!