emtl 0.1.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.
- emtl/__init__.py +7 -0
- emtl/__main__.py +15 -0
- emtl/cli.py +34 -0
- emtl/core.py +2 -0
- emtl/tests/__init__.py +0 -0
- emtl/tests/test_cli.py +5 -0
- emtl/tests/test_core.py +5 -0
- emtl-0.1.0.dist-info/AUTHORS.rst +5 -0
- emtl-0.1.0.dist-info/LICENSE +9 -0
- emtl-0.1.0.dist-info/METADATA +93 -0
- emtl-0.1.0.dist-info/RECORD +14 -0
- emtl-0.1.0.dist-info/WHEEL +5 -0
- emtl-0.1.0.dist-info/entry_points.txt +2 -0
- emtl-0.1.0.dist-info/top_level.txt +1 -0
emtl/__init__.py
ADDED
emtl/__main__.py
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Entrypoint module, in case you use `python -memtl`.
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
Why does this file exist, and why __main__? For more info, read:
|
|
6
|
+
|
|
7
|
+
- https://www.python.org/dev/peps/pep-0338/
|
|
8
|
+
- https://docs.python.org/2/using/cmdline.html#cmdoption-m
|
|
9
|
+
- https://docs.python.org/3/using/cmdline.html#cmdoption-m
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
from emtl.cli import run
|
|
13
|
+
|
|
14
|
+
if __name__ == "__main__":
|
|
15
|
+
run()
|
emtl/cli.py
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Module that contains the command line app.
|
|
3
|
+
|
|
4
|
+
Why does this file exist, and why not put this in __main__?
|
|
5
|
+
|
|
6
|
+
You might be tempted to import things from __main__ later, but that will cause
|
|
7
|
+
problems: the code will get executed twice:
|
|
8
|
+
|
|
9
|
+
- When you run `python -memtl` python will execute
|
|
10
|
+
``__main__.py`` as a script. That means there will not be any
|
|
11
|
+
``emtl.__main__`` in ``sys.modules``.
|
|
12
|
+
- When you import __main__ it will get executed again (as a module) because
|
|
13
|
+
there"s no ``emtl.__main__`` in ``sys.modules``.
|
|
14
|
+
|
|
15
|
+
Also see (1) from http://click.pocoo.org/5/setuptools/#setuptools-integration
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
import argparse
|
|
19
|
+
|
|
20
|
+
from .core import emt
|
|
21
|
+
|
|
22
|
+
parser = argparse.ArgumentParser(description="Command description.")
|
|
23
|
+
parser.add_argument(
|
|
24
|
+
"names",
|
|
25
|
+
metavar="NAME",
|
|
26
|
+
nargs=argparse.ZERO_OR_MORE,
|
|
27
|
+
help="A name of something.",
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def run(args=None):
|
|
32
|
+
args = parser.parse_args(args=args)
|
|
33
|
+
print(emt(args.names))
|
|
34
|
+
parser.exit(0)
|
emtl/core.py
ADDED
emtl/tests/__init__.py
ADDED
|
File without changes
|
emtl/tests/test_cli.py
ADDED
emtl/tests/test_core.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024, Eastmoney Trade Library
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: emtl
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: An example package. Generated with cookiecutter-pylibrary.
|
|
5
|
+
Home-page: https://github.com/riiy/emtl
|
|
6
|
+
Author: Eastmoney Trade Library
|
|
7
|
+
Author-email: riiyzhou@gmail.com
|
|
8
|
+
License: MIT
|
|
9
|
+
Project-URL: Documentation, https://emtl.readthedocs.io/
|
|
10
|
+
Project-URL: Changelog, https://emtl.readthedocs.io/en/latest/changelog.html
|
|
11
|
+
Project-URL: Issue Tracker, https://github.com/riiy/emtl/issues
|
|
12
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Operating System :: Unix
|
|
16
|
+
Classifier: Operating System :: POSIX
|
|
17
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
18
|
+
Classifier: Programming Language :: Python
|
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
26
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
27
|
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
28
|
+
Classifier: Topic :: Utilities
|
|
29
|
+
Requires-Python: >=3.8
|
|
30
|
+
License-File: LICENSE
|
|
31
|
+
License-File: AUTHORS.rst
|
|
32
|
+
|
|
33
|
+
========
|
|
34
|
+
Overview
|
|
35
|
+
========
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
An example package. Generated with cookiecutter-pylibrary.
|
|
40
|
+
|
|
41
|
+
* Free software: MIT license
|
|
42
|
+
|
|
43
|
+
Installation
|
|
44
|
+
============
|
|
45
|
+
|
|
46
|
+
::
|
|
47
|
+
|
|
48
|
+
pip install emtl
|
|
49
|
+
|
|
50
|
+
You can also install the in-development version with::
|
|
51
|
+
|
|
52
|
+
pip install https://github.com/riiy/emtl/archive/main.zip
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
Documentation
|
|
56
|
+
=============
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
https://emtl.readthedocs.io/
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
Development
|
|
63
|
+
===========
|
|
64
|
+
|
|
65
|
+
To run all the tests run::
|
|
66
|
+
|
|
67
|
+
tox
|
|
68
|
+
|
|
69
|
+
Note, to combine the coverage data from all the tox environments run:
|
|
70
|
+
|
|
71
|
+
.. list-table::
|
|
72
|
+
:widths: 10 90
|
|
73
|
+
:stub-columns: 1
|
|
74
|
+
|
|
75
|
+
- - Windows
|
|
76
|
+
- ::
|
|
77
|
+
|
|
78
|
+
set PYTEST_ADDOPTS=--cov-append
|
|
79
|
+
tox
|
|
80
|
+
|
|
81
|
+
- - Other
|
|
82
|
+
- ::
|
|
83
|
+
|
|
84
|
+
PYTEST_ADDOPTS=--cov-append tox
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
Changelog
|
|
88
|
+
=========
|
|
89
|
+
|
|
90
|
+
0.1.0 (2024-04-11)
|
|
91
|
+
------------------
|
|
92
|
+
|
|
93
|
+
* First release on PyPI.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
emtl/__init__.py,sha256=xemGWqcYgS2Bs-qiaxdgBkHUzr-zcmp0sipbYlfiCq8,71
|
|
2
|
+
emtl/__main__.py,sha256=LWchqmTTmYGVQxOOrHz79E7BB3KH2lbb_Kot5ZvM-mQ,354
|
|
3
|
+
emtl/cli.py,sha256=DBh8Eo8I5l4RL2pDYaAJYNj4me5W_0x4l2AY6FHc4DM,954
|
|
4
|
+
emtl/core.py,sha256=4m00YH00POaZsD5J3OUzjp0__L04cskE4nkchJMxnqA,45
|
|
5
|
+
emtl/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
+
emtl/tests/test_cli.py,sha256=0gUN5UjBmPx-tkH1rQKBuE46z4kW1PyhXBtX2swwioE,123
|
|
7
|
+
emtl/tests/test_core.py,sha256=wckfz5ufrbNZF6tEQKwDWeKGQGFnKlNZd-uOlIOzAKc,85
|
|
8
|
+
emtl-0.1.0.dist-info/AUTHORS.rst,sha256=xt3hmz0NYo2k5nHfXhOY7m9uIhN6F7DfWyHfzbw6T1o,65
|
|
9
|
+
emtl-0.1.0.dist-info/LICENSE,sha256=nN91MfxmhevkwuOQorZiJ-169ZjKCm1joFt4sGy6wf0,1112
|
|
10
|
+
emtl-0.1.0.dist-info/METADATA,sha256=ziIdLxZwB6pz36OXKKVICnC93887B0uxIvH478lyzbU,2145
|
|
11
|
+
emtl-0.1.0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
12
|
+
emtl-0.1.0.dist-info/entry_points.txt,sha256=bY0OzdOwXIw9B13m43CvAF3_jSdD7GV94F0kcraVv5g,37
|
|
13
|
+
emtl-0.1.0.dist-info/top_level.txt,sha256=981JNAqsmRygU5VnwIWwF6ETEJYbvXqO7ncm7weua8s,5
|
|
14
|
+
emtl-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
emtl
|