Xsl transforming reverse proxy based on twisted and lxml
Installation
python3 -m pip install xslproxy
Usage
Usage: twist [options] plugin [plugin_options] xslproxy [options]
Options:
--backend= Url to backend, no trailing slash [default: http://localhost]
--help Display this help and exit.
--listen= Listen port (strports syntax) [default: tcp:8080]
--path= [default: A directory with xsl files]
--version Display Twisted version and exit.
Requests to one of the proxy endpoints will be forwarded to the backend. When a successful result is returned from the backend, content is transformed using the specified XSL stylesheets and sent to the client. The following proxy endpoints are available:
- /transform/{XSLPARAMS}
All stylesheets and parameters specified in XSLPARAMS are applied and to the backend response and the result is returned to the client with Content-Type header set to application/xml, text/html or text/plain according to the method specified in the <xsl:output> element of the last stylesheet in the chain.
The XSLPARAMS path segement takes the following key=value pairs. Each pair separated by the ampersand (&) character:
- xsl[]
Relative path to a stylesheet on the server (without .xsl or .xslt extension). This parameter can be specified multiple times.
- xa[stylesheet-key]
Stylesheet alias. Relative path to a stylesheet on the server (without .xsl or .xslt. This parameter is usefull if the same stylesheet should be applied multiple times with different parameters.
- xp[stylesheet-key][param-key]
XPath parameter with the name param-key for the stylesheet specified in stylesheet-key. The latter need to match one of the values specified via xsl[] parameter.
- sp[stylesheet-key][param-key]
String parameter with the name param-key for the stylesheet specified in stylesheet-key. The latter need to match one of the values specified via xsl[] parameter.
License
The software is subject to the AGPLv3 or later license.
Release files for xslproxy 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| xslproxy-1.2.0.tar.gz | 19.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| xslproxy-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 39.6 kB
Release files / xslproxy-1.2.0.tar.gz
| Download URL | xslproxy-1.2.0.tar.gz |
|---|---|
| Size | 19.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dc6d328bdf6e3c373a9a10d78116b4abeccea3cf705b69678c516ce266d706d3
|
|
BLAKE2b-256 checksum How to use checksums |
68be20716487ef73a58f3fcf4027a8f2a3864b5e86b6359c6db4b4326c1c57fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|
Release files / xslproxy-1.2.0-py3-none-any.whl
| Download URL | xslproxy-1.2.0-py3-none-any.whl |
|---|---|
| Size | 19.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
34e1e9cd7da29c5cf4c0a826171889554d5d373c7571c86526ad4016db5d2b29
|
|
BLAKE2b-256 checksum How to use checksums |
3ef514323119862c1823b841a1c4e061041b3ffa7d39a119c958a08bb7061c35
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|