All Questions
11 questions
1
vote
3
answers
154
views
Inventory Management System
I'm trying to learn Django by building an inventory management system, here's my final models.py.
I'm looking for feedback!
...
1
vote
0
answers
236
views
write a wrapper for cosmos db calls to use the results as objects in python (technically an ORM)
As part of a larger program, I'm trying to find the cleanest way to architecture my program to query a cosmos db and use its return values (dict objects) as easy to manipulate and maintain objects in ...
0
votes
1
answer
203
views
django multiple if else refactor
I have a function with multiple if else statements that I'm trying to simplify in Django
Is there a pattern or maybe a better modeling approach that I could use here?
The idea behind is to have a ...
3
votes
1
answer
113
views
Flask Database Design with ORM
I am designing a Stock Currency application and for that, I created a database.
I searched for my question here first but the answerer told me to ask the same question here.
...
2
votes
0
answers
2k
views
Providing different __table_args__ to SQLAlchemy mapped class depending on backend DBMS
I need to set different __table_args__ for the mapped class depending on the backend DBMS, e.g. mssql and ...
1
vote
0
answers
166
views
Database connector in Python
I've been trying to build an ORM. I started with the connector layer, which is responsible for the database server connections and executes raw SQL as the code below shows.
I have built the ...
3
votes
0
answers
737
views
GUI to control a NZXT cooling and lighting system
I am working since a couple of weeks on my first Python application and I would love to have a review of the code I wrote so far.
The app has the purpose of controlling the cooling and lighting of an ...
2
votes
1
answer
806
views
Password field based on peewee ORM framework
I implemented a password field based on the peewee framework to handle passwords of accounts in web applications for Python 3.4.
My goals were
Secure hashing.
No plain password leakage.
Easy ...
3
votes
0
answers
379
views
Flask-SQLAlchemy model structure
I'm seeking a review of my Flask-SQLAlchemy model structure, particularly adherence to DB best practices, such as avoiding duplication, etc.
The models represent the relations between Departments, ...
5
votes
0
answers
2k
views
Implementing an enum field for peewee.Model
I implemented an enum field class EnumField inheriting from peewee.CharField.
The reason that I use a character-based field is ...
3
votes
0
answers
942
views
Implementing a JSON-serializable ORM model
I implemented a library which, amongst other things, implements a JSON-serializable ORM model based on the peewee framework.
Here's the relevant excerpt:
...