yae 0.0.1__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.
- yae-0.0.1/LICENSE +21 -0
- yae-0.0.1/PKG-INFO +20 -0
- yae-0.0.1/README.md +1 -0
- yae-0.0.1/setup.cfg +4 -0
- yae-0.0.1/setup.py +35 -0
- yae-0.0.1/yae/__init__.py +1 -0
- yae-0.0.1/yae/__main__.py +9 -0
- yae-0.0.1/yae/common/__init__.py +0 -0
- yae-0.0.1/yae/common/cli.py +51 -0
- yae-0.0.1/yae/tools/__init__.py +6 -0
- yae-0.0.1/yae/tools/install.py +18 -0
- yae-0.0.1/yae/tools/update.py +18 -0
- yae-0.0.1/yae.egg-info/PKG-INFO +20 -0
- yae-0.0.1/yae.egg-info/SOURCES.txt +15 -0
- yae-0.0.1/yae.egg-info/dependency_links.txt +1 -0
- yae-0.0.1/yae.egg-info/requires.txt +3 -0
- yae-0.0.1/yae.egg-info/top_level.txt +1 -0
yae-0.0.1/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 malanore
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
yae-0.0.1/PKG-INFO
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: yae
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: DevOps Toolbox
|
|
5
|
+
Home-page: https://github.com/malanore-z/yae
|
|
6
|
+
Author: malanore
|
|
7
|
+
Author-email: malanore.z@gmail.com
|
|
8
|
+
Project-URL: Bug Tracker, https://github.com/malanore-z/yae/issues
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Requires-Python: >=3.6
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
License-File: LICENSE
|
|
16
|
+
Requires-Dist: psutil
|
|
17
|
+
Requires-Dist: PyYAML
|
|
18
|
+
Requires-Dist: numpy
|
|
19
|
+
|
|
20
|
+
# DevOps Toolbox
|
yae-0.0.1/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# DevOps Toolbox
|
yae-0.0.1/setup.cfg
ADDED
yae-0.0.1/setup.py
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import setuptools
|
|
2
|
+
|
|
3
|
+
with open("README.md", "r", encoding="utf-8") as fh:
|
|
4
|
+
long_description = fh.read()
|
|
5
|
+
|
|
6
|
+
setuptools.setup(
|
|
7
|
+
name="yae",
|
|
8
|
+
version="0.0.1",
|
|
9
|
+
author="malanore",
|
|
10
|
+
author_email="malanore.z@gmail.com",
|
|
11
|
+
description="DevOps Toolbox",
|
|
12
|
+
long_description=long_description,
|
|
13
|
+
long_description_content_type="text/markdown",
|
|
14
|
+
url="https://github.com/malanore-z/yae",
|
|
15
|
+
project_urls={
|
|
16
|
+
"Bug Tracker": "https://github.com/malanore-z/yae/issues",
|
|
17
|
+
},
|
|
18
|
+
classifiers=[
|
|
19
|
+
"Intended Audience :: Developers",
|
|
20
|
+
"Programming Language :: Python :: 3",
|
|
21
|
+
"License :: OSI Approved :: MIT License",
|
|
22
|
+
"Operating System :: OS Independent",
|
|
23
|
+
],
|
|
24
|
+
packages=setuptools.find_packages(include="dot.*"),
|
|
25
|
+
package_data={'dot': ['resources/*']},
|
|
26
|
+
python_requires=">=3.6",
|
|
27
|
+
install_requires=[
|
|
28
|
+
"psutil",
|
|
29
|
+
"PyYAML",
|
|
30
|
+
"numpy",
|
|
31
|
+
],
|
|
32
|
+
extras_requires={
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import yae.tools
|
|
File without changes
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import argparse
|
|
2
|
+
import functools
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
_parser = argparse.ArgumentParser(prog="yae", usage='%(prog)s <command> [options]',
|
|
6
|
+
description="The DevOps Toolbox")
|
|
7
|
+
_sub_parsers = _parser.add_subparsers(title="Sub Commands", dest="command", prog="action_prog",
|
|
8
|
+
metavar="command",
|
|
9
|
+
description="use 'dot <command> -h' to show help of sub command")
|
|
10
|
+
_command_map = {}
|
|
11
|
+
_parser_map = {}
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def subparser(entry, name, description=None, prog=None, help=None):
|
|
15
|
+
|
|
16
|
+
def decorator(func):
|
|
17
|
+
global _parser, _command_map, _parser_map
|
|
18
|
+
inner_prog = prog if prog is not None else "yae " + name
|
|
19
|
+
inner_help = help if help is not None else description
|
|
20
|
+
subparser_ = _sub_parsers.add_parser(name=name, prog=inner_prog, description=description, help=inner_help)
|
|
21
|
+
func(subparser_)
|
|
22
|
+
parser_ = argparse.ArgumentParser(prog=prog, description=description)
|
|
23
|
+
func(parser_)
|
|
24
|
+
_parser_map[name] = parser_
|
|
25
|
+
_command_map[name] = entry
|
|
26
|
+
|
|
27
|
+
@functools.wraps(func)
|
|
28
|
+
def wrapper(parser):
|
|
29
|
+
return func(parser)
|
|
30
|
+
|
|
31
|
+
return wrapper
|
|
32
|
+
|
|
33
|
+
return decorator
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def parse_args(argv=None, command=None):
|
|
37
|
+
global _parser, _parser_map
|
|
38
|
+
parser = _parser if command is None else _parser_map.get(command)
|
|
39
|
+
if parser is None:
|
|
40
|
+
print("Unknown command: " + command)
|
|
41
|
+
_parser.print_help()
|
|
42
|
+
return parser.parse_args(argv)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def run(argv=None, command=None):
|
|
46
|
+
global _command_map, _parser_map, _parser
|
|
47
|
+
args = parse_args(argv, command)
|
|
48
|
+
if args.command is None:
|
|
49
|
+
_parser.print_help()
|
|
50
|
+
else:
|
|
51
|
+
_command_map[args.command](args)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import yae.common.cli as cli
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def run(args):
|
|
5
|
+
pass
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@cli.subparser(entry=run, name="install", description="install_desp", help="install_help")
|
|
9
|
+
def add_update_parser(parser=None):
|
|
10
|
+
parser.add_argument('-e', "--extra-url", type=str, required=False, help="extra target url")
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def cli_main(argv=None):
|
|
14
|
+
cli.run(argv, "install")
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
if __name__ == "__main__":
|
|
18
|
+
cli_main()
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import yae.common.cli as cli
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def run(args):
|
|
5
|
+
pass
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@cli.subparser(entry=run, name="update", description="update_desp", help="update_help")
|
|
9
|
+
def add_update_parser(parser):
|
|
10
|
+
parser.add_argument('-i', "--index-url", type=str, required=False, help="target url")
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def cli_main(argv=None):
|
|
14
|
+
cli.run(argv, "update")
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
if __name__ == "__main__":
|
|
18
|
+
cli_main()
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: yae
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: DevOps Toolbox
|
|
5
|
+
Home-page: https://github.com/malanore-z/yae
|
|
6
|
+
Author: malanore
|
|
7
|
+
Author-email: malanore.z@gmail.com
|
|
8
|
+
Project-URL: Bug Tracker, https://github.com/malanore-z/yae/issues
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Requires-Python: >=3.6
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
License-File: LICENSE
|
|
16
|
+
Requires-Dist: psutil
|
|
17
|
+
Requires-Dist: PyYAML
|
|
18
|
+
Requires-Dist: numpy
|
|
19
|
+
|
|
20
|
+
# DevOps Toolbox
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
setup.py
|
|
4
|
+
yae/__init__.py
|
|
5
|
+
yae/__main__.py
|
|
6
|
+
yae.egg-info/PKG-INFO
|
|
7
|
+
yae.egg-info/SOURCES.txt
|
|
8
|
+
yae.egg-info/dependency_links.txt
|
|
9
|
+
yae.egg-info/requires.txt
|
|
10
|
+
yae.egg-info/top_level.txt
|
|
11
|
+
yae/common/__init__.py
|
|
12
|
+
yae/common/cli.py
|
|
13
|
+
yae/tools/__init__.py
|
|
14
|
+
yae/tools/install.py
|
|
15
|
+
yae/tools/update.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
yae
|