Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/lucavallini/wert-app/llms.txt

Use this file to discover all available pages before exploring further.

This guide covers every step needed to install and configure Wert App from scratch, including Python version requirements, all pip packages, MySQL database creation, and the passwordBDD.txt password file. Follow the steps in order — each one builds on the previous.
1

Verify your Python version

Wert App requires Python 3. Confirm your installation before proceeding.
python --version
You should see output such as Python 3.10.12. Any Python 3.x release is supported. If Python is not installed, download it from python.org.
2

Install Python dependencies

Wert App depends on three third-party packages. Install them all with a single command.
pip install PyQt5 mysql-connector-python requests
PackagePurpose
PyQt5Desktop GUI framework — all windows and widgets
mysql-connector-pythonMySQL database connectivity
requestsHTTP calls to ExchangeRate API and World Bank API
pip install PyQt5 mysql-connector-python requests
3

Install and start MySQL

Wert App connects to MySQL on localhost at port 3306 as the root user. You need a running MySQL server before launching the app.
Download and run the MySQL Installer from dev.mysql.com. Choose the Server Only option. The installer sets up the service automatically.
Verify the service is running before continuing.
4

Create the database

Log in to MySQL and create the registro_usuarios database. Wert App uses this exact name — do not change it.
mysql -u root -p
Once logged in, run:
CREATE DATABASE registro_usuarios;
You do not need to create any tables manually. The application calls setTables() on startup, which runs the following schema automatically:
CREATE TABLE IF NOT EXISTS usuarios (
    id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
    username VARCHAR(50) NOT NULL UNIQUE,
    password VARCHAR(255) NOT NULL
);

CREATE TABLE notas (
    id_nota INT AUTO_INCREMENT PRIMARY KEY,
    titulo VARCHAR(255),
    nota TEXT,
    id INT,
    FOREIGN KEY (id) REFERENCES usuarios(id),
    UNIQUE (id, titulo)
);
5

Create the passwordBDD.txt file

The database connection reads your MySQL root password from a plain-text file named passwordBDD.txt in the project root. This file must exist before you run the app.Create the file and write your MySQL password into it:
echo your_mysql_password> passwordBDD.txt
Replace your_mysql_password with the actual password you set for the MySQL root user during installation.
Do not commit passwordBDD.txt to version control. Add it to your .gitignore to prevent accidentally exposing your database credentials.
echo "passwordBDD.txt" >> .gitignore
For reference, here is how database/conexion.py reads this file and constructs the connection:
database/conexion.py
import mysql.connector

with open('passwordBDD.txt', 'r') as archivo:
    password = archivo.read()

def getConexion():
    conexion = mysql.connector.connect(
        user='root',
        password=password,
        host='localhost',
        database='registro_usuarios',
        port=3306
    )
    return conexion
The connection parameters are:
ParameterValue
hostlocalhost
port3306
userroot
databaseregistro_usuarios
passwordRead from passwordBDD.txt
6

Run the application

From the project root directory, launch the app:
python main.py
On macOS or Linux, use python3 if python points to Python 2:
python3 main.py
The application will:
  1. Read passwordBDD.txt and open a MySQL connection.
  2. Run setTables() to create the usuarios and notas tables if they do not exist.
  3. Open the login window.
If the window does not appear, check that MySQL is running and that passwordBDD.txt contains the correct password.

Troubleshooting common issues

SymptomLikely causeFix
App crashes immediately with a file errorpasswordBDD.txt is missing or in the wrong directoryCreate the file in the same folder as main.py
mysql.connector.errors.ProgrammingErrorDatabase registro_usuarios does not existRun CREATE DATABASE registro_usuarios; in MySQL
Access denied for user 'root'Wrong password in passwordBDD.txtUpdate passwordBDD.txt with the correct MySQL root password
Login window appears but login always failsTables were not createdConfirm setTables() ran without errors; check the console output

Next steps

Quickstart

A condensed walkthrough if you want the shortest path to a running app.

Introduction

Overview of all features, who the app is for, and the full technology stack.

Build docs developers (and LLMs) love