你是如此徒劳,为什么不使用虚荣心呢?

A few months ago I created a package called Vanity

几个月前,我创建了一个名为Vanity的软件包

A few months ago I created a package called Vanity[0] that provides easy access to package download statistics from PyPI. You can find the source code here: https://github.com/aclark4life/vanity.

几个月前,我创建了一个名为Vanity [0]的软件包,该软件包可轻松访问PyPI的软件包下载统计信息。 您可以在这里找到源代码: https : //github.com/aclark4life/vanity

I love this tool, and I use it all the time to gauge the value of a package. Of course, downloads are only one criteria you can use to judge the value of a package, and arguably not even a very good one. Vanity itself is a good example of this phenomenon. I find it incredibly useful, but in it’s history it has only been downloaded 130 times.

我喜欢这个工具,并且一直使用它来评估包装的价值。 当然,下载仅是您可以用来判断软件包价值的一个标准,甚至可以说不是一个很好的标准。 虚荣本身就是这种现象的一个很好的例子。 我发现它非常有用,但是从历史上来看,它仅被下载了130次。

Other packages I have created with much less value have been downloaded more times, e.g. plonetheme.aclark_twitter which has been downloaded  674 times. But that package has also been around much longer. So obviously another useful metric would be the time period during which the downloads occurred.

我创建的其他具有较小价值的软件包已下载了更多次,例如plonetheme.aclark_twitter已被下载674次。 但是该软件包的使用时间也更长了。 因此,显然另一个有用的指标是下载发生的时间段。

Anyway, here is how it works:

无论如何,这是它的工作方式:

$ easy_install vanity
$ easy_install vanity

Then:

然后:

For example:

例如:

$ vanity vanity
Package `vanity` has been downloaded 130 times!
$ vanity vanity
Package `vanity` has been downloaded 130 times!

Or:

要么:

Some of my other favorites:

我的其他一些收藏夹:

$ vanity Django[1]
Package `Django` has been downloaded 302111 times!
$ vanity Django[1]
Package `Django` has been downloaded 302111 times!
$ vanity pyramid
Package `pyramid` has been downloaded 26067 times!
$ vanity pyramid
Package `pyramid` has been downloaded 26067 times!

Another thing to consider is if hitting PyPI each time is really necessary. I’m told there is PyPI data living somewhere else, and in future versions I would like to make vanity use that data by default.

要考虑的另一件事是,是否真的有必要每次都击中PyPI 。 有人告诉我PyPI数据存在于其他地方,在将来的版本中,我希望默认情况下虚荣地使用这些数据。

So, this post is simply to announce Vanity to a wider audience in the event that some folks may find it useful. Otherwise, I will be happy to continue to watch Vanity downloads crawl ever so slowly towards 200.

因此,这篇文章只是在某些人可能会觉得有用的情况下,向更多受众宣扬Vanity 。 否则,我将很高兴继续观看Vanity下载缓慢地朝200个方向爬行。

笔记 (Notes)

[0] By standing on the shoulders of some Plone giants, David Glick, in particular.

[0]特别是站在一些克隆巨人的肩膀上, 大卫·格里克(David Glick)

[1] There is a known issue with regard to making Vanity case insensitive.

[1]关于使虚荣不区分大小写,存在一个已知问题

翻译自: https://www.pybloggers.com/2011/06/youre-so-vain-so-why-not-use-vanity/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值