Skip to main content

All Questions

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, ...
elaspog's user avatar
  • 1,719
0 votes
0 answers
92 views

REST API in djangorest framwork

I am making API in Django rest and I am not sure what to do with groupID. I have just 1 model - countries. I have assigned request and response. Request for POST is : {"name": "Czech ...
Michal Lečbych's user avatar
0 votes
1 answer
193 views

Modifiable Python application architecture

I develop an application in Python, but I want to make it so that other users can later modify its functionality with their extensions, but I do not know how to organize the architecture of the ...
selfkilla666's user avatar
0 votes
0 answers
66 views

Executing python script in 5 nodes concurrently and compare the output

I'm trying to build an architecture which does the following steps: Single python script which runs in 5 nodes for every minute in a span of 1 hour. every minute data output should be computed and ...
Rajesh5522's user avatar
0 votes
2 answers
1k views

Python: Structuring a project with utility functions shared across modules at different levels

I have python 3.10 project that uses a combination of scraping websites, data analysis, and additional APIs. Some utility modules may be used by the scraping and data analysis modules. I'm ...
GoldenJoe's user avatar
  • 8,022
1 vote
2 answers
769 views

Run & scale simple python scripts on Google Cloud Platform

I have a simple python script that I would like to run thousands of it's instances on GCP (at the same time). This script is triggered by the $Universe scheduler, something like "python main.py --...
Fares DAOUD's user avatar
1 vote
1 answer
565 views

Is folder name shadowing 3rd-party package name or Python module name is an anti-pattern?

Consider the following (very simplified) project structure: project/ src/ collections/ validators/ foo/ bar/ The "collections" sub-directory name shadows ...
user avatar
1 vote
0 answers
137 views

What is the best project structure for a project, that will be written in Kivy framework?

I would like to use Kivy framework for developing a desktop application. So I wonder what would be the best approach to come up with in terms of arranging structure/architecture of the project. What ...
felinebaron's user avatar
1 vote
1 answer
79 views

AttributeError: module 'pandora' has no attribute 'util'

I have a github repo named pandora: https://github.com/akshkr/pandora-python In the test_case_refactor branch, I can't use submodules of pandora such as pn.util.misc.seed_everything() gives me the ...
Akash Kumar's user avatar
  • 1,406
1 vote
0 answers
128 views

How to construct a configuration data class with no logic?

Within our project, we need to describe the properties of the HW we are working with. This information is then used within the program to make some decisions on how the program should execute. I'm ...
Anja V.'s user avatar
  • 115
0 votes
1 answer
65 views

How can I de-couple the two components of my python application

I'm trying to learn python development, and I have been reading on topics of architectural pattern and code design, as I want to stop hacking and really develop. I am implementing a webcrawler, and I ...
guiwunsc's user avatar
1 vote
2 answers
1k views

Getting machine information of an executable

I have different c++ executable files compiled for different architectures(x86_64,arm32 etc) with different names in a folder inside my python3 project. I would be using one of these when i run the ...
Ajith's user avatar
  • 97
0 votes
1 answer
458 views

Best way to create "virtual" modules in Python 3

Problem description I have a package with OS-dependent modules. These modules have the same API, each. In client code I can do something like: import platform if platform.system() == "Windows": ...
Hannah S.'s user avatar
  • 3,340
1 vote
1 answer
665 views

Duck typing in practice - Python 3.7

I write a library in Python and I want to code to be a self explained, but I find it difficult to be with duck typing. Let's assume that I have a class that accept a parameter A. That parameter has ...
Programmer's user avatar
1 vote
1 answer
5k views

How to create "something" like a REST API without HTTP?

First of all, I'm sorry for the poor title. I'd like to have my_api_service.py running as a background service, which works similar to a REST-API for other scripts, but without HTTP. Scripts on ...
Mr. B.'s user avatar
  • 8,725

15 30 50 per page