TwoPy 1.0.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.
Potentially problematic release.
This version of TwoPy might be problematic. Click here for more details.
- twopy-1.0.0/PKG-INFO +93 -0
- twopy-1.0.0/README.md +70 -0
- twopy-1.0.0/TwoPy.egg-info/PKG-INFO +93 -0
- twopy-1.0.0/TwoPy.egg-info/SOURCES.txt +7 -0
- twopy-1.0.0/TwoPy.egg-info/dependency_links.txt +1 -0
- twopy-1.0.0/TwoPy.egg-info/requires.txt +4 -0
- twopy-1.0.0/TwoPy.egg-info/top_level.txt +1 -0
- twopy-1.0.0/setup.cfg +4 -0
- twopy-1.0.0/setup.py +24 -0
twopy-1.0.0/PKG-INFO
ADDED
|
@@ -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
|
twopy-1.0.0/README.md
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Install
|
|
2
|
+
```shell
|
|
3
|
+
pip install TwoPy==version
|
|
4
|
+
```
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
## Example
|
|
8
|
+
```python
|
|
9
|
+
import argparse
|
|
10
|
+
import os
|
|
11
|
+
from TwoPy import PythonProjectBuilder
|
|
12
|
+
|
|
13
|
+
def main():
|
|
14
|
+
parser = argparse.ArgumentParser(description="TwoPy")
|
|
15
|
+
parser.add_argument(
|
|
16
|
+
"project_path",
|
|
17
|
+
nargs='?',
|
|
18
|
+
default="src"
|
|
19
|
+
)
|
|
20
|
+
parser.add_argument("--rename", nargs='*')
|
|
21
|
+
parser.add_argument("--move", nargs='*')
|
|
22
|
+
parser.add_argument("--output", default="project.zip")
|
|
23
|
+
parser.add_argument("--encrypt", action='store_false')
|
|
24
|
+
parser.add_argument("--encrypted_output", default="project.enc")
|
|
25
|
+
|
|
26
|
+
args = parser.parse_args()
|
|
27
|
+
|
|
28
|
+
if not os.path.exists(args.project_path):
|
|
29
|
+
print(f"Error: Project path '{args.project_path}' not found!")
|
|
30
|
+
return
|
|
31
|
+
|
|
32
|
+
builder = PythonProjectBuilder(args.project_path)
|
|
33
|
+
|
|
34
|
+
rename_map = {}
|
|
35
|
+
if args.rename:
|
|
36
|
+
for pair in args.rename:
|
|
37
|
+
if "=" in pair:
|
|
38
|
+
old, new = pair.split("=", 1)
|
|
39
|
+
rename_map[old] = new
|
|
40
|
+
else:
|
|
41
|
+
print(f"Invalid rename format: {pair}")
|
|
42
|
+
|
|
43
|
+
move_map = {}
|
|
44
|
+
if args.move:
|
|
45
|
+
for pair in args.move:
|
|
46
|
+
if "=" in pair:
|
|
47
|
+
item, new_path = pair.split("=", 1)
|
|
48
|
+
move_map[item] = new_path
|
|
49
|
+
else:
|
|
50
|
+
print(f"Invalid move format: {pair}")
|
|
51
|
+
|
|
52
|
+
builder.adapt_structure(rename_map=rename_map, move_map=move_map)
|
|
53
|
+
builder.compress(args.output)
|
|
54
|
+
|
|
55
|
+
if args.encrypt:
|
|
56
|
+
key = builder.encrypt(args.output, args.encrypted_output)
|
|
57
|
+
print(f"Decryption key: {key.decode()}")
|
|
58
|
+
|
|
59
|
+
builder.cleanup()
|
|
60
|
+
|
|
61
|
+
if __name__ == "__main__":
|
|
62
|
+
main()
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
### ChangeLog
|
|
68
|
+
|
|
69
|
+
> [!NOTE] 1.0.0
|
|
70
|
+
> - First version
|
|
@@ -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 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
twopy-1.0.0/setup.cfg
ADDED
twopy-1.0.0/setup.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from setuptools import setup, find_packages
|
|
2
|
+
|
|
3
|
+
setup(
|
|
4
|
+
name="TwoPy",
|
|
5
|
+
version="1.0.0",
|
|
6
|
+
author="starfal8k",
|
|
7
|
+
include_package_data=True,
|
|
8
|
+
install_requires=[
|
|
9
|
+
'argparse',
|
|
10
|
+
'cryptography',
|
|
11
|
+
'zipfile',
|
|
12
|
+
'tempfile'
|
|
13
|
+
],
|
|
14
|
+
description="Python project builder with encryption capability.",
|
|
15
|
+
long_description=open("README.md", encoding="utf-8").read(),
|
|
16
|
+
long_description_content_type="text/markdown",
|
|
17
|
+
url="https://example.com/twopy",
|
|
18
|
+
packages=find_packages(),
|
|
19
|
+
classifiers=[
|
|
20
|
+
"Programming Language :: Python :: 3",
|
|
21
|
+
"Operating System :: OS Independent",
|
|
22
|
+
],
|
|
23
|
+
python_requires='>=3.7',
|
|
24
|
+
)
|