kamsadev 0.1.0__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.
kamsadev-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: kamsadev
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Fast customtkinter gui wrapper
|
|
5
|
+
Author: darsan-ts
|
|
6
|
+
Author-email: darsan-ts <darsan.s2008@gmail.com>
|
|
7
|
+
Requires-Dist: customtkinter>=6.0.0
|
|
8
|
+
Requires-Python: >=3.13
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
|
|
11
|
+
# kamsadev
|
|
12
|
+
|
|
13
|
+
A fast, lightweight wrapper around CustomTkinter for rapid Python GUI development.
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pip install kamsadev
|
kamsadev-0.1.0/README.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "kamsadev"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Fast customtkinter gui wrapper"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.13"
|
|
7
|
+
dependencies = ["customtkinter>=6.0.0"]
|
|
8
|
+
|
|
9
|
+
[[project.authors]]
|
|
10
|
+
name = "darsan-ts"
|
|
11
|
+
email = "darsan.s2008@gmail.com"
|
|
12
|
+
|
|
13
|
+
[build-system]
|
|
14
|
+
requires = ["uv_build>=0.12.10,<0.13.0"]
|
|
15
|
+
build-backend = "uv_build"
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "kamsadev"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Fast customtkinter gui wrapper"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
authors = [
|
|
7
|
+
{ name = "darsan-ts", email = "darsan.s2008@gmail.com" }
|
|
8
|
+
]
|
|
9
|
+
requires-python = ">=3.13"
|
|
10
|
+
dependencies = [
|
|
11
|
+
"customtkinter>=6.0.0",
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
[build-system]
|
|
17
|
+
requires = ["uv_build>=0.12.10,<0.13.0"]
|
|
18
|
+
build-backend = "uv_build"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from .kamsadev import kamsadev, kamsabutton, show_kamsa_arguments
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import customtkinter as ctk
|
|
2
|
+
def show_kamsa_arguments():
|
|
3
|
+
print("kamsadev(name,size,bg,theme,resizable,fullscreen,transparency,topmost,icon)")
|
|
4
|
+
|
|
5
|
+
class kamsadev(ctk.CTk):
|
|
6
|
+
|
|
7
|
+
def __init__(self,name="TS",size="1920x1080",bg="#242424",theme="dark",resizable=True,fullscreen=False,transparency=1.0,topmost=False,icon=None,debug=False):
|
|
8
|
+
super().__init__()
|
|
9
|
+
self.title(name)
|
|
10
|
+
self.geometry(size)
|
|
11
|
+
self.config(bg=bg)
|
|
12
|
+
ctk.set_appearance_mode(theme)
|
|
13
|
+
self.resizable(resizable,resizable)
|
|
14
|
+
self.attributes("-fullscreen",fullscreen)
|
|
15
|
+
self.attributes("-alpha",transparency)
|
|
16
|
+
self.attributes("-topmost",topmost)
|
|
17
|
+
if icon:
|
|
18
|
+
self.iconbitmap(icon)
|
|
19
|
+
if debug:
|
|
20
|
+
self.bind("<Button-1>", self.show_coordinates)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def show_coordinates(self,event):
|
|
24
|
+
print(f"Clicked position -> x={event.x}, y={event.y}")
|
|
25
|
+
|
|
26
|
+
def run(self):
|
|
27
|
+
self.mainloop()
|
|
28
|
+
|
|
29
|
+
class kamsabutton(ctk.CTkButton):
|
|
30
|
+
def __init__(
|
|
31
|
+
self,
|
|
32
|
+
master=None,
|
|
33
|
+
width=140,
|
|
34
|
+
height=28,
|
|
35
|
+
corner_radius=None,
|
|
36
|
+
border_width=None,
|
|
37
|
+
border_spacing=2,
|
|
38
|
+
bg_color="transparent",
|
|
39
|
+
fg_color=None,
|
|
40
|
+
hover_color="#F2090D",
|
|
41
|
+
border_color=None,
|
|
42
|
+
text_color=None,
|
|
43
|
+
text_color_disabled=None,
|
|
44
|
+
background_corner_colors=None,
|
|
45
|
+
round_width_to_even_numbers=True,
|
|
46
|
+
round_height_to_even_numbers=True,
|
|
47
|
+
text="kamsaButton",
|
|
48
|
+
font=None,
|
|
49
|
+
textvariable=None,
|
|
50
|
+
image=None,
|
|
51
|
+
state="normal",
|
|
52
|
+
hover=True,
|
|
53
|
+
command=None,
|
|
54
|
+
compound="left",
|
|
55
|
+
anchor="center",
|
|
56
|
+
# PACK ARGUMENTS
|
|
57
|
+
pack=True,
|
|
58
|
+
side="top",
|
|
59
|
+
fill="none",
|
|
60
|
+
expand=False,
|
|
61
|
+
padx=0,
|
|
62
|
+
pady=10,
|
|
63
|
+
ipadx=0,
|
|
64
|
+
ipady=0,
|
|
65
|
+
pack_anchor="center",
|
|
66
|
+
# place arguments
|
|
67
|
+
place=False,
|
|
68
|
+
x=0,
|
|
69
|
+
y=0,
|
|
70
|
+
relx=0.0,
|
|
71
|
+
rely=0.0,
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
**kwargs
|
|
75
|
+
):
|
|
76
|
+
super().__init__(master, width, height, corner_radius, border_width, border_spacing, bg_color, fg_color, hover_color, border_color, text_color, text_color_disabled, background_corner_colors, round_width_to_even_numbers, round_height_to_even_numbers, text, font, textvariable, image, state, hover, command, compound, anchor, **kwargs)
|
|
77
|
+
if place:
|
|
78
|
+
|
|
79
|
+
self.place(x=x,y=y,relx=relx,rely=rely)
|
|
80
|
+
elif pack:
|
|
81
|
+
self.pack(
|
|
82
|
+
side=side,
|
|
83
|
+
fill=fill,
|
|
84
|
+
expand=expand,
|
|
85
|
+
padx=padx,
|
|
86
|
+
pady=pady,
|
|
87
|
+
ipadx=ipadx,
|
|
88
|
+
ipady=ipady,
|
|
89
|
+
anchor=pack_anchor
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
if __name__=="__main__":
|
|
95
|
+
app=kamsadev()
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
app.run()
|
|
100
|
+
show_kamsa_arguments()
|