- Python 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| dist | ||
| PythonModelGenerator | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| appsettings.example.json | ||
| appsettings.json | ||
| CHANGELOG.md | ||
| PythonModelGenerator.py | ||
| PythonModelGenerator.spec | ||
| README.md | ||
| requirements.txt | ||
| SUPPORT.md | ||
Python Model Generator
Purpose
This executable is designed to make the process easier to generate usable models for applications that require connecting to the database.
NOTE: This is specifically designed for PostgreSQL connections. Will be updated later to allow connections to different database types but in the meantime its specifically for my tech stack which uses Postgres.
Will make it easier to update if changes occur as you can just regenerate the model from here and copy the file over to the application in a models folder.
Usage
- Copy the EXE from the Build folder to a local folder.
- When running PythonModelGenerator.exe for the first time it will create an appsettings.json file with templated database connection information, will need to update the databaseName under DATABASE and the Server/Database that is within that.
- After saving and closing the file can use the "friendly" you put directly under DATABASE in appsettings to use the configurations for that database.
- It will parse the schemas for you to choose from, then follow the prompts to generate a model. The model will come out in a created folder called outputModels.
Maintenance
When working on the application and changes need to be made, install from requirements.txt to get PyInstaller included.
Make any changes required to the application and then you can rebuild the EXE by running:
pyinstaller --onefile .\PythonModelGenerator.py
This will create an updated EXE file in the dist folder. That can be included in the update and checked in.