dmddl 0.2.9__py3-none-any.whl → 0.2.11__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
dmddl/cli.py CHANGED
@@ -34,6 +34,8 @@ def make_query(provider, api_key, prompt):
34
34
  if provider == "OpenAI":
35
35
  response = openai_request(base_prompt+prompt, api_key)
36
36
  return response
37
+ elif provider == "None":
38
+ raise Exception("Use -c (--config) to configurate app and set LLM provider.")
37
39
 
38
40
  raise Exception("LLM Provider not found")
39
41
 
@@ -75,9 +77,9 @@ def main():
75
77
  "-c (--config): opens settings menu\n"
76
78
  "-s (--source): specify the input file")
77
79
 
78
-
79
80
  if args.config:
80
81
  set_parameters()
82
+
81
83
  if args.source:
82
84
  with open(args.source, "r", encoding='utf-8') as file:
83
85
  user_prompt = file.read()
dmddl/config/settings.py CHANGED
@@ -1,12 +1,17 @@
1
1
  import dotenv
2
-
2
+ import os
3
+ from pathlib import Path
3
4
 
4
5
  def get_dotenv_path():
6
+ # Проверяем стандартные места поиска .env
5
7
  env_path = dotenv.find_dotenv()
8
+
9
+
6
10
  if not env_path:
7
- with open("dmddl/config/.env", "w"):
8
- pass
9
- env_path = dotenv.find_dotenv()
11
+ env_dir = "config"
12
+ env_path = os.path.join(env_dir, ".env")
13
+ os.makedirs(env_dir, exist_ok=True)
14
+ Path(env_path).touch(exist_ok=True)
10
15
  return env_path
11
16
 
12
17
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: dmddl
3
- Version: 0.2.9
3
+ Version: 0.2.11
4
4
  Summary: cli tool for creating insert script from ddl script
5
5
  License: MIT
6
6
  Author: HoJLter
@@ -0,0 +1,12 @@
1
+ dmddl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ dmddl/cli.py,sha256=dh5M35mdZ8qfyxYZaIL-efeYfmoEikr1Wbv_Hehc1cc,3293
3
+ dmddl/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ dmddl/config/settings.py,sha256=tzxldPnnVv1Shu32XljVO2VuHza43zr61zFcMM_bxvg,1341
5
+ dmddl/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ dmddl/models/llm.py,sha256=-0e9tyMXki4t9R-zKEqcNveFbwKhJmMxOVR7VkhMv7g,851
7
+ dmddl/models/prompt.py,sha256=7cjWC-mQJR32jc0a0GsyoYDZWROB57Yk4Wy4nRsiFoM,1923
8
+ dmddl-0.2.11.dist-info/entry_points.txt,sha256=87tyUAFcB9RYRLhYyxroZxcTho-o3IGXnMM4uMGKdV4,40
9
+ dmddl-0.2.11.dist-info/LICENSE,sha256=C--Tlk2EXyLEz1DSTQFKOo-WblCPTsxPcd8t63NCauw,1090
10
+ dmddl-0.2.11.dist-info/METADATA,sha256=cDVF3dk0zi_cYspmrcEbmbAm1mAXyQUXL7eI9aWUyuI,935
11
+ dmddl-0.2.11.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
12
+ dmddl-0.2.11.dist-info/RECORD,,
@@ -1,12 +0,0 @@
1
- dmddl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- dmddl/cli.py,sha256=22zK7qzhhUyJU6k3QhrD8p9l98gSB5cRtPifTkxLrMY,3168
3
- dmddl/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- dmddl/config/settings.py,sha256=6wNSlm9GCF0OMfTSEgUI67P6JNjlebnnc2_uOO-2F2k,1157
5
- dmddl/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- dmddl/models/llm.py,sha256=-0e9tyMXki4t9R-zKEqcNveFbwKhJmMxOVR7VkhMv7g,851
7
- dmddl/models/prompt.py,sha256=7cjWC-mQJR32jc0a0GsyoYDZWROB57Yk4Wy4nRsiFoM,1923
8
- dmddl-0.2.9.dist-info/entry_points.txt,sha256=87tyUAFcB9RYRLhYyxroZxcTho-o3IGXnMM4uMGKdV4,40
9
- dmddl-0.2.9.dist-info/LICENSE,sha256=C--Tlk2EXyLEz1DSTQFKOo-WblCPTsxPcd8t63NCauw,1090
10
- dmddl-0.2.9.dist-info/METADATA,sha256=HDGX571p90ciP7EIquI8heOtO6vty-8c32tzDFbvXoo,934
11
- dmddl-0.2.9.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
12
- dmddl-0.2.9.dist-info/RECORD,,
File without changes