All Questions
Tagged with architecture python
419 questions
-1
votes
0
answers
26
views
How to map HS code products to Alibaba categories?
I'm trying to map a list of products (based on HS codes) to the closest Alibaba categories.
I have two json files, one contains hierarchical product data based on HS codes
Example:
[
{
"key&...
0
votes
0
answers
34
views
How to architect the external evnets and Django models?
I'm building a django backend app and I have a few different models in my app. One of these models is a Driver and I want to do the following when calling the create-driver endpoint:
create the ...
0
votes
3
answers
70
views
How to store structured data in a python package?
I'm currently developing a python package which among other things generates maps for a very low resolution driving game.
The maps are generated by combining predefined tiles. Those tiles have to be ...
0
votes
1
answer
47
views
What are the different ways of distributing a script to run on different company client machines?
Context
I'm working on a bunch of python scripts that spin up a FastAPI server for my startup, as a requirement for our services. This server initialises a Supabase SDK client to do some very specific ...
0
votes
0
answers
60
views
How to parallelize long-running IO operations in a multi-threaded Python application with asyncio?
I am building a Python application that uses an event loop (via the asyncio library) to listen for tick data from a cryptocurrency exchange via a WebSocket. The tick data comes for various symbols, ...
0
votes
0
answers
42
views
Best Practices for Commit/Rollback in Python’s Unit of Work Pattern for Layered Architecture
I have an image below illustrating a layered architecture from the book Architecture Patterns in Python.
Layer architecture image
When implementing this pattern in Python, as shown in the code below, ...
2
votes
1
answer
54
views
Matlab object arrays' method call equivalent in Python
Matlab has object arrays, Python has lists or tuples.
Calling a method of a class on an object array of objects of that class, is easy in Matlab:
A = [Class1(1), Class1(2)];
B = A.toClass2();
see &...
0
votes
1
answer
71
views
Implementing a context-switching mechanism in asyncio
I wish to create something similar to a context switching mechanism, that allows using a shared resource one at a time.
In my case it's a single session object connecting to a website, and each ...
1
vote
2
answers
61
views
Managing function versioning across multiple projects using a shared library
I'm facing a challenge with maintaining consistency across multiple projects that share a common library. Here's the scenario:
I have a helpers library with a function anonymize_ip(ip).
This function ...
0
votes
1
answer
38
views
The better way to read a formated data from .TXT file strings in Python
I have a following quest:
There is an unmarked text file in the .TXT format of the following structure:
City name is Paris
It was build in 303 BD
NORTH PART
Size 56% of city
QUATERS
Quarter name ...
0
votes
1
answer
59
views
Software design for simultaneously running python programs
My question is not directly about the implementation in the code, but more about the basic design or technique I should use.
Initial situation:
I have a Python program that executes a simulation. This ...
0
votes
0
answers
30
views
Asynchronous communication between 2 QThreads
I'm working on optimizing a PyQt application (to control tensile testing machine) that's sometimes slow. The application uses two QThreads, both running in a loop with time.sleep inside.
One QThread (...
1
vote
2
answers
389
views
How to visualize CNN architecture using draw_convet?
I need to visualize the CNN model. The example is in the comments.
I've tried to use draw_convet (https://github.com/gwding/draw_convnet) but it keeps throwing a list of errors. Could you please help? ...
0
votes
1
answer
47
views
How to model two abstractions that have polymorphic relation in OOP
So I have a problem how to model data in my project. I have it in python and doing it in OOP fashion. But I cannot figure out a right way to model this case:
Let's say there is an abstract class ...
0
votes
0
answers
26
views
How to decrease the time for timed out in Heroku?
Currently, I am running an app in Heroku. It uses several dynos at a time. But the problem is dynos getting stuck. It does not return anything and sits idle for 24 hours and kills itself. I was ...