TwoPy 1.0.0__py3-none-any.whl

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.

Potentially problematic release.


This version of TwoPy might be problematic. Click here for more details.

@@ -0,0 +1,93 @@
1
+ Metadata-Version: 2.4
2
+ Name: TwoPy
3
+ Version: 1.0.0
4
+ Summary: Python project builder with encryption capability.
5
+ Home-page: https://example.com/twopy
6
+ Author: starfal8k
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: Operating System :: OS Independent
9
+ Requires-Python: >=3.7
10
+ Description-Content-Type: text/markdown
11
+ Requires-Dist: argparse
12
+ Requires-Dist: cryptography
13
+ Requires-Dist: zipfile
14
+ Requires-Dist: tempfile
15
+ Dynamic: author
16
+ Dynamic: classifier
17
+ Dynamic: description
18
+ Dynamic: description-content-type
19
+ Dynamic: home-page
20
+ Dynamic: requires-dist
21
+ Dynamic: requires-python
22
+ Dynamic: summary
23
+
24
+ # Install
25
+ ```shell
26
+ pip install TwoPy==version
27
+ ```
28
+
29
+
30
+ ## Example
31
+ ```python
32
+ import argparse
33
+ import os
34
+ from TwoPy import PythonProjectBuilder
35
+
36
+ def main():
37
+ parser = argparse.ArgumentParser(description="TwoPy")
38
+ parser.add_argument(
39
+ "project_path",
40
+ nargs='?',
41
+ default="src"
42
+ )
43
+ parser.add_argument("--rename", nargs='*')
44
+ parser.add_argument("--move", nargs='*')
45
+ parser.add_argument("--output", default="project.zip")
46
+ parser.add_argument("--encrypt", action='store_false')
47
+ parser.add_argument("--encrypted_output", default="project.enc")
48
+
49
+ args = parser.parse_args()
50
+
51
+ if not os.path.exists(args.project_path):
52
+ print(f"Error: Project path '{args.project_path}' not found!")
53
+ return
54
+
55
+ builder = PythonProjectBuilder(args.project_path)
56
+
57
+ rename_map = {}
58
+ if args.rename:
59
+ for pair in args.rename:
60
+ if "=" in pair:
61
+ old, new = pair.split("=", 1)
62
+ rename_map[old] = new
63
+ else:
64
+ print(f"Invalid rename format: {pair}")
65
+
66
+ move_map = {}
67
+ if args.move:
68
+ for pair in args.move:
69
+ if "=" in pair:
70
+ item, new_path = pair.split("=", 1)
71
+ move_map[item] = new_path
72
+ else:
73
+ print(f"Invalid move format: {pair}")
74
+
75
+ builder.adapt_structure(rename_map=rename_map, move_map=move_map)
76
+ builder.compress(args.output)
77
+
78
+ if args.encrypt:
79
+ key = builder.encrypt(args.output, args.encrypted_output)
80
+ print(f"Decryption key: {key.decode()}")
81
+
82
+ builder.cleanup()
83
+
84
+ if __name__ == "__main__":
85
+ main()
86
+ ```
87
+
88
+
89
+
90
+ ### ChangeLog
91
+
92
+ > [!NOTE] 1.0.0
93
+ > - First version
@@ -0,0 +1,4 @@
1
+ twopy-1.0.0.dist-info/METADATA,sha256=85wK5NwUEKULIy-uc1l6ZHIs42kITUSFem2fWAQ84NU,2283
2
+ twopy-1.0.0.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
3
+ twopy-1.0.0.dist-info/top_level.txt,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
4
+ twopy-1.0.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.8.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+