papyrus_ogcproxy
papyrus_ogcproxy provides an easy and convenient method for embeding an OGC proxy in Pyramid applications.
The source code of papyrus_ogcproxy is straightforward, so if papyrus_ogcproxy doesn’t do what you want, open its source code, get inspiration, and write your own code.
Install
papyrus_ogcproxy can be installed with easy_install:
$ easy_install papyrus_ogcproxy
Often you’ll want to make papyrus_ogcproxy a dependency of your Pyramid application, which is done by adding papyrus_ogcproxy to the install_requires list defined in the Pyramid application’s setup.py file.
Set up
Using papyrus_ogcproxy to set up an OGC proxy in a Pyramid application is easy.
Edit the application’s main file, __init__.py, and register papyrus_ogcproxy using the Configurator.include method:
def main(global_config, **settings):
config = Configurator(settings=settings)
import papyrus_ogcproxy
config.include(papyrus_ogcproxy)
That’s it! The OGC proxy is available at /ogcproxy.
Here is a test URL: http://localhost:6543/ogcproxy?url=http%3A%2F%2Fmap1.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi%3FSERVICE%3DWMTS%26REQUEST%3DGetCapabilities
Using a proxy for the proxy
If the requests made by the OGC proxy should be made through a proxy, the additional package pysocks is required. After the installation of this package, configure the proxy:
from papyrus_ogcproxy import views as ogcproxy_views from httplib2 import ProxyInfo import socks ogcproxy_views.proxy_info = ProxyInfo(socks.SOCKS5, 'localhost', 1080)
With this configuration the OGC proxy will make requests through the proxy localhost:1080. For information please refer to the documentation of PySocks and httplib2.
Set up a development environment
To set up a development environment with virtualenv, run the following commands:
$ virtualenv venv $ venv/bin/python setup.py develop $ venv/bin/pip install -r requirements-dev.txt
Run the tests
To run the tests:
$ venv/bin/nosetests --with-coverage
One test assumes that a proxy server is running at localhost:1080. To start a proxy run:
$ ssh -N -D 0.0.0.0:1080 localhost
0.2
Do not verify certificate from the remote server. https://github.com/elemoine/papyrus_ogcproxy/pull/4 from @sbrunner. (We may want to revisit this later.)
0.1
First version
Metadata
Release files for papyrus_ogcproxy 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| papyrus_ogcproxy-0.2.tar.gz | 5.2 kB | Without provenance | Details for papyrus_ogcproxy-0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| papyrus_ogcproxy-0.2-py2-none-any.whl | Python 2 | none | any | Details for papyrus_ogcproxy-0.2-py2-none-any.whl |
Total release size: 11.9 kB
Release files / papyrus_ogcproxy-0.2.tar.gz
| Download URL | papyrus_ogcproxy-0.2.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
19fae5a49d2ed5d1f6e5f53354d9c829f3c98827a0fd4784cf3534339441873e
|
|
BLAKE2b-256 checksum How to use checksums |
7c8b68bb248d31d06e0803606a451cccfba5caf609f2d8535103e045dfd829fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / papyrus_ogcproxy-0.2-py2-none-any.whl
| Download URL | papyrus_ogcproxy-0.2-py2-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
ecdd52641cd8443a973727f1f4f56f6dd50a500bf2bf82de55466c42aff65057
|
|
BLAKE2b-256 checksum How to use checksums |
fd20aac5ebc82a6ce3fb37e7cbd3feddf4d612a51cca1a3e0c0d6f96a8b05179
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for papyrus_ogcproxy 0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.