🐍 Install from PyPI¶
Meerschaum will auto-install packages as you use them (into a virtual environment, to preserve your base environment).
You can manually install these packages in one command:
You can also install the packages into your base environment by requesting the name of the dependency group, e.g.
Run Meerschaum commands with
python -m meerschaum if
~/.local/bin/ isn't in your
🗄️ Choose a Database¶
Let's pick a database to store our data. Pick one of the three options below and take note of the keys (e.g.
sql:<label>). We'll use this as our Meerschaum instance connector.
Pre-configured TimescaleDB (
The default database connector
sql:mainpoints to the pre-configured Meerschaum stack. If you have Docker, start the database service:
mrsm stack up -d db
📽️ Watch an example
Built-in SQLite DB (
For your convenience, the keys
sql:localpoint to a SQLite database in your Meerschaum root directory.
Use your own DB (
You can connect your own database with
mrsm bootstrap connector. The keys for your connector will be
<label>is the label you assign in the wizard.
📽️ Watch an example
You can also define connectors in your environment. Set an environment variable
MRSM_SQL_<LABEL>to your database URI:
MRSM_SQL_FOO=sqlite:////tmp/foo.db \ python -m meerschaum start connector sql:foo
⚡ Connect to Your Instance¶
Open the Meerschaum shell with
python -m meerschaum.
Your default instance is
sql:main from the pre-configured stack. Connect to a different instance with
To test the connection, run the command
mrsm show pipes. A successful connection should return the message:
💢 No pipes to show.
Change your default instance
instance command temporarily changes your connected instance. To permanently change your default instance:
- Open your configuration with
mrsm edit config.
- Navigate to the key
instance:at the bottom of the file.
- Edit the value to the keys of your new instance (
mrsm show connectorsto see registered connectors).
Watch an example
If you've successfully connected, try building a pipe to get that data flowing!