I need to create a function or module that downloads data from a URL API and then loads it into a preset code for my program on auto-programming microcontrollers

that takes the data from a database of an API url and loads it into a code which must be compiled to be compatible with ESP microcontrollers and loaded into microcontrollers. I’m going to use predefined code templates and dynamically populate them with the data from the database. I’m using the language of python tell me what I should use and how to achieve this

The subject line should be only a summary, with the details in the main text.

You haven’t given much in the way of details, but the third-pary requests module might be of help for fetching the data from the API.

I already have that solved. I want to find a solution to compile .ino files in Python after changing their variables with Jinja

I believe it’s possile to compile .ino files from the command line using arduino-cli, so you could try invoking that from Python using the subprocess module.

That’s exactly what I’m trying to do but I can’t get it to work, I don’t know if it’s my short experience or if I’m using Windows instead of Linux or iOS.

“I can’t get it to work”? In what way is it not working?

Have you looked at Arduino CLI?

I already have it working for me on Windows 10.

It shows me the one type of error in the terminal that refers to it not compiling because of the size of the .ino file that I am using and it seems absurd to me

It shows me the one type of error in the terminal that refers to it not compiling because of the size of the .ino file that I am using and it seems absurd to me

How big is the .ino file?

With all the files I have tried, the heaviest is 8kb

Can you copy and post (or send by message, if you prefer) the error messages and/or the code, ideally the smallest that it complains about? 8KB does absurdly small for it to complain about!

C:\Users\gabri\OneDrive\Documents\esp32_bluetooth_transmisor\esp32_bluetooth.ino:32:6: error: redefinition of ‘void setup()’
32 | void setup() {

^~~~~
C:\Users\gabri\OneDrive\Documents\esp32_bluetooth_transmisor\esp32_bluetooth_transmisor.ino:32:6: note: ‘void setup()’ previously defined here
32 | void setup() {
^~~~~
C:\Users\gabri\OneDrive\Documents\esp32_bluetooth_transmisor\esp32_bluetooth.ino:61:6: error: redefinition of ‘void loop()’
61 | void loop() {
^~~~
C:\Users\gabri\OneDrive\Documents\esp32_bluetooth_transmisor\esp32_bluetooth_transmisor.ino:43:6: note: ‘void loop()’ previously defined here
43 | void loop() {
^~~~
C:\Users\gabri\OneDrive\Documents\esp32_bluetooth_transmisor\esp32_escribir_EEPROM.ino:7:6: error: redefinition of ‘void setup()’
7 | void setup() {
^~~~~
C:\Users\gabri\OneDrive\Documents\esp32_bluetooth_transmisor\esp32_bluetooth_transmisor.ino:32:6: note: ‘void setup()’ previously defined here
32 | void setup() {
^~~~~
C:\Users\gabri\OneDrive\Documents\esp32_bluetooth_transmisor\esp32_escribir_EEPROM.ino:46:6: error: redefinition of ‘void loop()’
46 | void loop(){
^~~~
C:\Users\gabri\OneDrive\Documents\esp32_bluetooth_transmisor\esp32_bluetooth_transmisor.ino:43:6: note: ‘void loop()’ previously defined here
43 | void loop() {
^~~~
C:\Users\gabri\OneDrive\Documents\esp32_bluetooth_transmisor\esp32_revisar_eeprom.ino:3:6: error: redefinition of ‘void setup()’ 3 | void setup() {
^~~~~
C:\Users\gabri\OneDrive\Documents\esp32_bluetooth_transmisor\esp32_bluetooth_transmisor.ino:32:6: note: ‘void setup()’ previously defined here
32 | void setup() {
^~~~~
C:\Users\gabri\OneDrive\Documents\esp32_bluetooth_transmisor\esp32_revisar_eeprom.ino:33:6: error: redefinition of ‘void loop()’ | ^~~~
C:\Users\gabri\OneDrive\Documents\esp32_bluetooth_transmisor\esp32_bluetooth_transmisor.ino:43:6: note: ‘void loop()’ previously defined here
43 | void loop() {
^~~~

Error during build: exit status 1

It’s not complaining about the size of the file, it’s complaining about the setup and loop functions being defined more than once.

and how do I solve it

You solve it by not defining functions more than once.

I can’t make suggestions if I don’t know what the code looks like!