PyClsProps 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.
@@ -0,0 +1,25 @@
1
+ Metadata-Version: 2.4
2
+ Name: PyClsProps
3
+ Version: 0.1.0
4
+ Summary: Lightweight library for class properties in CPython
5
+ Requires-Python: >=3.11
6
+ Description-Content-Type: text/markdown
7
+ Provides-Extra: dev
8
+ Requires-Dist: pyright; extra == "dev"
9
+
10
+ # The lightweight library for class properties in CPython
11
+
12
+ ## Requirements:
13
+
14
+ - Python 3.11 or greater
15
+
16
+ ## Example of using:
17
+
18
+ ```python
19
+ from PyClsProps import classproperty
20
+
21
+ class MyClass:
22
+ @classproperty
23
+ def a(self) -> int:
24
+ return 42
25
+ ```
@@ -0,0 +1,11 @@
1
+ from collections.abc import Callable
2
+ from typing import Any, Generic, TypeVar
3
+
4
+ T = TypeVar("T")
5
+
6
+ class classproperty(Generic[T]):
7
+ def __init__(self, fget: Callable[[type[Any]], T]) -> None:
8
+ self.fget = fget
9
+
10
+ def __get__(self, obj: Any, owner: type[Any]) -> T:
11
+ return self.fget(owner)
File without changes
@@ -0,0 +1,25 @@
1
+ Metadata-Version: 2.4
2
+ Name: PyClsProps
3
+ Version: 0.1.0
4
+ Summary: Lightweight library for class properties in CPython
5
+ Requires-Python: >=3.11
6
+ Description-Content-Type: text/markdown
7
+ Provides-Extra: dev
8
+ Requires-Dist: pyright; extra == "dev"
9
+
10
+ # The lightweight library for class properties in CPython
11
+
12
+ ## Requirements:
13
+
14
+ - Python 3.11 or greater
15
+
16
+ ## Example of using:
17
+
18
+ ```python
19
+ from PyClsProps import classproperty
20
+
21
+ class MyClass:
22
+ @classproperty
23
+ def a(self) -> int:
24
+ return 42
25
+ ```
@@ -0,0 +1,9 @@
1
+ README.md
2
+ pyproject.toml
3
+ PyClsProps/__init__.py
4
+ PyClsProps/py.typed
5
+ PyClsProps.egg-info/PKG-INFO
6
+ PyClsProps.egg-info/SOURCES.txt
7
+ PyClsProps.egg-info/dependency_links.txt
8
+ PyClsProps.egg-info/requires.txt
9
+ PyClsProps.egg-info/top_level.txt
@@ -0,0 +1,3 @@
1
+
2
+ [dev]
3
+ pyright
@@ -0,0 +1 @@
1
+ PyClsProps
@@ -0,0 +1,16 @@
1
+ # The lightweight library for class properties in CPython
2
+
3
+ ## Requirements:
4
+
5
+ - Python 3.11 or greater
6
+
7
+ ## Example of using:
8
+
9
+ ```python
10
+ from PyClsProps import classproperty
11
+
12
+ class MyClass:
13
+ @classproperty
14
+ def a(self) -> int:
15
+ return 42
16
+ ```
@@ -0,0 +1,19 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "PyClsProps"
7
+ version = "0.1.0"
8
+ description = "Lightweight library for class properties in CPython"
9
+ requires-python = ">=3.11"
10
+ readme = "README.md"
11
+ dependencies = []
12
+
13
+ [project.optional-dependencies]
14
+ dev = [
15
+ "pyright"
16
+ ]
17
+
18
+ [tool.setuptools.package-data]
19
+ "PyClsProps" = ["py.typed"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+