p1-example 0.1.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.
File without changes
@@ -0,0 +1,19 @@
1
+ Metadata-Version: 2.4
2
+ Name: p1-example
3
+ Version: 0.1.0
4
+ Summary: A Python utility package
5
+ Requires-Python: >=3.9
6
+ Description-Content-Type: text/markdown
7
+ License-File: LICENSE
8
+ Dynamic: license-file
9
+
10
+ [build-system]
11
+ requires = ["setuptools>=61.0"]
12
+ build-backend = "setuptools.build_meta"
13
+
14
+ [project]
15
+ name = "p1-example"
16
+ version = "0.1.0"
17
+ description = "A Python package for colorful terminal text"
18
+ readme = "README.md"
19
+ requires-python = ">=3.9"
@@ -0,0 +1,10 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "p1-example"
7
+ version = "0.1.0"
8
+ description = "A Python package for colorful terminal text"
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
@@ -0,0 +1,13 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "p1-example"
7
+ version = "0.1.0"
8
+ description = "A Python utility package"
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+
12
+ [tool.setuptools.packages.find]
13
+ where = ["src"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,3 @@
1
+ from .helper import make_colorful_text, cprint
2
+ __version__ = "1.0.0"
3
+ #__all__ = ["make_colorful_text", "cprint"]
@@ -0,0 +1,11 @@
1
+ from termcolor import colored
2
+
3
+ def make_colorful_text(text:str, color:str = 'white') -> str:
4
+ return colored(text, color)
5
+
6
+ def cprint(**kwargs) -> None:
7
+ for k, v in kwargs.items():
8
+ key = make_colorful_text(k, 'red')
9
+ value = make_colorful_text(v, 'green')
10
+ print(f"{key}: {value}")
11
+
@@ -0,0 +1,19 @@
1
+ Metadata-Version: 2.4
2
+ Name: p1-example
3
+ Version: 0.1.0
4
+ Summary: A Python utility package
5
+ Requires-Python: >=3.9
6
+ Description-Content-Type: text/markdown
7
+ License-File: LICENSE
8
+ Dynamic: license-file
9
+
10
+ [build-system]
11
+ requires = ["setuptools>=61.0"]
12
+ build-backend = "setuptools.build_meta"
13
+
14
+ [project]
15
+ name = "p1-example"
16
+ version = "0.1.0"
17
+ description = "A Python package for colorful terminal text"
18
+ readme = "README.md"
19
+ requires-python = ">=3.9"
@@ -0,0 +1,10 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ src/p1/__init__.py
5
+ src/p1/helper.py
6
+ src/p1_example.egg-info/PKG-INFO
7
+ src/p1_example.egg-info/SOURCES.txt
8
+ src/p1_example.egg-info/dependency_links.txt
9
+ src/p1_example.egg-info/top_level.txt
10
+ test/test_cprint.py
@@ -0,0 +1,13 @@
1
+ from p1 import make_colorful_text, cprint
2
+
3
+ def test_cprint_no_var(capsys):
4
+ cprint()
5
+ captured = capsys.readouterr()
6
+ assert captured.out == ''
7
+
8
+ def test_cprint_one_var(capsys):
9
+ cprint(ping="pong")
10
+ captured = capsys.readouterr()
11
+ assert captured.out == ('\x1b[31mping\x1b[0m: ' \
12
+ '\x1b[32mpong\x1b[0m\n')
13
+