espsoft 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.
espsoft/__init__.py ADDED
@@ -0,0 +1,6 @@
1
+ """espsoft — проект для теста """
2
+
3
+ from .core import greet, espsoft
4
+
5
+ __version__ = "0.1.0"
6
+ __all__ = ["greet", "espsoft", "__version__"]
espsoft/cli.py ADDED
@@ -0,0 +1,45 @@
1
+ """Командная строка пакета papandopala."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import argparse
6
+
7
+ from .core import greet, papandopala
8
+
9
+
10
+ def main() -> None:
11
+ """Точка входа консольной команды ``papandopala``."""
12
+ parser = argparse.ArgumentParser(
13
+ prog="papandopala",
14
+ description="Говорит papandopala и здоровается с указанным именем.",
15
+ )
16
+ parser.add_argument(
17
+ "name",
18
+ nargs="?",
19
+ default="world",
20
+ help="Имя, к которому обращаемся (по умолчанию: world)",
21
+ )
22
+ parser.add_argument(
23
+ "-n",
24
+ "--count",
25
+ type=int,
26
+ default=1,
27
+ help="Сколько раз повторить 'papandopala' (по умолчанию: 1)",
28
+ )
29
+ parser.add_argument(
30
+ "--version",
31
+ action="version",
32
+ version="%(prog)s 0.1.0",
33
+ )
34
+ args = parser.parse_args()
35
+
36
+ if args.count < 0:
37
+ parser.error("--count must be non-negative")
38
+
39
+ print(greet(args.name))
40
+ for word in papandopala(args.count):
41
+ print(word)
42
+
43
+
44
+ if __name__ == "__main__":
45
+ main()
espsoft/core.py ADDED
@@ -0,0 +1,42 @@
1
+ """Основные функции пакета papandopala."""
2
+
3
+ from __future__ import annotations
4
+
5
+
6
+ def greet(name: str = "world") -> str:
7
+ """Возвращает приветствие вида ``Papandopala, <name>!``.
8
+
9
+ Параметры
10
+ ---------
11
+ name:
12
+ Имя, к которому обращаемся. По умолчанию ``"world"``.
13
+
14
+ Пример
15
+ ------
16
+ >>> greet("мир")
17
+ 'Papandopala, мир!'
18
+ """
19
+ return f"Papandopala, {name}!"
20
+
21
+
22
+ def papandopala(n: int = 1) -> list[str]:
23
+ """Возвращает список из ``n`` строк ``"papandopala"``.
24
+
25
+ Параметры
26
+ ---------
27
+ n:
28
+ Сколько раз повторить слово. Должно быть >= 0.
29
+
30
+ Исключения
31
+ ----------
32
+ ValueError
33
+ Если ``n`` отрицательное.
34
+
35
+ Пример
36
+ ------
37
+ >>> papandopala(3)
38
+ ['papandopala', 'papandopala', 'papandopala']
39
+ """
40
+ if n < 0:
41
+ raise ValueError("n must be non-negative")
42
+ return ["papandopala"] * n
@@ -0,0 +1,74 @@
1
+ Metadata-Version: 2.5
2
+ Name: espsoft
3
+ Version: 0.1.0
4
+ Summary: A silly package that says espsoft
5
+ Project-URL: Homepage, https://gitlab.com/adpypi/espsoft-pypi
6
+ Project-URL: Issues, https://gitlab.com/adpypi/espsoft-pypi/issues
7
+ Author-email: Dmitriy Anisimov <espsoft@mail.ru>
8
+ License-Expression: MIT
9
+ License-File: LICENSE
10
+ Keywords: espsoft,example,fun
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python :: 3
14
+ Requires-Python: >=3.9
15
+ Description-Content-Type: text/markdown
16
+
17
+ # espsoft
18
+
19
+ Умеет здороваться и повторять слово
20
+ `espsoft` сколько угодно раз.
21
+
22
+ ## Установка
23
+
24
+ ```bash
25
+ pip install espsoft
26
+ ```
27
+
28
+ ## Использование в коде
29
+
30
+ ```python
31
+ from espsoft import greet, espsoft
32
+
33
+ print(greet("мир")) # espsoft, мир!
34
+ print(espsoft(3)) # ['espsoft', 'espsoft', 'espsoft']
35
+ ```
36
+
37
+ ## Использование из командной строки
38
+
39
+ ```bash
40
+ espsoft мир -n 2
41
+ ```
42
+
43
+ Вывод:
44
+
45
+ ```
46
+ espsoft, мир!
47
+ espsoft
48
+ espsoft
49
+ ```
50
+
51
+ ## Разработка
52
+
53
+ ```bash
54
+ # клонировать репозиторий
55
+ git clone https://gitlab.com/adpypi/espsoft-pypi.git
56
+ cd espsoft-pypi
57
+
58
+ # установить в editable-режиме вместе с dev-зависимостями
59
+ python3 -m pip install -e .
60
+ python3 -m pip install pytest build twine
61
+
62
+ # запустить тесты
63
+ pytest
64
+
65
+ # собрать дистрибутивы
66
+ python3 -m build
67
+
68
+ # загрузить на TestPyPI
69
+ python3 -m twine upload --repository testpypi dist/*
70
+ ```
71
+
72
+ ## Лицензия
73
+
74
+ MIT — см. файл [LICENSE](LICENSE).
@@ -0,0 +1,8 @@
1
+ espsoft/__init__.py,sha256=QaHMJv3Lx4kRrXx7rN_32vPEdDQ4hJCz1o-XUgBqR4Y,152
2
+ espsoft/cli.py,sha256=auR68gHt8SA2KtHLuLw1boqBd2JBfoQNmVXvOFI1bvY,1186
3
+ espsoft/core.py,sha256=WptZvtosM-f8GCLv7SCeDeyLAUXqjqTTtA6fKy3rwUA,1066
4
+ espsoft-0.1.0.dist-info/METADATA,sha256=2H119bQTelqr1dPKmsfSC-J1wB2buVSXhGquZ3kvif0,1671
5
+ espsoft-0.1.0.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
6
+ espsoft-0.1.0.dist-info/entry_points.txt,sha256=VFOjf_YI1HOPPMqE5fbn7ArNoQ-XvMLBcYJ-rnpGb04,45
7
+ espsoft-0.1.0.dist-info/licenses/LICENSE,sha256=4yPIzb8WqJrzsHrblKCFuU-B0XrEZGQezQBMbtEQfrE,1068
8
+ espsoft-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.33.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ espsoft = espsoft.cli:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ivan Ivanov
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.