eazyctk 0.0.1__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.
eazyctk-0.0.1/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Negoita Marius Gabriel
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
eazyctk-0.0.1/PKG-INFO ADDED
@@ -0,0 +1,30 @@
1
+ Metadata-Version: 2.4
2
+ Name: eazyctk
3
+ Version: 0.0.1
4
+ Summary: A simple wrapper for customtkinter
5
+ Author-email: Marius <negoitamarius2015.2@gmail.com>
6
+ Requires-Python: >=3.7
7
+ Description-Content-Type: text/markdown
8
+ License-File: LICENSE
9
+ Requires-Dist: customtkinter
10
+ Dynamic: license-file
11
+
12
+ # eazyctk
13
+
14
+ `eazyctk` is a simplified wrapper for `customtkinter`, designed to make building GUI applications in Python faster and easier.
15
+
16
+ ## Features
17
+ * **Simplified UI creation**: Quickly create labels, buttons, and entries with less code.
18
+ * **State Management**: Automatically keeps track of your widgets in simple dictionaries.
19
+ * **Built-in Examples**: Includes helper functions like `exampleWindow()` to get you started immediately.
20
+
21
+ ## Quick Example
22
+ Here is how easy it is to create a calculator using `eazyctk`:
23
+
24
+ ```python
25
+ from eazyctk import *
26
+
27
+ createWindow("400x400", "My App")
28
+ createLabel("lbl1", "Hello World!", 20, 20)
29
+ createButton("btn1", "Click Me", lambda: print("Clicked!"), 20, 60)
30
+ start()
@@ -0,0 +1,19 @@
1
+ # eazyctk
2
+
3
+ `eazyctk` is a simplified wrapper for `customtkinter`, designed to make building GUI applications in Python faster and easier.
4
+
5
+ ## Features
6
+ * **Simplified UI creation**: Quickly create labels, buttons, and entries with less code.
7
+ * **State Management**: Automatically keeps track of your widgets in simple dictionaries.
8
+ * **Built-in Examples**: Includes helper functions like `exampleWindow()` to get you started immediately.
9
+
10
+ ## Quick Example
11
+ Here is how easy it is to create a calculator using `eazyctk`:
12
+
13
+ ```python
14
+ from eazyctk import *
15
+
16
+ createWindow("400x400", "My App")
17
+ createLabel("lbl1", "Hello World!", 20, 20)
18
+ createButton("btn1", "Click Me", lambda: print("Clicked!"), 20, 60)
19
+ start()
@@ -0,0 +1,12 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "eazyctk"
7
+ version = "0.0.1"
8
+ authors = [{name = "Marius", email = "negoitamarius2015.2@gmail.com"}]
9
+ description = "A simple wrapper for customtkinter"
10
+ readme = "README.md"
11
+ requires-python = ">=3.7"
12
+ dependencies = ["customtkinter"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
File without changes
@@ -0,0 +1,130 @@
1
+ import customtkinter as tk
2
+
3
+ # Internal global variables for the API
4
+ _root = None
5
+ labels = {}
6
+ buttons = {}
7
+ entries = {}
8
+ checkboxes = {}
9
+ check_vars = {}
10
+ dropdowns = {}
11
+ drpsvar = {}
12
+
13
+ def setTheme(theme: str):
14
+ """Sets the appearance mode (Light, Dark, or System)"""
15
+ tk.set_appearance_mode(theme.capitalize())
16
+
17
+ def setThemeColor(themeclr: str):
18
+ """Sets the color theme (green, blue, etc.)"""
19
+ tk.set_default_color_theme(themeclr)
20
+
21
+ def getTheme():
22
+ """Returns the current appearance mode string ('Light' or 'Dark')"""
23
+ return tk.get_appearance_mode()
24
+
25
+ def toggleTheme():
26
+ """Switches between Dark and Light mode automatically"""
27
+ current = getTheme()
28
+ if current == "Dark":
29
+ setTheme("Light")
30
+ else:
31
+ setTheme("Dark")
32
+
33
+ def createWindow(Size: str, Title: str):
34
+ """Initializes the main window. MUST BE CALLED FIRST."""
35
+ global _root
36
+ _root = tk.CTk()
37
+ _root.geometry(Size)
38
+ _root.title(Title)
39
+ return _root
40
+
41
+ def createLabel(Name: str, Text: str, x: int, y: int, wrap: int = 250):
42
+ """Creates a label and saves it."""
43
+ lbl = tk.CTkLabel(master=_root, text=Text, wraplength=wrap)
44
+ lbl.place(x=x, y=y)
45
+ labels[Name] = lbl
46
+
47
+ def createButton(Name: str, Text: str, Command, x: int, y: int):
48
+ """Creates a button and saves it."""
49
+ btn = tk.CTkButton(master=_root, text=Text, command=Command)
50
+ btn.place(x=x, y=y)
51
+ buttons[Name] = btn
52
+
53
+ def createEntry(Name: str, x: int, y: int, Placeholder: str = ""):
54
+ """Creates a single-line text input."""
55
+ entry = tk.CTkEntry(master=_root, placeholder_text=Placeholder)
56
+ entry.place(x=x, y=y)
57
+ entries[Name] = entry
58
+
59
+ def createCheckbox(Name: str, Text: str, x: int, y: int, Command=None):
60
+ # This must happen INSIDE here so it links to _root
61
+ var = tk.BooleanVar(value=False)
62
+
63
+ check = tk.CTkCheckBox(
64
+ master=_root,
65
+ text=Text,
66
+ variable=var,
67
+ command=Command,
68
+ width=20,
69
+ height=20,
70
+ checkbox_width=18,
71
+ checkbox_height=18
72
+ )
73
+ check.place(x=x, y=y)
74
+
75
+ checkboxes[Name] = check
76
+ check_vars[Name] = var # Store the variable for isChecked to read
77
+
78
+ def isChecked(Name: str):
79
+ """Returns True if the checkbox is checked, otherwise False."""
80
+ if Name in check_vars:
81
+ return check_vars[Name].get()
82
+ return False
83
+
84
+ def createDropdown(Name: str, options: list, x: int, y: int, cmd=None):
85
+ """Create a dropdown menu"""
86
+ var = tk.StringVar(value=options[0])
87
+ dropdown = tk.CTkOptionMenu(
88
+ master=_root,
89
+ values=options,
90
+ variable=var,
91
+ command=lambda choice: cmd() if cmd else None
92
+ )
93
+ dropdown.place(x=x, y=y)
94
+
95
+ dropdown[Name] = dropdown
96
+ drpsvar[Name] = var
97
+ def getDropdownValue(Name: str):
98
+ """Get the selected option from the dropdown using the Name"""
99
+ if Name in drpsvar:
100
+ return drpsvar[Name].get()
101
+ return None
102
+
103
+ def getValue(Name: str):
104
+ """Returns the current string inside an entry widget."""
105
+ if Name in entries:
106
+ return entries[Name].get()
107
+ return ""
108
+
109
+ def updateLabel(Name: str, NewText: str):
110
+ """Updates the text of an existing label."""
111
+ if Name in labels:
112
+ labels[Name].configure(text=NewText)
113
+
114
+ def updateTextButton(Name: str, NewText: str):
115
+ """Updates the text of an existing button."""
116
+ if Name in buttons:
117
+ buttons[Name].configure(text=NewText)
118
+
119
+ def exampleWindow():
120
+ createWindow("400x400", "eazyctk Example")
121
+ createLabel("lbl1", "Welcome to eazyctk", 20, 20)
122
+ createCheckbox("cb1", "Enable Feature", 20, 60)
123
+ createDropdown("dd1", ["Option 1", "Option 2", "Option 3"], 20, 100)
124
+ createButton("btn1", "Submit", lambda: print(f"Selected: {getDropdownValue('dd1')}"), 20, 150)
125
+ start()
126
+
127
+ def start():
128
+ """Starts the application."""
129
+ if _root:
130
+ _root.mainloop()
@@ -0,0 +1,30 @@
1
+ Metadata-Version: 2.4
2
+ Name: eazyctk
3
+ Version: 0.0.1
4
+ Summary: A simple wrapper for customtkinter
5
+ Author-email: Marius <negoitamarius2015.2@gmail.com>
6
+ Requires-Python: >=3.7
7
+ Description-Content-Type: text/markdown
8
+ License-File: LICENSE
9
+ Requires-Dist: customtkinter
10
+ Dynamic: license-file
11
+
12
+ # eazyctk
13
+
14
+ `eazyctk` is a simplified wrapper for `customtkinter`, designed to make building GUI applications in Python faster and easier.
15
+
16
+ ## Features
17
+ * **Simplified UI creation**: Quickly create labels, buttons, and entries with less code.
18
+ * **State Management**: Automatically keeps track of your widgets in simple dictionaries.
19
+ * **Built-in Examples**: Includes helper functions like `exampleWindow()` to get you started immediately.
20
+
21
+ ## Quick Example
22
+ Here is how easy it is to create a calculator using `eazyctk`:
23
+
24
+ ```python
25
+ from eazyctk import *
26
+
27
+ createWindow("400x400", "My App")
28
+ createLabel("lbl1", "Hello World!", 20, 20)
29
+ createButton("btn1", "Click Me", lambda: print("Clicked!"), 20, 60)
30
+ start()
@@ -0,0 +1,10 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ src/eazyctk/__init__.py
5
+ src/eazyctk/eazyctk.py
6
+ src/eazyctk.egg-info/PKG-INFO
7
+ src/eazyctk.egg-info/SOURCES.txt
8
+ src/eazyctk.egg-info/dependency_links.txt
9
+ src/eazyctk.egg-info/requires.txt
10
+ src/eazyctk.egg-info/top_level.txt
@@ -0,0 +1 @@
1
+ customtkinter
@@ -0,0 +1 @@
1
+ eazyctk