dmddl 0.2.18__tar.gz → 0.2.19__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: dmddl
3
- Version: 0.2.18
3
+ Version: 0.2.19
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_3.png" align="center">
29
+ <img src=".github/dmddl%20logo_4.png" align="center">
30
30
 
31
31
  <h3 align="center">
32
32
  CLI app that generates insertion script from DDL
@@ -37,3 +37,20 @@ Description-Content-Type: text/markdown
37
37
  🖥 Installation
38
38
  </h2>
39
39
 
40
+ To install DMDDL you may use pip:
41
+
42
+ <img src=".github/pip_install.png" align="center">
43
+
44
+ <h2>
45
+ How to use it?
46
+ </h2>
47
+
48
+
49
+
50
+ <h2>
51
+ 🤝 Contributing
52
+ </h2>
53
+
54
+ If you would like to contribute to this project, welcome to issues.
55
+ (if i don't answer, you can email me)
56
+
@@ -7,7 +7,7 @@
7
7
  <img src="https://img.shields.io/badge/License-MIT-yellow.svg">
8
8
  </a>
9
9
  </div>
10
- <img src=".github/dmddl%20logo_3.png" align="center">
10
+ <img src=".github/dmddl%20logo_4.png" align="center">
11
11
 
12
12
  <h3 align="center">
13
13
  CLI app that generates insertion script from DDL
@@ -17,3 +17,20 @@
17
17
  <h2>
18
18
  🖥 Installation
19
19
  </h2>
20
+
21
+ To install DMDDL you may use pip:
22
+
23
+ <img src=".github/pip_install.png" align="center">
24
+
25
+ <h2>
26
+ How to use it?
27
+ </h2>
28
+
29
+
30
+
31
+ <h2>
32
+ 🤝 Contributing
33
+ </h2>
34
+
35
+ If you would like to contribute to this project, welcome to issues.
36
+ (if i don't answer, you can email me)
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "dmddl"
3
- version = "0.2.18"
3
+ version = "0.2.19"
4
4
  description = "cli tool for creating insert script from ddl script"
5
5
  authors = [
6
6
  {name = "HoJLter",email = "hojlter.work@gmail.com"}
@@ -1,6 +1,8 @@
1
1
  import asyncio
2
2
 
3
3
  import questionary
4
+ from requests.exceptions import ProxyError
5
+
4
6
  from dmddl.config.settings import LLMSettings
5
7
  from rich import print
6
8
  from rich.syntax import Syntax
@@ -113,10 +115,10 @@ def main():
113
115
 
114
116
 
115
117
  if not args.source and not args.config and not args.proxy:
116
- print("[red bold]You must provide any arguments:\n"
118
+ print("[red bold]You must provide some arguments:\n"
117
119
  "-c (--config): opens settings menu\n"
118
- "-s (--source): specify the input file"
119
- "-sp (--proxy): specify the input file (request with proxy)")
120
+ "-s (--source): specify the input file\n"
121
+ "-ps (--proxy-source): specify the input file (request with proxy)")
120
122
 
121
123
  if args.config:
122
124
  set_parameters()
@@ -133,7 +135,9 @@ def main():
133
135
  for proxy in proxies:
134
136
  print(f"[yellow bold]- {proxy}")
135
137
  else:
136
- print("[yellow bold] Proxy does not found :( \n Try again later. (it really helps)")
138
+ print("[red bold] Proxy does not found :( \n Try again later. (it really helps)")
139
+
140
+
137
141
 
138
142
  confirmation, user_prompt = input_prompt_dialogue(args)
139
143
 
@@ -19,13 +19,16 @@ def openai_request(prompt, api_key, proxies = None):
19
19
 
20
20
  if proxies:
21
21
  for proxy in proxies:
22
- print(f"[yellow bold]\nUsing proxy: {proxy}")
23
- req_proxies = {
24
- "https": proxy
25
- }
26
- response = requests.post(url=url, headers=headers, json=data, proxies = req_proxies)
27
- if response.status_code == 200:
28
- break
22
+ try:
23
+ print(f"[yellow bold]Using proxy: {proxy}")
24
+ req_proxies = {
25
+ "https": proxy
26
+ }
27
+ response = requests.post(url=url, headers=headers, json=data, proxies = req_proxies)
28
+ if response.status_code == 200:
29
+ break
30
+ except:
31
+ pass
29
32
 
30
33
  else:
31
34
  response = requests.post(url=url, headers=headers, json=data)
@@ -1,2 +0,0 @@
1
- # Automatically created by ruff.
2
- *
@@ -1 +0,0 @@
1
- Signature: 8a477f597d28d172789f06886806bc55
@@ -1,2 +0,0 @@
1
- DMDDL_CUR_PROVIDER='OpenAI'
2
- DMDDL_LLM_KEY='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'
@@ -1 +0,0 @@
1
- test
@@ -1,62 +0,0 @@
1
- -- TABLE: users (15 records)
2
- INSERT INTO users (user_id, username, email) VALUES
3
- (1, 'alice_jones', 'alice.jones@example.com'),
4
- (2, 'bob_brown', 'bob.brown@example.com'),
5
- (3, 'charlie_lee', 'charlie.lee@test.com'),
6
- (4, 'david_clark', 'david.clark@example.com'),
7
- (5, 'emily_williams', 'emily.williams@test.com'),
8
- (6, 'frank_miller', 'frank.miller@example.com'),
9
- (7, 'grace_king', 'grace.king@test.com'),
10
- (8, 'hannah_white', 'hannah.white@example.com'),
11
- (9, 'ian_green', 'ian.green@example.com'),
12
- (10, 'jake_harris', 'jake.harris@test.com'),
13
- (11, 'kate_scott', 'kate.scott@example.com'),
14
- (12, 'luke_adams', 'luke.adams@test.com'),
15
- (13, 'mike_james', 'mike.james@example.com'),
16
- (14, 'nora_moore', 'nora.moore@test.com'),
17
- (15, 'olivia_taylor', 'olivia.taylor@example.com');
18
-
19
- -- TABLE: orders (40 records)
20
- INSERT INTO orders (order_id, user_id, order_date) VALUES
21
- (1, 1, '2023-01-01'),
22
- (2, 1, '2023-01-05'),
23
- (3, 2, '2023-01-02'),
24
- (4, 3, '2023-01-01'),
25
- (5, 3, '2023-01-03'),
26
- (6, 4, '2023-01-04'),
27
- (7, 4, '2023-01-07'),
28
- (8, 5, '2023-01-02'),
29
- (9, 5, '2023-01-06'),
30
- (10, 6, '2023-01-05'),
31
- (11, 6, '2023-01-08'),
32
- (12, 7, '2023-01-01'),
33
- (13, 8, '2023-01-03'),
34
- (14, 8, '2023-01-09'),
35
- (15, 9, '2023-01-01'),
36
- (16, 10, '2023-01-02'),
37
- (17, 10, '2023-01-06'),
38
- (18, 11, '2023-01-04'),
39
- (19, 11, '2023-01-10'),
40
- (20, 12, '2023-01-01'),
41
- (21, 12, '2023-01-03'),
42
- (22, 13, '2023-01-02'),
43
- (23, 13, '2023-01-05'),
44
- (24, 14, '2023-01-04'),
45
- (25, 14, '2023-01-08'),
46
- (26, 15, '2023-01-02'),
47
- (27, 15, '2023-01-09'),
48
- (28, 1, '2023-01-06'),
49
- (29, 2, '2023-01-03'),
50
- (30, 3, '2023-01-07'),
51
- (31, 4, '2023-01-08'),
52
- (32, 5, '2023-01-01'),
53
- (33, 6, '2023-01-05'),
54
- (34, 7, '2023-01-02'),
55
- (35, 8, '2023-01-10'),
56
- (36, 9, '2023-01-06'),
57
- (37, 10, '2023-01-04'),
58
- (38, 11, '2023-01-03'),
59
- (39, 12, '2023-01-07'),
60
- (40, 13, '2023-01-09');
61
-
62
- -- WARNING: Consider implementing ON DELETE CASCADE for foreign keys to maintain data integrity.
Binary file
File without changes
File without changes
File without changes