OWSLibNoSSL


NameOWSLibNoSSL JSON
Version 0.28.dev0 PyPI version JSON
download
home_pagehttps://github.com/williamccondori/OWSLib
SummaryOGC Web Service utility library without SSL verification
upload_time2023-01-28 20:28:03
maintainerWilliam Condori
docs_urlNone
authorSean Gillies
requires_python>=3.6
licenseBSD
keywords gis ogc iso 19115 fgdc dif ows wfs wms sos csw wps wcs capabilities metadata wmts
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            OWSLib
======

.. image:: https://github.com/geopython/OWSLib/workflows/build%20%E2%9A%99%EF%B8%8F/badge.svg
   :target: https://github.com/geopython/OWSLib/actions
   :alt: Build Status

.. image:: https://img.shields.io/github/license/geopython/OWSLib.svg
    :target: https://github.com/geopython/OWSLib/blob/master/LICENSE
    :alt: GitHub license

.. image:: https://badges.gitter.im/geopython/OWSLib.svg
    :target: https://gitter.im/geopython/OWSLib?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
    :alt: Join the chat at https://gitter.im/geopython/OWSLib

OWSLib is a Python package for client programming with Open Geospatial
Consortium (OGC) web service (hence OWS) interface standards, and their
related content models.

Full documentation is available at http://geopython.github.io/OWSLib

OWSLib provides a common API for accessing service metadata and wrappers for
numerous OGC Web Service interfaces.

Dependencies
------------

OWSLib requires elementtree (standard in 2.5 as xml.etree) or lxml.

Installation
------------

See http://geopython.github.io/OWSLib/#installation

Usage
-----

Find out what a WMS has to offer. Service metadata::

    >>> from owslib.wms import WebMapService
    >>> wms = WebMapService('http://wms.jpl.nasa.gov/wms.cgi', version='1.1.1')
    >>> wms.identification.type
    'OGC:WMS'
    >>> wms.identification.version
    '1.1.1'
    >>> wms.identification.title
    'JPL Global Imagery Service'
    >>> wms.identification.abstract
    'WMS Server maintained by JPL, worldwide satellite imagery.'

Available layers::

    >>> list(wms.contents)
    ['us_landsat_wgs84', 'modis', 'global_mosaic_base', 'huemapped_srtm',
    'srtm_mag', 'daily_terra', 'us_ned', 'us_elevation', 'global_mosaic',
    'daily_terra_ndvi', 'daily_aqua_ndvi', 'daily_aqua_721', 'daily_planet',
    'BMNG', 'srtmplus', 'us_colordem', None, 'daily_aqua', 'worldwind_dem',
    'daily_terra_721']

Details of a layer::

    >>> wms['global_mosaic'].title
    'WMS Global Mosaic, pan sharpened'
    >>> wms['global_mosaic'].boundingBoxWGS84
    (-180.0, -60.0, 180.0, 84.0)
    >>> wms['global_mosaic'].crsOptions
    ['EPSG:4326', 'AUTO:42003']
    >>> wms['global_mosaic'].styles
    {'pseudo_bright': {'title': 'Pseudo-color image (Uses IR and Visual bands,
    542 mapping), gamma 1.5'}, 'pseudo': {'title': '(default) Pseudo-color
    image, pan sharpened (Uses IR and Visual bands, 542 mapping), gamma 1.5'},
    'visual': {'title': 'Real-color image, pan sharpened (Uses the visual
    bands, 321 mapping), gamma 1.5'}, 'pseudo_low': {'title': 'Pseudo-color
    image, pan sharpened (Uses IR and Visual bands, 542 mapping)'},
    'visual_low': {'title': 'Real-color image, pan sharpened (Uses the visual
    bands, 321 mapping)'}, 'visual_bright': {'title': 'Real-color image (Uses
    the visual bands, 321 mapping), gamma 1.5'}}

Available methods, their URLs, and available formats::

    >>> [op.name for op in wms.operations]
    ['GetTileService', 'GetCapabilities', 'GetMap']
    >>> wms.getOperationByName('GetMap').methods
    {'Get': {'url': 'http://wms.jpl.nasa.gov/wms.cgi?'}}
    >>> wms.getOperationByName('GetMap').formatOptions
    ['image/jpeg', 'image/png', 'image/geotiff', 'image/tiff']

That's everything needed to make a request for imagery::

    >>> img = wms.getmap(   layers=['global_mosaic'],
    ...                     styles=['visual_bright'],
    ...                     srs='EPSG:4326',
    ...                     bbox=(-112, 36, -106, 41),
    ...                     size=(300, 250),
    ...                     format='image/jpeg',
    ...                     transparent=True
    ...                     )
    >>> out = open('jpl_mosaic_visb.jpg', 'wb')
    >>> out.write(img.read())
    >>> out.close()

A very similar API exists for WebFeatureService. See
tests/wfs_MapServerWFSCapabilities.txt for details.

There is also support for Web Coverage Service (WCS), Catalogue
Service for the Web (CSW), Web Processing Service (WPS), and Web
Map Tile Service (WMTS). Some of those are beta quality.


Logging
-------
OWSLib logs messages to the 'owslib' named python logger. You may
configure your application to use the log messages like so:

    >>> import logging
    >>> owslib_log = logging.getLogger('owslib')
    >>> # Add formatting and handlers as needed, for example to log to the console
    >>> ch = logging.StreamHandler()
    >>> ch.setLevel(logging.DEBUG)
    >>> ch.setFormatter(logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s'))
    >>> # add the handler to the logger
    >>> owslib_log.addHandler(ch)
    >>> owslib_log.setLevel(logging.DEBUG)

Releasing
---------

.. code-block:: bash

  # update version
  vi VERSION.txt
  vi owslib/__init__.py
  git commit -m 'update release version' VERSION.txt owslib/__init__.py
  # push changes
  git push origin master
  git tag -a x.y.z -m 'tagging OWSLib release x.y.z'
  # push tag
  git push --tags
  # update live docs
  cd docs
  make html
  ./publish.sh
  # update on PyPI (must be a maintainer)
  python setup.py sdist bdist_wheel --universal
  twine upload dist/*

My version
----------

I disabled SSL certificate verification for HTTPS requests in: owslib/util.py.

Support
-------

http://lists.osgeo.org/mailman/listinfo/owslib-users
http://lists.osgeo.org/mailman/listinfo/owslib-devel

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/williamccondori/OWSLib",
    "name": "OWSLibNoSSL",
    "maintainer": "William Condori",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "williamccondori@gmail.com",
    "keywords": "gis ogc iso 19115 fgdc dif ows wfs wms sos csw wps wcs capabilities metadata wmts",
    "author": "Sean Gillies",
    "author_email": "sean.gillies@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/ab/14/64c0d1ae048806b22107993d7c357902308cc0e6b9053e45a2913e4f220d/OWSLibNoSSL-0.28.dev0.tar.gz",
    "platform": null,
    "description": "OWSLib\r\n======\r\n\r\n.. image:: https://github.com/geopython/OWSLib/workflows/build%20%E2%9A%99%EF%B8%8F/badge.svg\r\n   :target: https://github.com/geopython/OWSLib/actions\r\n   :alt: Build Status\r\n\r\n.. image:: https://img.shields.io/github/license/geopython/OWSLib.svg\r\n    :target: https://github.com/geopython/OWSLib/blob/master/LICENSE\r\n    :alt: GitHub license\r\n\r\n.. image:: https://badges.gitter.im/geopython/OWSLib.svg\r\n    :target: https://gitter.im/geopython/OWSLib?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\r\n    :alt: Join the chat at https://gitter.im/geopython/OWSLib\r\n\r\nOWSLib is a Python package for client programming with Open Geospatial\r\nConsortium (OGC) web service (hence OWS) interface standards, and their\r\nrelated content models.\r\n\r\nFull documentation is available at http://geopython.github.io/OWSLib\r\n\r\nOWSLib provides a common API for accessing service metadata and wrappers for\r\nnumerous OGC Web Service interfaces.\r\n\r\nDependencies\r\n------------\r\n\r\nOWSLib requires elementtree (standard in 2.5 as xml.etree) or lxml.\r\n\r\nInstallation\r\n------------\r\n\r\nSee http://geopython.github.io/OWSLib/#installation\r\n\r\nUsage\r\n-----\r\n\r\nFind out what a WMS has to offer. Service metadata::\r\n\r\n    >>> from owslib.wms import WebMapService\r\n    >>> wms = WebMapService('http://wms.jpl.nasa.gov/wms.cgi', version='1.1.1')\r\n    >>> wms.identification.type\r\n    'OGC:WMS'\r\n    >>> wms.identification.version\r\n    '1.1.1'\r\n    >>> wms.identification.title\r\n    'JPL Global Imagery Service'\r\n    >>> wms.identification.abstract\r\n    'WMS Server maintained by JPL, worldwide satellite imagery.'\r\n\r\nAvailable layers::\r\n\r\n    >>> list(wms.contents)\r\n    ['us_landsat_wgs84', 'modis', 'global_mosaic_base', 'huemapped_srtm',\r\n    'srtm_mag', 'daily_terra', 'us_ned', 'us_elevation', 'global_mosaic',\r\n    'daily_terra_ndvi', 'daily_aqua_ndvi', 'daily_aqua_721', 'daily_planet',\r\n    'BMNG', 'srtmplus', 'us_colordem', None, 'daily_aqua', 'worldwind_dem',\r\n    'daily_terra_721']\r\n\r\nDetails of a layer::\r\n\r\n    >>> wms['global_mosaic'].title\r\n    'WMS Global Mosaic, pan sharpened'\r\n    >>> wms['global_mosaic'].boundingBoxWGS84\r\n    (-180.0, -60.0, 180.0, 84.0)\r\n    >>> wms['global_mosaic'].crsOptions\r\n    ['EPSG:4326', 'AUTO:42003']\r\n    >>> wms['global_mosaic'].styles\r\n    {'pseudo_bright': {'title': 'Pseudo-color image (Uses IR and Visual bands,\r\n    542 mapping), gamma 1.5'}, 'pseudo': {'title': '(default) Pseudo-color\r\n    image, pan sharpened (Uses IR and Visual bands, 542 mapping), gamma 1.5'},\r\n    'visual': {'title': 'Real-color image, pan sharpened (Uses the visual\r\n    bands, 321 mapping), gamma 1.5'}, 'pseudo_low': {'title': 'Pseudo-color\r\n    image, pan sharpened (Uses IR and Visual bands, 542 mapping)'},\r\n    'visual_low': {'title': 'Real-color image, pan sharpened (Uses the visual\r\n    bands, 321 mapping)'}, 'visual_bright': {'title': 'Real-color image (Uses\r\n    the visual bands, 321 mapping), gamma 1.5'}}\r\n\r\nAvailable methods, their URLs, and available formats::\r\n\r\n    >>> [op.name for op in wms.operations]\r\n    ['GetTileService', 'GetCapabilities', 'GetMap']\r\n    >>> wms.getOperationByName('GetMap').methods\r\n    {'Get': {'url': 'http://wms.jpl.nasa.gov/wms.cgi?'}}\r\n    >>> wms.getOperationByName('GetMap').formatOptions\r\n    ['image/jpeg', 'image/png', 'image/geotiff', 'image/tiff']\r\n\r\nThat's everything needed to make a request for imagery::\r\n\r\n    >>> img = wms.getmap(   layers=['global_mosaic'],\r\n    ...                     styles=['visual_bright'],\r\n    ...                     srs='EPSG:4326',\r\n    ...                     bbox=(-112, 36, -106, 41),\r\n    ...                     size=(300, 250),\r\n    ...                     format='image/jpeg',\r\n    ...                     transparent=True\r\n    ...                     )\r\n    >>> out = open('jpl_mosaic_visb.jpg', 'wb')\r\n    >>> out.write(img.read())\r\n    >>> out.close()\r\n\r\nA very similar API exists for WebFeatureService. See\r\ntests/wfs_MapServerWFSCapabilities.txt for details.\r\n\r\nThere is also support for Web Coverage Service (WCS), Catalogue\r\nService for the Web (CSW), Web Processing Service (WPS), and Web\r\nMap Tile Service (WMTS). Some of those are beta quality.\r\n\r\n\r\nLogging\r\n-------\r\nOWSLib logs messages to the 'owslib' named python logger. You may\r\nconfigure your application to use the log messages like so:\r\n\r\n    >>> import logging\r\n    >>> owslib_log = logging.getLogger('owslib')\r\n    >>> # Add formatting and handlers as needed, for example to log to the console\r\n    >>> ch = logging.StreamHandler()\r\n    >>> ch.setLevel(logging.DEBUG)\r\n    >>> ch.setFormatter(logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s'))\r\n    >>> # add the handler to the logger\r\n    >>> owslib_log.addHandler(ch)\r\n    >>> owslib_log.setLevel(logging.DEBUG)\r\n\r\nReleasing\r\n---------\r\n\r\n.. code-block:: bash\r\n\r\n  # update version\r\n  vi VERSION.txt\r\n  vi owslib/__init__.py\r\n  git commit -m 'update release version' VERSION.txt owslib/__init__.py\r\n  # push changes\r\n  git push origin master\r\n  git tag -a x.y.z -m 'tagging OWSLib release x.y.z'\r\n  # push tag\r\n  git push --tags\r\n  # update live docs\r\n  cd docs\r\n  make html\r\n  ./publish.sh\r\n  # update on PyPI (must be a maintainer)\r\n  python setup.py sdist bdist_wheel --universal\r\n  twine upload dist/*\r\n\r\nMy version\r\n----------\r\n\r\nI disabled SSL certificate verification for HTTPS requests in: owslib/util.py.\r\n\r\nSupport\r\n-------\r\n\r\nhttp://lists.osgeo.org/mailman/listinfo/owslib-users\r\nhttp://lists.osgeo.org/mailman/listinfo/owslib-devel\r\n",
    "bugtrack_url": null,
    "license": "BSD",
    "summary": "OGC Web Service utility library without SSL verification",
    "version": "0.28.dev0",
    "split_keywords": [
        "gis",
        "ogc",
        "iso",
        "19115",
        "fgdc",
        "dif",
        "ows",
        "wfs",
        "wms",
        "sos",
        "csw",
        "wps",
        "wcs",
        "capabilities",
        "metadata",
        "wmts"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b6cc208bb6391beb34ad9f3318e5314c1548e9c250449b75c469c75ffb214289",
                "md5": "4d3c8a4e600c410ab11d4e171acbb521",
                "sha256": "5dedb962cbe65ae605c242e975b30afd1954f72a387b96f510fe03bd59d69fb9"
            },
            "downloads": -1,
            "filename": "OWSLibNoSSL-0.28.dev0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4d3c8a4e600c410ab11d4e171acbb521",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 221522,
            "upload_time": "2023-01-28T20:28:00",
            "upload_time_iso_8601": "2023-01-28T20:28:00.878027Z",
            "url": "https://files.pythonhosted.org/packages/b6/cc/208bb6391beb34ad9f3318e5314c1548e9c250449b75c469c75ffb214289/OWSLibNoSSL-0.28.dev0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ab1464c0d1ae048806b22107993d7c357902308cc0e6b9053e45a2913e4f220d",
                "md5": "18d2147dc544333b6aba79a0f082f29f",
                "sha256": "e945fe32819fa00f88e828dec45785486f124c922d543bdda1d2a9644e11d11a"
            },
            "downloads": -1,
            "filename": "OWSLibNoSSL-0.28.dev0.tar.gz",
            "has_sig": false,
            "md5_digest": "18d2147dc544333b6aba79a0f082f29f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 180144,
            "upload_time": "2023-01-28T20:28:03",
            "upload_time_iso_8601": "2023-01-28T20:28:03.074642Z",
            "url": "https://files.pythonhosted.org/packages/ab/14/64c0d1ae048806b22107993d7c357902308cc0e6b9053e45a2913e4f220d/OWSLibNoSSL-0.28.dev0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-28 20:28:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "williamccondori",
    "github_project": "OWSLib",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "tox": true,
    "lcname": "owslibnossl"
}
        
Elapsed time: 0.04073s