Skip to main content

Proxy Implementation

Project description

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

pip install proxy

Basic Usage

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

Thank you

To Armin Ronacher and the werkzeug team for their thought leadership and excellent work

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

proxy_tools-0.1.0.tar.gz (3.0 kB view details)

Uploaded Source

File details

Details for the file proxy_tools-0.1.0.tar.gz.

File metadata

File hashes

Hashes for proxy_tools-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ccb3751f529c047e2d8a58440d86b205303cf0fe8146f784d1cbcd94f0a28010
MD5 b738390cdf62fce0ae0b65ea5c23783c
BLAKE2b-256 f2cf77d3e19b7fabd03895caca7857ef51e4c409e0ca6b37ee6e9f7daa50b642

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page