PyNexusAPI 1.0.1b0__tar.gz → 1.0.3b0__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.4
2
2
  Name: PyNexusAPI
3
- Version: 1.0.1b0
3
+ Version: 1.0.3b0
4
4
  Summary: A massive bundle bridge for lazy developers to control OS, GUI, Keyboard and Mouse
5
5
  Author: Noob3ButUkr
6
6
  Classifier: Programming Language :: Python :: 3
@@ -24,5 +24,31 @@ Dynamic: summary
24
24
 
25
25
  \# PyNexusAPI (no not GD nexus, it would be Pyfnm04API then.)
26
26
 
27
- The ultimate bridge between lazy developers and low-level libraries, designed for good..
27
+ The ultimate bridge between lazy developers and low-level libraries, designed for good.
28
+
29
+
30
+
31
+ Usage:
32
+
33
+
34
+
35
+ Recomended to use "import PyNexusAPI as nexus" or "as pn"
36
+
37
+ Also - modules macOS, Linux, Windows are not cross-platform.
38
+
39
+
40
+
41
+ from PyNexusAPI import Mouse, Keyboard, Clipboard
42
+
43
+
44
+
45
+ Mouse.LeftClick()
46
+
47
+ Keyboard.FWrite("Hello world!")
48
+
49
+ Clipboard.CopyText("Hello world! x2")
50
+
51
+
52
+
53
+ Note: Clipboard.CopyAny works ONLY for Windows.
28
54
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyNexusAPI
3
- Version: 1.0.1b0
3
+ Version: 1.0.3b0
4
4
  Summary: A massive bundle bridge for lazy developers to control OS, GUI, Keyboard and Mouse
5
5
  Author: Noob3ButUkr
6
6
  Classifier: Programming Language :: Python :: 3
@@ -24,5 +24,31 @@ Dynamic: summary
24
24
 
25
25
  \# PyNexusAPI (no not GD nexus, it would be Pyfnm04API then.)
26
26
 
27
- The ultimate bridge between lazy developers and low-level libraries, designed for good..
27
+ The ultimate bridge between lazy developers and low-level libraries, designed for good.
28
+
29
+
30
+
31
+ Usage:
32
+
33
+
34
+
35
+ Recomended to use "import PyNexusAPI as nexus" or "as pn"
36
+
37
+ Also - modules macOS, Linux, Windows are not cross-platform.
38
+
39
+
40
+
41
+ from PyNexusAPI import Mouse, Keyboard, Clipboard
42
+
43
+
44
+
45
+ Mouse.LeftClick()
46
+
47
+ Keyboard.FWrite("Hello world!")
48
+
49
+ Clipboard.CopyText("Hello world! x2")
50
+
51
+
52
+
53
+ Note: Clipboard.CopyAny works ONLY for Windows.
28
54
 
@@ -0,0 +1,30 @@
1
+ \# PyNexusAPI (no not GD nexus, it would be Pyfnm04API then.)
2
+
3
+ The ultimate bridge between lazy developers and low-level libraries, designed for good.
4
+
5
+
6
+
7
+ Usage:
8
+
9
+
10
+
11
+ Recomended to use "import PyNexusAPI as nexus" or "as pn"
12
+
13
+ Also - modules macOS, Linux, Windows are not cross-platform.
14
+
15
+
16
+
17
+ from PyNexusAPI import Mouse, Keyboard, Clipboard
18
+
19
+
20
+
21
+ Mouse.LeftClick()
22
+
23
+ Keyboard.FWrite("Hello world!")
24
+
25
+ Clipboard.CopyText("Hello world! x2")
26
+
27
+
28
+
29
+ Note: Clipboard.CopyAny works ONLY for Windows.
30
+
@@ -7,22 +7,31 @@ import time
7
7
  import datetime
8
8
  import keyboard
9
9
  import pyperclip
10
- import win32clipboard
11
- import win32con
12
- import ctypes
13
- from ctypes import wintypes
10
+ if os.name == "nt":
11
+ import win32clipboard
12
+ import win32con
13
+ import ctypes
14
+ from ctypes import wintypes
15
+ else:
16
+ pass
14
17
  import warnings
15
18
  import customtkinter as ctk
16
-
17
- print("Thanks for using PyNexusAPI by PyNoob CaSP Software (C) 2026! This message can be deleted by going into project's file and just uhm like deleting it..")
18
-
19
- class DROPFILES(ctypes.Structure):
20
- _fields_ = [
21
- ("pFiles", wintypes.DWORD),
22
- ("pt", wintypes.POINT),
23
- ("fNC", wintypes.BOOL),
24
- ("fWide", wintypes.BOOL),
25
- ]
19
+ import builtins
20
+ # I import actions not when then needed because it will slow down it when functions is on, what did i just spell?
21
+
22
+ # print("Thanks for using PyNexusAPI by PyNoob CaSP Software (C) 2026! This message can be deleted by going into project's file and just uhm like deleting it..")
23
+ # deleted for good no being pygame
24
+
25
+ if system.platform == "win32":
26
+ class DROPFILES(ctypes.Structure):
27
+ _fields_ = [
28
+ ("pFiles", wintypes.DWORD),
29
+ ("pt", wintypes.POINT),
30
+ ("fNC", wintypes.BOOL),
31
+ ("fWide", wintypes.BOOL),
32
+ ]
33
+ else:
34
+ pass
26
35
 
27
36
  # WARNING: This is BETA version of PyNexusAPI, please download any updates and don't complain, again it's beta >w<
28
37
 
@@ -143,9 +152,11 @@ class Clipboard:
143
152
 
144
153
  @staticmethod
145
154
  def CopyAny(file_path):
155
+ if sys.platform != "win32":
156
+ raise OSError("Clipboard.CopyAny can be only executed on Microsoft Windows.")
146
157
  abs_path = os.path.abspath(file_path)
147
158
  if not os.path.exists(abs_path):
148
- raise FileNotFoundError(f"Файл по пути '{abs_path}' не существует!")
159
+ raise FileNotFoundError(f"File with path {abs_path} is not found because it doesn't exist.")
149
160
  file_str = abs_path + "\x00\x00"
150
161
  file_bytes = file_str.encode("utf-16-le")
151
162
  dropfiles = DROPFILES()
@@ -388,12 +399,10 @@ class Log:
388
399
  Log._orig_print(f"[PyNexusAPI.Log] Error: Unable to log: {e}")
389
400
  except:
390
401
  pass
391
- import builtins
392
402
  builtins.print = log_print
393
403
 
394
404
  @staticmethod
395
405
  def Unhook():
396
- import builtins
397
406
  builtins.print = Log._orig_print
398
407
 
399
408
  class App:
@@ -404,30 +413,25 @@ class App:
404
413
  self.window.title(title)
405
414
  self.window.geometry(size)
406
415
 
407
- @staticmethod
408
416
  def AddText(self, text, font_size=16, pady=10):
409
417
  label = ctk.CTkLabel(self.window, text=text, font=("Arial", font_size))
410
418
  label.pack(pady=pady)
411
419
  return label
412
420
 
413
- @staticmethod
414
421
  def AddButton(self, text, command, pady=10):
415
422
  btn = ctk.CTkButton(self.window, text=text, command=command)
416
423
  btn.pack(pady=pady)
417
424
  return btn
418
425
 
419
- @staticmethod
420
426
  def AddInput(self, placeholder="Input something...", width=250, pady=10):
421
427
  entry = ctk.CTkEntry(self.window, placeholder_text=placeholder, width=width)
422
428
  entry.pack(pady=pady)
423
429
  return entry
424
430
 
425
- @staticmethod
426
431
  def AddCheckbox(self, text, command=None, pady=10):
427
432
  checkbox = ctk.CTkCheckBox(self.window, text=text, command=command)
428
433
  checkbox.pack(pady=pady)
429
434
  return checkbox
430
435
 
431
- @staticmethod
432
436
  def Run(self):
433
437
  self.window.mainloop()
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="PyNexusAPI",
5
- version="1.0.1b0",
5
+ version="1.0.3b0",
6
6
  author="Noob3ButUkr", # or PyNoob3 CaSP Software (C) 2026, or even Python Noob3ButUkr Custom and Small Projects Copyright 2026
7
7
  description="A massive bundle bridge for lazy developers to control OS, GUI, Keyboard and Mouse",
8
8
  long_description=open("README.md", encoding="utf-8").read(),
@@ -1,4 +0,0 @@
1
- \# PyNexusAPI (no not GD nexus, it would be Pyfnm04API then.)
2
-
3
- The ultimate bridge between lazy developers and low-level libraries, designed for good..
4
-
File without changes