{"id":13856769,"url":"https://github.com/geopython/OWSLib","last_synced_at":"2025-07-13T19:32:38.985Z","repository":{"id":2223518,"uuid":"3174198","full_name":"geopython/OWSLib","owner":"geopython","description":"OWSLib is a Python package for client programming with Open Geospatial Consortium (OGC) web service (hence OWS) interface standards, and their related content models.","archived":false,"fork":false,"pushed_at":"2024-11-07T17:36:16.000Z","size":5414,"stargazers_count":390,"open_issues_count":13,"forks_count":277,"subscribers_count":27,"default_branch":"master","last_synced_at":"2024-11-07T18:23:27.345Z","etag":null,"topics":["ogc","ogcapi","ows"],"latest_commit_sha":null,"homepage":"https://owslib.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geopython.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.rst","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-01-13T20:41:36.000Z","updated_at":"2024-11-07T17:36:21.000Z","dependencies_parsed_at":"2023-09-25T02:02:46.912Z","dependency_job_id":"a87fd39d-c08b-44cd-9b8e-3e43810bcae5","html_url":"https://github.com/geopython/OWSLib","commit_stats":{"total_commits":1964,"total_committers":159,"mean_commits":"12.352201257861635","dds":0.820264765784114,"last_synced_commit":"4633c618b44380135ef638daaafeb1c5e36bade1"},"previous_names":[],"tags_count":89,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geopython%2FOWSLib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geopython%2FOWSLib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geopython%2FOWSLib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geopython%2FOWSLib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geopython","download_url":"https://codeload.github.com/geopython/OWSLib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225912252,"owners_count":17544132,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ogc","ogcapi","ows"],"created_at":"2024-08-05T03:01:12.533Z","updated_at":"2025-07-13T19:32:38.974Z","avatar_url":"https://github.com/geopython.png","language":"Python","readme":"# OWSLib\n\n[![Build](https://github.com/geopython/OWSLib/workflows/main.yml/badge.svg)](https://github.com/geopython/OWSLib/actions)\n[![License](https://img.shields.io/github/license/geopython/OWSLib.svg)](https://github.com/geopython/OWSLib/blob/master/LICENSE)\n[![Chat](https://badges.gitter.im/geopython/OWSLib.svg)](https://app.gitter.im/#/room/#geopython_owslib:gitter.im)\n\n## Overview\n\nOWSLib is a Python package for client programming with Open Geospatial\nConsortium (OGC) web service (hence OWS) interface standards, and their\nrelated content models.\n\nFull documentation is available at https://owslib.readthedocs.io\n\nOWSLib provides a common API for accessing service metadata and wrappers for\nnumerous OGC Web Service interfaces.\n\n## Installation\n\nThe easiest way to install OWSLib is via the Python [pip](https://pip.pypa.io)\nutility:\n\n```bash\npip3 install OWSLib\n```\n\n## Requirements\n\n- Python 3\n- [virtualenv](https://virtualenv.pypa.io)\n\n### Dependencies\n\nDependencies are listed in [requirements.txt](requirements.txt). Dependencies\nare automatically installed during OWSLib installation.\n\n### Installing OWSLib\n\n```bash\n# setup virtualenv\npython3 -m venv owslib\ncd owslib\nsource bin/activate\n\n# clone codebase and install\ngit clone https://github.com/geopython/OWSLib.git\ncd OWSLib\npython3 setup.py install\n```\n\n## Running\n\nFind out what a WMS has to offer. Service metadata:\n\n```python\n\n\u003e\u003e\u003e from owslib.wms import WebMapService\n\u003e\u003e\u003e wms = WebMapService('http://wms.jpl.nasa.gov/wms.cgi', version='1.1.1')\n\u003e\u003e\u003e wms.identification.type\n'OGC:WMS'\n\u003e\u003e\u003e wms.identification.version\n'1.1.1'\n\u003e\u003e\u003e wms.identification.title\n'JPL Global Imagery Service'\n\u003e\u003e\u003e wms.identification.abstract\n'WMS Server maintained by JPL, worldwide satellite imagery.'\n\nAvailable layers::\n\n    \u003e\u003e\u003e list(wms.contents)\n    ['us_landsat_wgs84', 'modis', 'global_mosaic_base', 'huemapped_srtm',\n    'srtm_mag', 'daily_terra', 'us_ned', 'us_elevation', 'global_mosaic',\n    'daily_terra_ndvi', 'daily_aqua_ndvi', 'daily_aqua_721', 'daily_planet',\n    'BMNG', 'srtmplus', 'us_colordem', None, 'daily_aqua', 'worldwind_dem',\n    'daily_terra_721']\n\nDetails of a layer::\n\n    \u003e\u003e\u003e wms['global_mosaic'].title\n    'WMS Global Mosaic, pan sharpened'\n    \u003e\u003e\u003e wms['global_mosaic'].boundingBoxWGS84\n    (-180.0, -60.0, 180.0, 84.0)\n    \u003e\u003e\u003e wms['global_mosaic'].crsOptions\n    ['EPSG:4326', 'AUTO:42003']\n    \u003e\u003e\u003e wms['global_mosaic'].styles\n    {'pseudo_bright': {'title': 'Pseudo-color image (Uses IR and Visual bands,\n    542 mapping), gamma 1.5'}, 'pseudo': {'title': '(default) Pseudo-color\n    image, pan sharpened (Uses IR and Visual bands, 542 mapping), gamma 1.5'},\n    'visual': {'title': 'Real-color image, pan sharpened (Uses the visual\n    bands, 321 mapping), gamma 1.5'}, 'pseudo_low': {'title': 'Pseudo-color\n    image, pan sharpened (Uses IR and Visual bands, 542 mapping)'},\n    'visual_low': {'title': 'Real-color image, pan sharpened (Uses the visual\n    bands, 321 mapping)'}, 'visual_bright': {'title': 'Real-color image (Uses\n    the visual bands, 321 mapping), gamma 1.5'}}\n\nAvailable methods, their URLs, and available formats::\n\n    \u003e\u003e\u003e [op.name for op in wms.operations]\n    ['GetTileService', 'GetCapabilities', 'GetMap']\n    \u003e\u003e\u003e wms.getOperationByName('GetMap').methods\n    {'Get': {'url': 'http://wms.jpl.nasa.gov/wms.cgi?'}}\n    \u003e\u003e\u003e wms.getOperationByName('GetMap').formatOptions\n    ['image/jpeg', 'image/png', 'image/geotiff', 'image/tiff']\n\nThat's everything needed to make a request for imagery::\n\n    \u003e\u003e\u003e img = wms.getmap(   layers=['global_mosaic'],\n    ...                     styles=['visual_bright'],\n    ...                     srs='EPSG:4326',\n    ...                     bbox=(-112, 36, -106, 41),\n    ...                     size=(300, 250),\n    ...                     format='image/jpeg',\n    ...                     transparent=True\n    ...                     )\n    \u003e\u003e\u003e out = open('jpl_mosaic_visb.jpg', 'wb')\n    \u003e\u003e\u003e out.write(img.read())\n    \u003e\u003e\u003e out.close()\n```\n\nA very similar API exists for WebFeatureService. See\ntests/wfs_MapServerWFSCapabilities.txt for details.\n\nThere is also support for Web Coverage Service (WCS), Catalogue\nService for the Web (CSW), Web Processing Service (WPS), and Web\nMap Tile Service (WMTS). Some of those are beta quality.\n\n\nLogging\n-------\nOWSLib logs messages to module-based named Python loggers. You may\nconfigure your application to use the log messages like so:\n\n```python\n    \u003e\u003e\u003e import logging\n    \u003e\u003e\u003e LOGGER = logging.getLogger(__name__)\n    \u003e\u003e\u003e # Add formatting and handlers as needed, for example to log to the console\n    \u003e\u003e\u003e ch = logging.StreamHandler()\n    \u003e\u003e\u003e ch.setLevel(logging.DEBUG)\n    \u003e\u003e\u003e ch.setFormatter(logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s'))\n    \u003e\u003e\u003e # add the handler to the logger\n    \u003e\u003e\u003e LOGGER.addHandler(ch)\n    \u003e\u003e\u003e LOGGER.setLevel(logging.DEBUG)\n```\n\nReleasing\n---------\n\n```bash\n  # update version\n  vi owslib/__init__.py\n  git commit -m 'update release version' owslib/__init__.py\n  # push changes\n  git push origin master\n  git tag -a x.y.z -m 'tagging OWSLib release x.y.z'\n  # push tag\n  git push --tags\n  # update on PyPI (must be a maintainer)\n  rm -fr build dist *.egg-info\n  python3 -m build\n  twine upload dist/*\n```\n\nSupport\n-------\n\n- https://lists.osgeo.org/mailman/listinfo/owslib-users\n- https://lists.osgeo.org/mailman/listinfo/owslib-devel\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeopython%2FOWSLib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeopython%2FOWSLib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeopython%2FOWSLib/lists"}