Coverage for gws-app/gws/base/ows/__init__.py: 100%

0 statements  

« prev     ^ index     » next       coverage.py v7.16.2, created at 2026-10-05 13:35 +0200

1"""OGC Web Services (OWS). 

2 

3Common base for the OWS support in GBD WebSuite: the client side, which reads data 

4from external OWS services, and the server side, which publishes project layers 

5as OWS services. The protocols themselves (WMS, WMTS, WFS, CSW) are implemented 

6as plugins in ``gws.plugin.ows_client`` and ``gws.plugin.ows_server``, built on 

7the classes in this package. 

8 

9Subpackages: 

10 

11- ``client``: base classes and helpers for OWS clients: the service provider 

12 (``provider``), the HTTP request helpers (``request``), capabilities parsing 

13 utilities (``parseutil``), the FeatureInfo response parser (``featureinfo``), 

14 a generic finder (``finder``) and model (``model``) backed by a provider, 

15 and the ``owsCaps`` CLI command (``cli``). 

16- ``server``: base classes and helpers for OWS services: the service base class 

17 (``service``), the service request (``request``), layer capabilities 

18 (``layer_caps``, ``core``), OWS exceptions (``error``), helpers for service 

19 templates (``templatelib``) and the ``ows`` web action (``action``). 

20 

21The interfaces shared by both sides (``gws.OwsProtocol``, ``gws.OwsVerb``, 

22``gws.OwsOperation``, ``gws.OwsService``, ``gws.OwsServiceProvider`` and others) 

23are defined in ``types.pyinc`` and included into the ``gws`` module. 

24 

25Example:: 

26 

27 import gws.base.ows.client 

28 import gws.base.ows.server 

29 

30 # client: send a raw OWS request 

31 args = gws.base.ows.client.request.Args( 

32 url='https://example.com/wms', 

33 protocol=gws.OwsProtocol.WMS, 

34 verb=gws.OwsVerb.GetCapabilities, 

35 ) 

36 xml = gws.base.ows.client.request.get_text(args) 

37"""