-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathok.py
More file actions
43 lines (40 loc) · 1.03 KB
/
Copy pathok.py
File metadata and controls
43 lines (40 loc) · 1.03 KB
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
37
38
39
40
41
42
43
import os
# Folder and file structure
structure = {
"streamlit_csv_editor": {
"modules": {
"file_loader.py": "",
"grid_editor.py": "",
"data_ops.py": "",
"validators.py": "",
"export.py": "",
"state_manager.py": "",
"__init__.py": ""
},
"utils": {
"helpers.py": "",
"__init__.py": ""
},
"data": {},
"assets": {},
"requirements.txt": """streamlit
pandas
openpyxl
st-aggrid
xlsxwriter
""",
"app.py": ""
}
}
def create_structure(base_path, structure):
for name, content in structure.items():
path = os.path.join(base_path, name)
if isinstance(content, dict):
os.makedirs(path, exist_ok=True)
create_structure(path, content)
else:
with open(path, 'w') as f:
f.write(content)
if __name__ == "__main__":
create_structure(".", structure)
print("✅ Folder structure created successfully.")