PyNexusAPI 1.0b0__tar.gz → 1.0.2b0__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.0b0
3
+ Version: 1.0.2b0
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.0b0
3
+ Version: 1.0.2b0
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,14 +7,19 @@ 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:
14
16
  import warnings
15
17
  import customtkinter as ctk
18
+ import builtins
19
+ # I import actions not when then needed because it will slow down it when functions is on, what did i just spell?
16
20
 
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..")
21
+ # 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..")
22
+ # deleted for good no being pygame
18
23
 
19
24
  class DROPFILES(ctypes.Structure):
20
25
  _fields_ = [
@@ -143,9 +148,11 @@ class Clipboard:
143
148
 
144
149
  @staticmethod
145
150
  def CopyAny(file_path):
151
+ if sys.platform != "win32":
152
+ raise OSError("Clipboard.CopyAny can be only executed on Microsoft Windows.")
146
153
  abs_path = os.path.abspath(file_path)
147
154
  if not os.path.exists(abs_path):
148
- raise FileNotFoundError(f"Файл по пути '{abs_path}' не существует!")
155
+ raise FileNotFoundError(f"File with path {abs_path} is not found because it doesn't exist.")
149
156
  file_str = abs_path + "\x00\x00"
150
157
  file_bytes = file_str.encode("utf-16-le")
151
158
  dropfiles = DROPFILES()
@@ -222,6 +229,7 @@ class Time:
222
229
  @staticmethod
223
230
  def Wait(seconds):
224
231
  secs = str(seconds).strip()
232
+ # this doesnt work for some reason idk why >.<
225
233
  if len(secs) == 0:
226
234
  secs = 5.0
227
235
  warnings.warn("Requested empty time in PyNexusAPI.Time.Wait(). Automatically converted to 5 seconds.", SyntaxWarning)
@@ -259,8 +267,9 @@ class Screen:
259
267
  return None
260
268
 
261
269
  class Windows:
262
- if sys.platform != "win32":
263
- raise OSError("Class PyNexusAPI.Windows can only be executed on Microsoft Windows")
270
+ # if sys.platform != "win32":
271
+ # raise OSError("Class PyNexusAPI.Windows can only be executed on Microsoft Windows")
272
+ # deleted for now just please dont be stupid
264
273
 
265
274
  @staticmethod
266
275
  def GetActiveTitle():
@@ -311,8 +320,9 @@ class Windows:
311
320
  raise LookupError(f"Window with title '{window_title}' not found.")
312
321
 
313
322
  class macOS:
314
- if sys.platform != "darwin":
315
- raise OSError("Class PyNexusAPI.macOS can only be executed on macOS.")
323
+ # if sys.platform != "darwin":
324
+ # raise OSError("Class PyNexusAPI.macOS can only be executed on macOS.")
325
+ # deleted for now just please dont be stupid
316
326
 
317
327
  @staticmethod
318
328
  def Close(app_name):
@@ -336,8 +346,9 @@ class macOS:
336
346
 
337
347
 
338
348
  class Linux:
339
- if os.name != "posix" or sys.platform == "darwin":
340
- raise OSError("Class PyNexusAPI.Linux can only be executed on Linux.")
349
+ # if os.name != "posix" or sys.platform == "darwin":
350
+ # raise OSError("Class PyNexusAPI.Linux can only be executed on Linux.")
351
+ # deleted for now just please dont be stupid
341
352
 
342
353
  @staticmethod
343
354
  def _check_wmctrl():
@@ -384,12 +395,10 @@ class Log:
384
395
  Log._orig_print(f"[PyNexusAPI.Log] Error: Unable to log: {e}")
385
396
  except:
386
397
  pass
387
- import builtins
388
398
  builtins.print = log_print
389
399
 
390
400
  @staticmethod
391
401
  def Unhook():
392
- import builtins
393
402
  builtins.print = Log._orig_print
394
403
 
395
404
  class App:
@@ -400,30 +409,25 @@ class App:
400
409
  self.window.title(title)
401
410
  self.window.geometry(size)
402
411
 
403
- @staticmethod
404
412
  def AddText(self, text, font_size=16, pady=10):
405
413
  label = ctk.CTkLabel(self.window, text=text, font=("Arial", font_size))
406
414
  label.pack(pady=pady)
407
415
  return label
408
416
 
409
- @staticmethod
410
417
  def AddButton(self, text, command, pady=10):
411
418
  btn = ctk.CTkButton(self.window, text=text, command=command)
412
419
  btn.pack(pady=pady)
413
420
  return btn
414
421
 
415
- @staticmethod
416
422
  def AddInput(self, placeholder="Input something...", width=250, pady=10):
417
423
  entry = ctk.CTkEntry(self.window, placeholder_text=placeholder, width=width)
418
424
  entry.pack(pady=pady)
419
425
  return entry
420
426
 
421
- @staticmethod
422
427
  def AddCheckbox(self, text, command=None, pady=10):
423
428
  checkbox = ctk.CTkCheckBox(self.window, text=text, command=command)
424
429
  checkbox.pack(pady=pady)
425
430
  return checkbox
426
431
 
427
- @staticmethod
428
432
  def Run(self):
429
433
  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-beta",
5
+ version="1.0.2b0",
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