Initialize Project

This console script is responsible asking questions about the database connection, to create the db.ini file in order to store the answers and to create the tables in the database.

Questions are:

  • What database technology do you want to use?
    • sqlite: this will create a file in the current folder and use it as DB
    • mysql: this will connect to a local or remote mysql server, additional information is then required:
      • hostname: of the mysql server, defaults to
      • database: must already exist on hostname
      • username: as registered in the privileged users of the mysql server
      • password: his password

The SQLite choice will create a xxx.sqlite file in the current (project) folder, while, for MySQL, one has to create an empty database first on the mysql server, see how to do this .

To run this script:

msnoise db init --help

Usage:  [OPTIONS]

  This command initializes the current folder to be a MSNoise Project by
  creating a database and a db.ini file.

  --tech TEXT  Database technology: 1=SQLite 2=MySQL
  --help       Show this message and exit.


The credentials will be saved in a flat text file in the current directory. It’s not very safe, but until now we haven’t thought of another solution.