To start the interpreter, run the following in your shell:
Preql will use Sqliteâs memory database by default.
To see the running options, type:
Explore an existing database¶When you start the interpreter, you can specify which database to connect to, using a URL.
# Postgresql preql postgres://user:pass@host/dbname # MySQL preql mysql://user:pass@host/dbname # Sqlite (use existing or create new) preql sqlite://path/to/file
When already inside the Preql interactive prompt, a Jupyter Notebook, or a running script, use the connect()
method:
connect("sqlite://path/to/file")
Use introspective methods to see a list of the tables, and of the available functions:
// Get a list of all tables in database >> tables() // Get help regarding how to use Preql >> help() // For example: >> help(connect) func connect(uri, load_all_tables, auto_create) = ... Connect to a new database, specified by the uri ...Run in a Jupyter Notebook¶
Preql
kernel, or open an existing one.Inside the notebook, use the connect()
function to connect to a database.
For an example, view the following Jupyter notebook: Tutorial: Exploring a database with Preql
Use as a Python library¶from preql import Preql p1 = Preql() # Use memory database p2 = Preql("sqlite://path/to/file") # Use existing or new file assert p1('sum([1..10])') == 45Run as a REST / GraphQL server¶
Coming soon!
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4