File size: 704 Bytes
8fc9334
 
76614d6
5d54c78
 
6f67d57
5d54c78
 
 
2dc6ac6
5d54c78
 
 
b1ed202
3c2a93b
b1ed202
0704388
b1ed202
3c2a93b
1623472
8fc9334
5b59963
76614d6
 
 
 
 
 
 
 
 
 
 
cea9e80
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import os
import time
import shutil
import subprocess

command = ["pip", "install", "flet"]

subprocess.run(command, check=True)

command = ["pip", "install", "flet-fastapi==0.19.0", "--no-deps"]

subprocess.run(command, check=True)


gh_token = os.getenv("gh_token")

url_with_token = f"https://{gh_token}@github.com/Eslam-Magdy-1297/Adel_Flet_Demo.git"

os.system(f"git clone {url_with_token}")

time.sleep(10)

source_dir = "Adel_Flet_Demo"
destination_dir = "."

for item in os.listdir(source_dir):
    s = os.path.join(source_dir, item)
    d = os.path.join(destination_dir, item)
    shutil.move(s, d)

os.rmdir(source_dir)

with open("main.py", "r") as file:
    code = file.read()
    exec(code)