Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(34)  |  Call(26)  |  Derive(0)  |  Import(8)

        def wms_request(req, validate=True, strict=True):
    version = _parse_version(req)
    req_type = _parse_request_type(req)
    
    version_requests = request_mapping.get(version, None)
    if version_requests is None:
        negotiated_version = negotiate_version(version)
        version_requests = request_mapping[negotiated_version]
    req_class = version_requests.get(req_type, None)
    if req_class is None:
        # use map request to get an exception handler for the requested version
        dummy_req = version_requests['map'](param=req.args, url=req.base_url,
                                            validate=False)
        raise RequestError("unknown WMS request type '%s'" % req_type, request=dummy_req)
    return req_class(param=req.args, url=req.base_url, validate=True,
                     non_strict=not strict, http=req)
        


src/m/a/MapProxy-1.6.0/mapproxy/service/wms.py   MapProxy(Download)
from functools import partial
from mapproxy.cache.tile import CacheInfo
from mapproxy.request.wms import (wms_request, WMS111LegendGraphicRequest,
    mimetype_from_infotype, infotype_from_mimetype, switch_bbox_epsg_axis_order)
from mapproxy.srs import SRS, TransformationError

src/m/a/mapproxy-HEAD/mapproxy/service/wms.py   mapproxy(Download)
from functools import partial
from mapproxy.cache.tile import CacheInfo
from mapproxy.request.wms import (wms_request, WMS111LegendGraphicRequest,
    mimetype_from_infotype, infotype_from_mimetype, switch_bbox_epsg_axis_order)
from mapproxy.srs import SRS, TransformationError

src/m/a/MapProxy-1.6.0/mapproxy/test/unit/test_request.py   MapProxy(Download)
from mapproxy.request.base import url_decode, Request, NoCaseMultiDict, RequestParams
from mapproxy.request.tile import TMSRequest, tile_request, TileRequest
from mapproxy.request.wms import (wms_request, WMSMapRequest, WMSMapRequestParams,
                              WMS111MapRequest, WMS100MapRequest, WMS130MapRequest,
                              WMS111FeatureInfoRequest)
    def test_basic_request(self):
        req = wms_request(DummyRequest(self.base_req), validate=False)
        assert isinstance(req, WMS100MapRequest)
        eq_(req.params.request, 'GetMap')
 
class TestWMS111MapRequest(TestWMSMapRequest):
    def test_basic_request(self):
        req = wms_request(DummyRequest(self.base_req), validate=False)
    def test_basic_request(self):
        req = wms_request(DummyRequest(self.base_req), validate=False)
        assert isinstance(req, WMS130MapRequest)
        eq_(req.params.request, 'GetMap')
        eq_(req.params.bbox, (50.0, 7.0, 51.0, 8.0))
    def test_basic_request(self):
        req = wms_request(DummyRequest(self.base_req))#, validate=False)
        assert isinstance(req, WMS111FeatureInfoRequest)
 
    def test_pos(self):

src/m/a/mapproxy-HEAD/mapproxy/test/unit/test_request.py   mapproxy(Download)
from mapproxy.request.base import url_decode, Request, NoCaseMultiDict, RequestParams
from mapproxy.request.tile import TMSRequest, tile_request, TileRequest
from mapproxy.request.wms import (wms_request, WMSMapRequest, WMSMapRequestParams,
                              WMS111MapRequest, WMS100MapRequest, WMS130MapRequest,
                              WMS111FeatureInfoRequest)
    def test_basic_request(self):
        req = wms_request(DummyRequest(self.base_req), validate=False)
        assert isinstance(req, WMS100MapRequest)
        eq_(req.params.request, 'GetMap')
 
class TestWMS111MapRequest(TestWMSMapRequest):
    def test_basic_request(self):
        req = wms_request(DummyRequest(self.base_req), validate=False)
    def test_basic_request(self):
        req = wms_request(DummyRequest(self.base_req), validate=False)
        assert isinstance(req, WMS130MapRequest)
        eq_(req.params.request, 'GetMap')
        eq_(req.params.bbox, (50.0, 7.0, 51.0, 8.0))
    def test_basic_request(self):
        req = wms_request(DummyRequest(self.base_req))#, validate=False)
        assert isinstance(req, WMS111FeatureInfoRequest)
 
    def test_pos(self):

src/m/a/MapProxy-1.6.0/mapproxy/test/system/test_wms.py   MapProxy(Download)
from cStringIO import StringIO
from mapproxy.srs import SRS
from mapproxy.request.wms import WMS100MapRequest, WMS111MapRequest, WMS130MapRequest, \
                                 WMS111FeatureInfoRequest, WMS111CapabilitiesRequest, \
                                 WMS130CapabilitiesRequest, WMS100CapabilitiesRequest, \

src/m/a/mapproxy-HEAD/mapproxy/test/system/test_wms.py   mapproxy(Download)
from cStringIO import StringIO
from mapproxy.srs import SRS
from mapproxy.request.wms import WMS100MapRequest, WMS111MapRequest, WMS130MapRequest, \
                                 WMS111FeatureInfoRequest, WMS111CapabilitiesRequest, \
                                 WMS130CapabilitiesRequest, WMS100CapabilitiesRequest, \

src/m/a/MapProxy-1.6.0/mapproxy/test/unit/test_auth.py   MapProxy(Download)
from mapproxy.request.base import Request
from mapproxy.exception import RequestError
from mapproxy.request.wms import wms_request
from mapproxy.request.tile import tile_request
from mapproxy.service.wms import WMSLayer, WMSGroupLayer, WMSServer
    def map_request(self, layers, auth):
        env = make_wsgi_env(MAP_REQ+'&layers=' + layers, extra_environ={'mapproxy.authorize': auth})
        req = Request(env)
        return wms_request(req)
 
    def fi_request(self, layers, auth):
        env = make_wsgi_env(FI_REQ+'&layers=%s&query_layers=%s' % (layers, layers),
                            extra_environ={'mapproxy.authorize': auth})
        req = Request(env)
        return wms_request(req)

src/m/a/mapproxy-HEAD/mapproxy/test/unit/test_auth.py   mapproxy(Download)
from mapproxy.request.base import Request
from mapproxy.exception import RequestError
from mapproxy.request.wms import wms_request
from mapproxy.request.tile import tile_request
from mapproxy.service.wms import WMSLayer, WMSGroupLayer, WMSServer
    def map_request(self, layers, auth):
        env = make_wsgi_env(MAP_REQ+'&layers=' + layers, extra_environ={'mapproxy.authorize': auth})
        req = Request(env)
        return wms_request(req)
 
    def fi_request(self, layers, auth):
        env = make_wsgi_env(FI_REQ+'&layers=%s&query_layers=%s' % (layers, layers),
                            extra_environ={'mapproxy.authorize': auth})
        req = Request(env)
        return wms_request(req)