This is a Python-based command-line interface (CLI) tool for managing a portable postgresql server for MSNoise.
The tool allows you to install, start, stop, create, and drop databases.
- Setup PostgreSQL.
- Start PostgreSQL server in the background (custom port by default 5099, configurable)
- Stop PostgreSQL server.
- Create a new database.
- Drop an existing database.
- Python 3.11 or above.
click
package: Install usingconda install -c conda-forge click
.postgresql
package: Install usingconda install -c conda-forge postgresql
.
-
Install the code
pip install git+https://github.com/ROBelgium/msnoise-db
if your console doesn't have git, you can access the zip directly:
pip install https://github.com/ROBelgium/msnoise-db/archive.master.zip
-
Create a new folder to store the database data
Start the PostgreSQL server in the background.
msnoisedb start
Stop the running PostgreSQL server.
msnoisedb stop
Create a new database.
msnoisedb create-db DATABASE_NAME
Drop an existing database.
msnoisedb drop-db DATABASE_NAME
Drop an existing database.
msnoisedb list-db
Create a new project database
msnoisedb create-db test_database
Initialise the db in msnoise:
msnoise db init
Launching the init
Welcome to MSNoise
What database technology do you want to use?
[1] sqlite
[2] mysql
[3] postgresql
Choice: 3
Server: [localhost]: localhost:5099
Database: [msnoise]: test_database
Username: [msnoise]: msnoise
Password (not shown as you type): msnoise
Table prefix: []:
Installation Done! - Go to Configuration Step!
- Supported Platforms: The tool is designed to work on Windows, Linux and MacOS platforms.
This project is licensed under the EUPL License. See the LICENSE file for more details.
- Click for creating powerful command-line interfaces.