Python Selector(URL路由库),经验/意见? [英] Python Selector (URL routing library), experience/opinions?

查看:20
本文介绍了Python Selector(URL路由库),经验/意见?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有人对 Python 选择器有任何意见或经验?它看起来很棒,但我对它在 pypi 上的Alpha"状态和缺乏单元测试有点反感.

Does anyone have opinions about or experience with Python Selector? It looks great, but I'm a bit put off by its "Alpha" status on pypi and lack of unit tests.

我最喜欢它的简单、自包含和纯粹的 WSGI.我发现的所有其他 url 路由器都假设我正在使用 django、pylons、粘贴或引入许多其他依赖项,或者只是不要让我创建一个简单的 映射 url 模式到 wsgi 应用程序.真的,我想做的就是:

I mostly like that its simple, self contained, and pure WSGI. All other url routers I've found assume I'm using django, or pylons, or paste, or pull in lots of other dependencies, or just don't let me create a simple mapping of url patterns to wsgi apps. Really, all I want to do is:

mapper.add("/regex/{to}/{resource}", my_wsgi_app)
mapper.add("/another/.*", other_wsgi_app)
...etc...

无论如何,有没有人使用过它,或者知道有哪些项目?

Anyways, has anyone used it before, or know of projects that have?

推荐答案

过去几年我一直在使用 Selector,发现它非常稳定.现在至少两年了,它一直在 0.8.11.

I've used Selector for the last couple years and found it perfectly stable. It's been at 0.8.11 for at least two years now.

我会从中得出两个结论:

I would draw two conclusions from that:

  1. 它可能基本上没有维护.如果您发现其中的错误或需要新功能,我不会指望能够让卢克·阿诺 (Luke Arno) 立即跳起来修复它(不是说他不会,但我猜 Selector 是不是他这些天的主要关注点).在这种情况下,您是否愿意维护本地分叉?

  1. It could be basically unmaintained. If you find a bug in it or need a new feature, I wouldn't count on being able to get Luke Arno to jump up and fix it in a hurry (not saying he wouldn't, but I'm guessing that Selector isn't his main focus these days). Would you be comfortable maintaining a local fork in that case?

已经很完整了.它试图解决的问题包含在范围内.这是一个非常小的库,没有太多代码.这些错误已经被清除,并且真的没有什么可做的了.我想这是它很久没有更新的主要原因.基本完成了.

It's pretty much complete. The problem that it's trying to solve is contained in scope. It's a very small library without much code. The bugs have been shaken out and there's really nothing left to do on it. I think this is the main reason it hasn't been updated in a long time. It's basically done.

开源开发人员,尤其是 Python 开发人员,长期以来一直非常(可能过于)保守地将事物标记为 1.0.缺乏单元测试可能有点令人反感,但同样,它是一个解决范围有限问题的小型库.代码简短而清晰,足以让您阅读并确信其正确性.

Open source developers, and Python developers in particular, have a long history of being very (probably overly) conservative about marking things as 1.0. The lack of unit tests can be a little off-putting, but again, it's a small library solving a problem with limited scope. The code is short and clear enough to read and convince yourself of its correctness.

这篇关于Python Selector(URL路由库),经验/意见?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆