proxy_tools-0.1.0
توضیحات
Proxy Implementation
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | proxy_tools-0.1.0 |
| نام | proxy_tools |
| نسخه کتابخانه | 0.1.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Jonathan Tushman |
| ایمیل نویسنده | jonathan@zefr.com |
| آدرس صفحه اصلی | http://github.com/jtushman/proxy_tools |
| آدرس اینترنتی | https://pypi.org/project/proxy_tools/ |
| مجوز | MIT |
proxy_tools
==============
I'm just a proxy
|Build Status|
Loveingly extracted from `werkzeug`_. A very useful proxy implementation, that I found to be useful outside
the web context -- hence the extraction.
Install
-------
.. code:: bash
pip install proxy
.. |Build Status| image:: https://travis-ci.org/jtushman/proxy.svg?branch=master
:target: https://travis-ci.org/jtushman/proxy_tools
Basic Usage
-----------
.. code:: python
from proxy_tools import Proxy
p = Proxy()
def get_current_user():
return User.find_by_id(request['user_id'])
current_user = p(get_current_user)
# Or alternatively
from proxy_tools import module_property
@module_property
def current_user():
return User.find_by_id(request['user_id'])
# Then
print(current_user.name)
Questions / Issues
------------------
Feel free to ping me on twitter: `@tushman`_
or add issues or PRs at https://github.com/jtushman/proxy_tools
.. _@tushman: http://twitter.com/tushman
Thank you
---------
To Armin Ronacher and the `werkzeug`_ team for their thought leadership and excellent work
.. _werkzeug: https://github.com/mitsuhiko/werkzeug
نحوه نصب
نصب پکیج whl proxy_tools-0.1.0:
pip install proxy_tools-0.1.0.whl
نصب پکیج tar.gz proxy_tools-0.1.0:
pip install proxy_tools-0.1.0.tar.gz