puffadder(龙目岛 Python 的替代品)没有维护?

puffadder (Lombok's alternative for Python) not maintained?

我正在寻找一些类似于 Java 的 Lombok 的 Python 库。 我找到了 puffadder 0.1,从 2016 年开始,但是现在我尝试用 pip 安装它,它不起作用。

链接:

Shell 输出:

$ pip3 install puffadder
Collecting puffadder
  Could not find a version that satisfies the requirement puffadder (from versions: )
No matching distribution found for puffadder

$ pip --version
pip 9.0.1 from /usr/lib/python2.7/dist-packages (python 2.7)

$ pip3 --version
pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)

$ pip3 install puffadder==0.1
Collecting puffadder==0.1
  Could not find a version that satisfies the requirement puffadder==0.1 (from versions: )
No matching distribution found for puffadder==0.1

$ pip install puffadder==0.1
Collecting puffadder==0.1
  Could not find a version that satisfies the requirement puffadder==0.1 (from versions: )
No matching distribution found for puffadder==0.1

$ sudo lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.3 LTS
Release:    18.04
Codename:   bionic

那么,它是否不再与 Python 的现代版本兼容? 为什么不再在 pip 中,它是否已停产,或者只是缺少 pip 中的集成(因此,我可以从 GitHub 克隆它)。

此外,除了使用 @property 之外,有人知道一些受支持的替代方法吗?

Python 添加了 3.7 dataclasses 这让我想起了 Java 中的龙目岛。它会生成 _init_、_repr_ 等等。

@dataclass()
class Name:
    first_name: str
    last_name: str

yoni = Name("Yoni", "Alaluf")
yoni2 = Name("Jony", "Alaluf")
print(yoni) # Name(first_name='Yoni', last_name='Alaluf')
print(yoni2) # Name(first_name='Jony', last_name='Alaluf')
print(yoni == yoni2) # False