This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Help us improve Python packaging - Donate today!
Project Description

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

0.1

  • First version
Release History

Release History

0.2

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2dev1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
papyrus_ogcproxy-0.2-py2-none-any.whl (6.7 kB) Copy SHA256 Checksum SHA256 2.7 Wheel Sep 13, 2016
papyrus_ogcproxy-0.2.tar.gz (5.2 kB) Copy SHA256 Checksum SHA256 Source Sep 13, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting