dmddl 0.2.23__py3-none-any.whl → 0.2.25__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
@@ -16,15 +16,6 @@ from dmddl.config.proxy import get_valid_proxies
16
16
  AVAILABLE_PROVIDERS = ["OpenAI"]
17
17
 
18
18
 
19
- class DMDDLConsole:
20
- __instance = None
21
-
22
- def __new__(cls, *args, **kwargs):
23
- if cls.__instance is None:
24
- cls.__instance = Console()
25
- return cls.__instance
26
-
27
-
28
19
  def choose_provider(providers):
29
20
  provider = questionary.select("Choose your LLM provider:",
30
21
  choices=providers).ask()
Binary file
Binary file
dmddl/docs/error.png ADDED
Binary file
Binary file
dmddl/docs/proxy.gif ADDED
Binary file
Binary file
dmddl/models/llm.py CHANGED
@@ -20,8 +20,8 @@ def openai_request(prompt, api_key, console, proxies = None):
20
20
  ]
21
21
  }
22
22
 
23
- if proxies:
24
- with console.status("[bold blue]Making query. Wait for result..."):
23
+ with console.status("[bold blue]Making query. Wait for result..."):
24
+ if proxies:
25
25
  for proxy in proxies:
26
26
  try:
27
27
  req_proxies = {
@@ -33,9 +33,8 @@ def openai_request(prompt, api_key, console, proxies = None):
33
33
  break
34
34
  except:
35
35
  print(f"\n[red bold]Proxy error... Trying next proxy")
36
-
37
- else:
38
- response = requests.post(url=url, headers=headers, json=data)
36
+ else:
37
+ response = requests.post(url=url, headers=headers, json=data)
39
38
 
40
39
 
41
40
  if response.status_code == 200:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: dmddl
3
- Version: 0.2.23
3
+ Version: 0.2.25
4
4
  Summary: cli tool for creating insert script from ddl script
5
5
  License: MIT
6
6
  Author: HoJLter
@@ -26,7 +26,7 @@ Description-Content-Type: text/markdown
26
26
  <img src="https://img.shields.io/badge/License-MIT-yellow.svg">
27
27
  </a>
28
28
  </div>
29
- <img src=".github/dmddl%20logo_4.png" align="center">
29
+ <img src="src/dmddl/docs/dmddl%20logo_4.png" align="center">
30
30
 
31
31
  <h3 align="center">
32
32
  CLI tool that generates insertion script from DDL
@@ -39,35 +39,43 @@ Description-Content-Type: text/markdown
39
39
 
40
40
  To install DMDDL you may use pip:
41
41
 
42
- <img src=".github/pip_install.png" align="center">
42
+ <img src="src/dmddl/docs/pip_install.png" align="center">
43
43
 
44
44
 
45
45
  <h2>
46
46
  💡 How to use it?
47
47
  </h2>
48
- Firstly, you need to configure DMDDL using -c argument:
49
- <br>
50
- (you can get api key from [OpenAI](https://platform.openai.com/api-keys))
51
48
 
52
- <br>
49
+ Firstly, you need to configure DMDDL using -c argument
50
+ (you can get api key from [OpenAI](https://platform.openai.com/api-keys)):
51
+
53
52
 
54
- <img src="configuring.gif" align="center">
53
+
54
+ <img src="src/dmddl/docs/configuring.gif" align="center">
55
55
 
56
56
  Now you can use the app. Provide -s argument to specify input file:
57
57
 
58
+ <img src="src/dmddl/docs/simple_source.gif" align="center">
59
+
58
60
 
59
61
  <h2>
60
62
  🐉 For China/Russia 🪆
61
63
  </h2>
62
64
 
65
+
63
66
  OpenAI API blocked in this countries, but you can use -ps arguments. <br>
64
67
  DMDDL will find proxy for you to make request
65
68
 
69
+ <img src="src/dmddl/docs/proxy.gif" align = "center">
70
+
71
+
66
72
  <h2>
67
73
  🤝 Contributing
68
74
  </h2>
69
75
 
70
- If you would like to contribute to this project, welcome to issues.
71
- <br>(if i don't answer, you can email me)
76
+ Contributions are welcome! <br>
77
+ If you have ideas for improving this project, please post them in issues.
78
+ <br>
79
+ (if i don't answer, you can email me)
72
80
 
73
81
 
@@ -0,0 +1,19 @@
1
+ dmddl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ dmddl/cli.py,sha256=Yfc8D5SuoPNeg4Emat6vpURAL6Fgpo45OOX2WBVgu30,4334
3
+ dmddl/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ dmddl/config/proxy.py,sha256=-6DfuggcXwDjtx8jbOMHy370AvM_t3kYc67q68CCqRM,1763
5
+ dmddl/config/settings.py,sha256=2xRMW9sjc3aro2QUGLMhKQGdAuCMkc5n6G23iXrkyMo,1261
6
+ dmddl/docs/configuring.gif,sha256=4vJw4boHhpwU1BIzSwt5HnMU23soS7-OVaPdJ1KWFf8,1119296
7
+ dmddl/docs/dmddl logo_4.png,sha256=a4Of9UTek-INhdBu6OQcs062cPiZORUZexGE_QMFh7Y,5802
8
+ dmddl/docs/error.png,sha256=EEizK2BMb4hhGNNjZmqrKgMflY6i9OmIzzbFWbKMyfc,7093
9
+ dmddl/docs/pip_install.png,sha256=tWU4iXsjrtwFTsJZV4T0XZvyxtGbBQg2nZx3OMC7xa4,2310
10
+ dmddl/docs/proxy.gif,sha256=DDt9dFSsQ2Lc_6oPzC1N6oT39kc9GpuiPnq0HVrI6pQ,1841301
11
+ dmddl/docs/simple_source.gif,sha256=Jl5TE2x9FOWR2zkKCKiwtR1Fa2Y9TGKq8rE0ysiBtN0,987934
12
+ dmddl/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
+ dmddl/models/llm.py,sha256=icEQKHstgbRLRU6rEmg6syMjkGkGATjXxUBh-L1SjVE,1628
14
+ dmddl/models/prompt.py,sha256=7cjWC-mQJR32jc0a0GsyoYDZWROB57Yk4Wy4nRsiFoM,1923
15
+ dmddl-0.2.25.dist-info/entry_points.txt,sha256=87tyUAFcB9RYRLhYyxroZxcTho-o3IGXnMM4uMGKdV4,40
16
+ dmddl-0.2.25.dist-info/LICENSE,sha256=C--Tlk2EXyLEz1DSTQFKOo-WblCPTsxPcd8t63NCauw,1090
17
+ dmddl-0.2.25.dist-info/METADATA,sha256=7TxbpMPq4RpvpUgZkK8zRjlWSGJ2BrQgmFZBk1Q8X8k,1956
18
+ dmddl-0.2.25.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
19
+ dmddl-0.2.25.dist-info/RECORD,,
@@ -1,2 +0,0 @@
1
- # Automatically created by ruff.
2
- *
@@ -1 +0,0 @@
1
- Signature: 8a477f597d28d172789f06886806bc55
dmddl/config/.env DELETED
@@ -1,2 +0,0 @@
1
- DMDDL_CUR_PROVIDER='OpenAI'
2
- DMDDL_LLM_KEY='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'
dmddl/input.txt DELETED
@@ -1 +0,0 @@
1
- test
dmddl/output.txt DELETED
@@ -1,37 +0,0 @@
1
- -- TABLE: users (15 records)
2
- INSERT INTO users (user_id, username, email) VALUES
3
- (1, 'alice_johnson', 'alice.johnson@example.com'),
4
- (2, 'bob_smith', 'bob.smith@example.com'),
5
- (3, 'charlie_brown', 'charlie.brown@example.com'),
6
- (4, 'diane_green', 'diane.green@example.com'),
7
- (5, 'edward_white', 'edward.white@example.com'),
8
- (6, 'frank_black', 'frank.black@example.com'),
9
- (7, 'grace_kelly', 'grace.kelly@example.com'),
10
- (8, 'henry_ford', 'henry.ford@example.com'),
11
- (9, 'iris_davis', 'iris.davis@example.com'),
12
- (10, 'jack_martin', 'jack.martin@example.com'),
13
- (11, 'karen_williams', 'karen.williams@example.com'),
14
- (12, 'louis_james', 'louis.james@example.com'),
15
- (13, 'maria_anderson', 'maria.anderson@example.com'),
16
- (14, 'nancy_thomas', 'nancy.thomas@example.com'),
17
- (15, 'oscar_harrison', 'oscar.harrison@example.com');
18
-
19
- -- TABLE: orders (15 records)
20
- INSERT INTO orders (order_id, user_id, order_date) VALUES
21
- (1, 1, '2023-03-01'),
22
- (2, 2, '2023-03-02'),
23
- (3, 3, '2023-03-03'),
24
- (4, 4, '2023-03-04'),
25
- (5, 5, '2023-03-05'),
26
- (6, 6, '2023-03-06'),
27
- (7, 7, '2023-03-07'),
28
- (8, 8, '2023-03-08'),
29
- (9, 9, '2023-03-09'),
30
- (10, 10, '2023-03-10'),
31
- (11, 11, '2023-03-11'),
32
- (12, 12, '2023-03-12'),
33
- (13, 13, '2023-03-13'),
34
- (14, 14, '2023-03-14'),
35
- (15, 15, '2023-03-15');
36
-
37
- -- WARNING: Ensure user_id in orders exists in users.
dmddl/requirements.txt DELETED
Binary file
@@ -1,20 +0,0 @@
1
- dmddl/.ruff_cache/.gitignore,sha256=njpg8ebsSuYCFcEdVLFxOSdF7CXp3e1DPVvZITY68xY,35
2
- dmddl/.ruff_cache/0.11.9/1354378795363258161,sha256=L3hDS6FRTSJLyZSY-GZ75mpl9wiuFnMN9ESaojdTGoM,465
3
- dmddl/.ruff_cache/CACHEDIR.TAG,sha256=WVMVbX4MVkpCclExbq8m-IcOZIOuIZf5FrYw5Pk-Ma4,43
4
- dmddl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- dmddl/cli.py,sha256=bmr0FphkRDGJOhW2KX85WGMcAPiczaDfe5Dqu0m9nek,4531
6
- dmddl/config/.env,sha256=ViORk1v0SOwLiZUBUOsWZUXgHnsJe67qXq7cklz9Z_4,211
7
- dmddl/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
- dmddl/config/proxy.py,sha256=-6DfuggcXwDjtx8jbOMHy370AvM_t3kYc67q68CCqRM,1763
9
- dmddl/config/settings.py,sha256=2xRMW9sjc3aro2QUGLMhKQGdAuCMkc5n6G23iXrkyMo,1261
10
- dmddl/input.txt,sha256=n4bQgYhMfWWaL-qgxVrQFaO_TxsrC4Is0V1sFbDwCgg,4
11
- dmddl/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
- dmddl/models/llm.py,sha256=QvVspWqb4bthrbn39gMPmCp_1DxHaI7IPVD1-PjgNiM,1622
13
- dmddl/models/prompt.py,sha256=7cjWC-mQJR32jc0a0GsyoYDZWROB57Yk4Wy4nRsiFoM,1923
14
- dmddl/output.txt,sha256=oVtNzMeEcoJ3UUtsiyugFB9s3mYLt0UyuEs5ppXb-WY,1337
15
- dmddl/requirements.txt,sha256=aPA3NBpypHOiXAK9MwfzIDhPIKxtB71s4yCeAXvbs1k,2046
16
- dmddl-0.2.23.dist-info/entry_points.txt,sha256=87tyUAFcB9RYRLhYyxroZxcTho-o3IGXnMM4uMGKdV4,40
17
- dmddl-0.2.23.dist-info/LICENSE,sha256=C--Tlk2EXyLEz1DSTQFKOo-WblCPTsxPcd8t63NCauw,1090
18
- dmddl-0.2.23.dist-info/METADATA,sha256=vU_dQAqflU1zPbei7PD-rzKdJxIccmbA8Rv-k4I3OI0,1779
19
- dmddl-0.2.23.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
20
- dmddl-0.2.23.dist-info/RECORD,,
File without changes