pytionlib 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.
@@ -0,0 +1,23 @@
1
+ Metadata-Version: 2.4
2
+ Name: pytionlib
3
+ Version: 0.1.0
4
+ Summary: A library that adds some actions
5
+ Author: Behind Games
6
+ Requires-Python: >=3.8
7
+ Description-Content-Type: text/markdown
8
+
9
+ # pytionlib
10
+
11
+ A library that adds some actions
12
+
13
+ ## Installation
14
+
15
+ pip install pytionlib
16
+
17
+ ## Usage
18
+
19
+ from pytionlib import *
20
+
21
+ say("launching...")
22
+ say(math("2 + 2"))
23
+ repeat(say("repeating...", 5))
@@ -0,0 +1,15 @@
1
+ # pytionlib
2
+
3
+ A library that adds some actions
4
+
5
+ ## Installation
6
+
7
+ pip install pytionlib
8
+
9
+ ## Usage
10
+
11
+ from pytionlib import *
12
+
13
+ say("launching...")
14
+ say(math("2 + 2"))
15
+ repeat(say("repeating...", 5))
@@ -0,0 +1,16 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "pytionlib"
7
+ version = "0.1.0"
8
+ description = "A library that adds some actions"
9
+ readme = "README.md"
10
+ requires-python = ">=3.8"
11
+ authors = [
12
+ {name = "Behind Games"}
13
+ ]
14
+
15
+ [tool.setuptools.packages.find]
16
+ where = ["src"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1 @@
1
+ from .main import *
@@ -0,0 +1,31 @@
1
+ class Action:
2
+ def __init__(self, func, *args):
3
+ self.func = func
4
+ self.args = args
5
+ self.used = False
6
+
7
+ def run(self):
8
+ self.used = True
9
+ self.func(*self.args)
10
+
11
+ def __del__(self):
12
+ if not self.used:
13
+ self.run()
14
+
15
+ def say(str=""):
16
+ return Action(print, str)
17
+
18
+ def repeat(action="", num=0):
19
+ if not isinstance(action, Action):
20
+ raise TypeError("Acction command expected")
21
+
22
+ action.used = True
23
+
24
+ for i in range(num):
25
+ action.run()
26
+
27
+ def math(expression=""):
28
+ if isinstance(expression, str):
29
+ return eval(expression)
30
+ else:
31
+ return expression
@@ -0,0 +1,23 @@
1
+ Metadata-Version: 2.4
2
+ Name: pytionlib
3
+ Version: 0.1.0
4
+ Summary: A library that adds some actions
5
+ Author: Behind Games
6
+ Requires-Python: >=3.8
7
+ Description-Content-Type: text/markdown
8
+
9
+ # pytionlib
10
+
11
+ A library that adds some actions
12
+
13
+ ## Installation
14
+
15
+ pip install pytionlib
16
+
17
+ ## Usage
18
+
19
+ from pytionlib import *
20
+
21
+ say("launching...")
22
+ say(math("2 + 2"))
23
+ repeat(say("repeating...", 5))
@@ -0,0 +1,8 @@
1
+ README.md
2
+ pyproject.toml
3
+ src/pytionlib/__init__.py
4
+ src/pytionlib/main.py
5
+ src/pytionlib.egg-info/PKG-INFO
6
+ src/pytionlib.egg-info/SOURCES.txt
7
+ src/pytionlib.egg-info/dependency_links.txt
8
+ src/pytionlib.egg-info/top_level.txt
@@ -0,0 +1 @@
1
+ pytionlib