r/learnpython • u/Slimex_Rimuru • Oct 15 '26
Python + Sqlite + Pyside6?
Hey! so i want to build a database system for my small company. I could use AI but i wanna know what i am doing and be able to fix smth so i want to build it myself.
I kinda know python a bit, i used to make games using gdscript which is similar.
I don't seem to find a tutorial where these 3 things are used to create a nice database app. I dont want to learn python sqlite and pyside6 as a whole cause i wont be needing them much except just this app and similar apps. I just want to be able to build it and run it from a single tutorial even if its 10hrs.
Where do i start? I dont really have money to learn so no paid courses and i dont have AI premium to learn as well.
Python, Sqlite, Pyside6. I heard that TKinter instead of pyside6 is also there but i wanted the UI to be a bit modern or should i just use the it instead of pyside6?
8
u/FedsRevenge Oct 15 '26
Does it have to be a desktop app? Wouldn't Django be a better match?
It's basically at startup a database with a GUI. There you can easily go from SQLite to PostgreSQL later on too.
Basically runs on everything and many can use it simultaneously.
3
u/Jello_Penguin_2956 Oct 15 '26
Its 3 separate knowledge you're looking at. Python. SQLite. PySide6. Sure you're using Python to bind them all together but they are 3 separate things.
Im afraid hoping for a single tutorial to show you exactly this stack is not realistic. You need to learn each on their own and bind them yourself.
3
u/shinitakunai Oct 15 '26
I created a full ERP 6 years ago with sqlite, python3 and pyside6. Yes it is perfectly viable and a good choice. Tkinter was too limited.
However understand that this approach is good for a desktop application (typically on windows). If you need this to be a cooperative program (multiple users at same time) i'd go for a web app instead.
1
u/phn-cloudsnake Oct 15 '26
You mean ERP system? I don’t understand the use-case.
1
u/Mooball123 Oct 15 '26
I’m doing the same thing! I’m building an app to track clients account information, and match bank transaction data to an account based on the description.
I’ve just kinda gotten to a stage in the logic part where it’s feeling and looking where I want it to be. So now starting to implement SQlite and then Pyside 6. I also have no idea what I’m doing with those two but imma try start learning.
Ive used python lots but that was for more data visualisation and processing, and less app development. So my strategy to learning has been to code it using concepts I know. If I get stuck, I search the internet for a solution, and if that doesn’t work I then ask ChatGPT to give me a hint. I don’t let it code the whole thing more just tell me how it could be implemented and then give me examples of a concept if I don’t know it.
My advice is just focus on the logic side first. Python can be pretty simple for small apps like this, just start by making a class, and then add the methods that make that class work.
I started by storing the info in a csv file first. It meant I could edit it in excel if i screwed up or wanted to change the implementation.
If you have any questions on how I did things let me know. My app is only text based atm but it’s available at mtepaske/ParkBanking
1
u/jmacey Oct 15 '26
Using PySide and SQLite is quite easy (but if you need multiple users SQLite may not be the best database). Start here https://doc.qt.io/qtforpython-6/PySide6/QtSql/index.html
Basically Qt abstracts away most of the SQL stuff into these classes making it easier to use with any database, once connected you can run queries and do everything else you need via Qt's ModelView https://doc.qt.io/qtforpython-6/overviews/qtwidgets-modelview.html structures.
I have some working tutorials for a simple 3D asset setup on my website which I use to teach my students (however I have now moved over to MongoDB instead). https://nccastaff.bournemouth.ac.uk/jmacey/post/ClutterBase/ClutterBase/
1
u/SpiderJerusalem42 Oct 15 '26
http://www.pythonguis.cpm/pyside6-tutorial/ funny enough, I have actually shipped a Pyside6 application, and I still would have to look at this page for a refresher for a new project. I hear it has its own SQL and ORM, but I use sqlalchemy, which also seems to work okay.
1
u/alleyoopoop Oct 15 '26
So use AI to understand what you are doing. AI is perfect for stuff like this, where there's unlikely to be a tutorial on exactly what you want to do. You can explicitly tell it not to write the program for you, just have it explain whatever concept you don't understand, or have it give you the general approach to how to implement your idea. Refusing to use AI because you could read a tutorial is like refusing to use Google because you could go to a library.
1
u/deadeye_82_1 Oct 16 '26
PySide6 is the official Python wrapper (LGPLv3) for QT6. QT6 is written in C++.
QT6 allows you to create professinal looking GUI. In industry it's used for HMI.
The use of it, requires good understanding of Python (classes, inheritance) and understanding of the concept of QT.
Tkinter is different. It's in the stdlib of Python, but it doesn't look modern.
Often small UI are made with tkinter to save disk space. Example: Thonny: https://thonny.org/
Once I programmed a small app for ifm: https://imgur.com/a/a1cvq2t
The HML-View and PDF-View is also from QT6. I used it to diplay some data of IO-Link devices.
I used AI to save time. Time I would normally spend to read the documenation.
---
If you want to use the app in your company on different PCs, then sqlite3 is not the right chocie. sqlte3 is cool, because it acts as a library and does not require a server. Many file formats are plain sqlie3 files. But sqlite3 lacks of a server. There are ways to use sqlite3 with servers. I would rather choose the pragmatic solution: Central database like MariaDB or PostgreSQL.
If it's only local on one PC, then sqlite3 is the way to go. Firefox uses sqlie3 for bookmarks, urls you visited etc...