🛠️ Setup¶
🐍 Install from PyPI¶
Run Meerschaum commands with mrsm (or python -m meerschaum if ~/.local/bin/ isn't in your PATH).
1 | |
Installing dependencies
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:
1 | |
To install the packages into your environment (e.g. you're already using a virtual environment) by adding the name of the dependency group, e.g. api:
1 | |
🥞 Start the Stack¶
You'll need Docker to start the stack.
1 | |
📽️ Watch an example
This will start the pre-configured TimescaleDB instance (sql:main).
Don't have Docker or want to use your own database?
You can use a built-in SQLite database with the keys sql:local, or you may use your own database by creating a new connector. Read more about the SQLConnector here.
📽️ Watch an example
MRSM_SQL_<LABEL> environment variables
You can also define connectors in your environment. Set an environment variable MRSM_SQL_<LABEL> to your database URI:
1 2 | |
⚡ Connect to Your Instance¶
Open the Meerschaum shell with mrsm or python -m meerschaum.
Your default instance is sql:main from the pre-configured stack. Connect to a different instance with instance sql:<label>.
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
The 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!