from owslib.csw import CatalogueServiceWeb
endpoint = 'http://geo.gov.ckan.org/csw'
http://geo.gov.ckan.org/csw?service=CSW&version=2.02&request=GetCapabilities
csw = CatalogueServiceWeb(endpoint)
csw.version
'2.0.2'
bbox=[-141,42,-52,84]
csw.getrecords(keywords=['temperature'],bbox=bbox,maxrecords=20)
csw.results
{'matches': 585, 'nextrecord': 21, 'returned': 20}
for rec,item in csw.records.iteritems():
print rec
#print item.abstract
76883fab-da69-4bec-bec0-710f187137a4 0304d90b-25ee-4595-ae4d-78a5104c017a ac33f735-a601-4c11-a24e-d9e9d138457b 46f04acb-98f6-4517-827d-23c0143f1d2f 0f138f93-9858-4fda-b634-45fa66150bbb 0a4f4f4c-ee70-43df-8f10-7b4cd8ef626d 4390d28e-baa3-49f4-a9cd-273121684263 456d00b4-d983-482f-9546-fb85d6d86ad3 ee6f7811-8ee6-439a-b643-fdd3b5d41c8e 9b34b5ed-59dd-4add-a453-06ba6f06f3a4 39992927-af4d-4392-9ee2-1b0f55a4b0ae 65126c7c-51cd-4302-9f5b-f01671406fad 7696a9bb-572a-4bc4-a306-efa91ef8a985 25c793eb-9d43-41f4-ad0f-88debb88ff42 gov.noaa.ngdc.stp.dmsp:G10017 96118650-fe1b-456a-88ee-e99dc8b59f26 c890bf00-4382-427e-8eef-39703d82ae8b d86328b0-8529-4b8f-a891-e0d9e0f7af68 4fa1698c-8ddc-4a30-ab3d-2fb146c5b212 bb2f7a04-062e-47ec-bf92-2f83085e8e4f
a=csw.records['76883fab-da69-4bec-bec0-710f187137a4']
dir(a)
['__class__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'abstract', 'accessrights', 'alternative', 'bbox', 'bbox_wgs84', 'contributor', 'coverage', 'created', 'creator', 'date', 'format', 'identifier', 'identifiers', 'ispartof', 'issued', 'language', 'license', 'modified', 'publisher', 'rdf', 'references', 'relation', 'rights', 'rightsholder', 'source', 'spatial', 'subjects', 'temporal', 'title', 'type', 'uris', 'xml']
print a.xml
<csw:SummaryRecord xmlns:csw="http://www.opengis.net/cat/csw/2.0.2" xmlns:apiso="http://www.opengis.net/cat/csw/apiso/1.0" xmlns:srv="http://www.isotc211.org/2005/srv" xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:gml="http://www.opengis.net/gml" xmlns:dif="http://gcmd.gsfc.nasa.gov/Aboutus/xml/dif/" xmlns:inspire_ds="http://inspire.ec.europa.eu/schemas/inspire_ds/1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:inspire_common="http://inspire.ec.europa.eu/schemas/common/1.0" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ows="http://www.opengis.net/ows" xmlns:fgdc="http://www.opengis.net/cat/csw/csdgm" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:os="http://a9.com/-/spec/opensearch/1.1/" xmlns:dct="http://purl.org/dc/terms/" xmlns:ogc="http://www.opengis.net/ogc"><dc:identifier>76883fab-da69-4bec-bec0-710f187137a4</dc:identifier><dc:title>NASA Earth Science Decadal Survey Studies</dc:title><dc:type>dataset</dc:type><dc:subject>EARTH SCIENCE > AGRICULTURE > AGRICULTURAL PLANT SCIENCE > CROP/PLANT YIELDS</dc:subject><dc:subject>EARTH SCIENCE > AGRICULTURE > AGRICULTURAL PLANT SCIENCE > CROPPING SYSTEMS</dc:subject><dc:subject>EARTH SCIENCE > AGRICULTURE > SOILS > SOIL MOISTURE/WATER CONTENT</dc:subject><dc:subject>EARTH SCIENCE > ATMOSPHERE > AEROSOLS > AEROSOL OPTICAL DEPTH/THICKNESS</dc:subject><dc:subject>EARTH SCIENCE > ATMOSPHERE > AEROSOLS > CARBONACEOUS AEROSOLS</dc:subject><dc:subject>EARTH SCIENCE > ATMOSPHERE > AEROSOLS > CLOUD CONDENSATION NUCLEI</dc:subject><dc:subject>EARTH SCIENCE > ATMOSPHERE > AEROSOLS > DUST/ASH/SMOKE</dc:subject><dc:subject>EARTH SCIENCE > ATMOSPHERE > AEROSOLS > NITRATE PARTICLES</dc:subject><dc:subject>EARTH SCIENCE > ATMOSPHERE > AEROSOLS > ORGANIC PARTICLES</dc:subject><dc:subject>EARTH SCIENCE > ATMOSPHERE > AEROSOLS > PARTICULATE MATTER</dc:subject><dc:subject>EARTH SCIENCE > ATMOSPHERE > AEROSOLS > SULFATE PARTICLES</dc:subject><dc:subject>EARTH SCIENCE > ATMOSPHERE > AIR QUALITY > EMISSIONS</dc:subject><dc:subject>EARTH SCIENCE > ATMOSPHERE > AIR QUALITY > SMOG</dc:subject><dc:subject>EARTH SCIENCE > ATMOSPHERE > AIR QUALITY > TROPOSPHERIC OZONE</dc:subject><dc:subject>EARTH SCIENCE > ATMOSPHERE > ATMOSPHERIC PHENOMENA > FREEZE</dc:subject><dc:subject>EARTH SCIENCE > ATMOSPHERE > ATMOSPHERIC PHENOMENA > STORMS</dc:subject><dc:subject>EARTH SCIENCE > ATMOSPHERE > ATMOSPHERIC PRESSURE > ATMOSPHERIC PRESSURE MEASUREMENTS</dc:subject><dc:subject>EARTH SCIENCE > ATMOSPHERE > ATMOSPHERIC TEMPERATURE > AIR TEMPERATURE</dc:subject><dc:subject>EARTH SCIENCE > ATMOSPHERE > ATMOSPHERIC WATER VAPOR > HUMIDITY</dc:subject><dc:subject>EARTH SCIENCE > ATMOSPHERE > ATMOSPHERIC WINDS > SURFACE WINDS</dc:subject><dc:subject>EARTH SCIENCE > ATMOSPHERE > CLOUDS > CLOUD AMOUNT/FREQUENCY</dc:subject><dc:subject>EARTH SCIENCE > ATMOSPHERE > CLOUDS > CLOUD HEIGHT</dc:subject><dc:subject>EARTH SCIENCE > ATMOSPHERE > CLOUDS > CLOUD TOP TEMPERATURE</dc:subject><dc:subject>EARTH SCIENCE > ATMOSPHERE > PRECIPITATION > PRECIPITATION AMOUNT</dc:subject><dc:subject>EARTH SCIENCE > ATMOSPHERE > PRECIPITATION > RAIN</dc:subject><dc:subject>EARTH SCIENCE > ATMOSPHERE > ATMOSPHERIC RADIATION > OUTGOING LONGWAVE RADIATION</dc:subject><dc:subject>EARTH SCIENCE > BIOSPHERE > VEGETATION > CANOPY CHARACTERISTICS</dc:subject><dc:subject>EARTH SCIENCE > BIOSPHERE > VEGETATION > VEGETATION COVER</dc:subject><dc:subject>EARTH SCIENCE > CRYOSPHERE > SEA ICE > ICE DEPTH/THICKNESS</dc:subject><dc:subject>EARTH SCIENCE > CRYOSPHERE > SEA ICE > ICE EXTENT</dc:subject><dc:subject>EARTH SCIENCE > CRYOSPHERE > SEA ICE > ICE GROWTH/MELT</dc:subject><dc:subject>EARTH SCIENCE > CRYOSPHERE > SNOW/ICE > FREEZE/THAW</dc:subject><dc:subject>EARTH SCIENCE > CRYOSPHERE > SNOW/ICE > ICE DEPTH/THICKNESS</dc:subject><dc:subject>EARTH SCIENCE > CRYOSPHERE > SNOW/ICE > ICE EXTENT</dc:subject><dc:subject>EARTH SCIENCE > CRYOSPHERE > SNOW/ICE > ICE GROWTH/MELT</dc:subject><dc:subject>EARTH SCIENCE > CRYOSPHERE > SNOW/ICE > SNOW DEPTH</dc:subject><dc:subject>EARTH SCIENCE > HUMAN DIMENSIONS > HABITAT CONVERSION/FRAGMENTATION > DEFORESTATION</dc:subject><dc:subject>EARTH SCIENCE > HUMAN DIMENSIONS > NATURAL HAZARDS > WILDFIRES</dc:subject><dc:subject>EARTH SCIENCE > HUMAN DIMENSIONS > NATURAL HAZARDS > FLOODS</dc:subject><dc:subject>EARTH SCIENCE > TERRESTRIAL HYDROSPHERE > GROUND WATER > GROUND WATER DISCHARGE/FLOW</dc:subject><dc:subject>EARTH SCIENCE > TERRESTRIAL HYDROSPHERE > GROUND WATER > DRAINAGE</dc:subject><dc:subject>EARTH SCIENCE > TERRESTRIAL HYDROSPHERE > SNOW/ICE > FREEZE/THAW</dc:subject><dc:subject>EARTH SCIENCE > TERRESTRIAL HYDROSPHERE > SNOW/ICE > ICE EXTENT</dc:subject><dc:subject>EARTH SCIENCE > TERRESTRIAL HYDROSPHERE > SNOW/ICE > SNOW DEPTH</dc:subject><dc:subject>EARTH SCIENCE > TERRESTRIAL HYDROSPHERE > SURFACE WATER > FLOODS</dc:subject><dc:subject>EARTH SCIENCE > LAND SURFACE > EROSION/SEDIMENTATION > LANDSLIDES</dc:subject><dc:subject>EARTH SCIENCE > LAND SURFACE > LAND USE/LAND COVER > LAND COVER</dc:subject><dc:subject>EARTH SCIENCE > LAND SURFACE > LAND USE/LAND COVER > LAND PRODUCTIVITY</dc:subject><dc:subject>EARTH SCIENCE > LAND SURFACE > LAND USE/LAND COVER > LAND RESOURCES</dc:subject><dc:subject>EARTH SCIENCE > LAND SURFACE > LAND USE/LAND COVER > LAND USE CLASSES</dc:subject><dc:subject>EARTH SCIENCE > LAND SURFACE > TOPOGRAPHY > LANDFORMS</dc:subject><dc:subject>EARTH SCIENCE > LAND SURFACE > TOPOGRAPHY > TOPOGRAPHICAL RELIEF</dc:subject><dc:subject>EARTH SCIENCE > LAND SURFACE > TOPOGRAPHY > TERRAIN ELEVATION</dc:subject><dc:subject>EARTH SCIENCE > OCEANS > BATHYMETRY/SEAFLOOR TOPOGRAPHY > SEAFLOOR TOPOGRAPHY</dc:subject><dc:subject>EARTH SCIENCE > OCEANS > COASTAL PROCESSES > INTERTIDAL ZONE</dc:subject><dc:subject>EARTH SCIENCE > OCEANS > COASTAL PROCESSES > SEA LEVEL RISE</dc:subject><dc:subject>EARTH SCIENCE > OCEANS > COASTAL PROCESSES > TIDAL HEIGHT</dc:subject><dc:subject>EARTH SCIENCE > OCEANS > OCEAN TEMPERATURE > SEA SURFACE TEMPERATURE</dc:subject><dc:subject>EARTH SCIENCE > OCEANS > SEA ICE > ICE EXTENT</dc:subject><dc:subject>EARTH SCIENCE > OCEANS > TIDES > TIDAL CURRENTS</dc:subject><dc:subject>EARTH SCIENCE > OCEANS > TIDES > TIDAL HEIGHT</dc:subject><dc:subject>EARTH SCIENCE > OCEANS > TIDES > TIDAL RANGE</dc:subject><dc:subject>EARTH SCIENCE > SOLID EARTH > GEODETICS/GRAVITY > GRAVITATIONAL FIELD</dc:subject><dc:subject>EARTH SCIENCE > SOLID EARTH > GEODETICS/GRAVITY > GRAVITY</dc:subject><dc:subject>EARTH SCIENCE > SOLID EARTH > GEOMORPHOLOGY > COASTAL LANDFORMS/PROCESSES</dc:subject><dc:subject>EARTH SCIENCE > SOLID EARTH > SEISMOLOGY > EARTHQUAKE OCCURRENCES</dc:subject><dc:subject>EARTH SCIENCE > SOLID EARTH > SEISMOLOGY > EARTHQUAKE PREDICTIONS</dc:subject><dc:subject>EARTH SCIENCE > SOLID EARTH > VOLCANOES > ERUPTION DYNAMICS</dc:subject><dc:subject>EARTH SCIENCE > SOLID EARTH > VOLCANOES > VOLCANIC ASH/DUST</dc:subject><dc:subject>EARTH SCIENCE > SOLID EARTH > VOLCANOES > VOLCANIC GASES</dc:subject><dc:subject>EARTH SCIENCE > CRYOSPHERE > SEA ICE > SNOW DEPTH</dc:subject><dc:subject>EARTH SCIENCE > CRYOSPHERE > SEA ICE > SEA ICE ELEVATION</dc:subject><dc:subject>EARTH SCIENCE > ATMOSPHERE > ATMOSPHERIC WINDS > BOUNDARY LAYER WINDS</dc:subject><dc:subject>EARTH SCIENCE > CRYOSPHERE > GLACIERS/ICE SHEETS > GLACIER MASS BALANCE/ICE SHEET MASS BALANCE</dc:subject><dc:subject>EARTH SCIENCE > CRYOSPHERE > GLACIERS/ICE SHEETS > GLACIER THICKNESS/ICE SHEET THICKNESS</dc:subject><dc:subject>EARTH SCIENCE > CRYOSPHERE > GLACIERS/ICE SHEETS > GLACIER ELEVATION/ICE SHEET ELEVATION</dc:subject><dc:subject>EARTH SCIENCE > ATMOSPHERE > ATMOSPHERIC CHEMISTRY > CARBON AND HYDROCARBON COMPOUNDS > CARBON DIOXIDE</dc:subject><dc:subject>EARTH SCIENCE > ATMOSPHERE > ATMOSPHERIC CHEMISTRY > OXYGEN COMPOUNDS > OZONE</dc:subject><dc:subject>CLARREO > CLIMATE ABSOLUTE RADIANCE AND REFRACTIVITY OBSERVATORY</dc:subject><dc:subject>DESDYNI > DEFORMATION</dc:subject><dc:subject> ECOSYSTEM STRUCTURE AND DYNAMICS OF ICE</dc:subject><dc:subject>ICESAT-II > ICE</dc:subject><dc:subject> CLOUD AND LAND ELEVATION SATELLITE-II</dc:subject><dc:subject>SMAP > SOIL MOISTURE ACTIVE AND PASSIVE OBSERVATORY</dc:subject><dc:subject>ASCENDS > ACTIVE SENSING OF CO2 EMISSIONS OVER NIGHTS</dc:subject><dc:subject> DAYS</dc:subject><dc:subject> AND SEASONS</dc:subject><dc:subject>GEO-CAPE > GEOSTATIONARY COASTAL AND AIR POLLUTION EVENTS</dc:subject><dc:subject>HYSPIRI > HYPERSPECTRAL INFRARED IMAGER</dc:subject><dc:subject>GRACE II > GRAVITY RECOVERY AND CLIMATE EXPERIMENT II</dc:subject><dc:subject>LIST > LIDAR SURFACE TOPOGRAPHY</dc:subject><dc:subject>PATH > PRECISION AND ALL-WEATHER TEMPERATURE AND HUMIDITY</dc:subject><dc:subject>SCLP > SNOW AND COLD LAND PROCESSES</dc:subject><dc:subject>SWOT > SURFACE WATER OCEAN TOPOGRAPHY</dc:subject><dc:subject>3D-WINDS > THREE-DIMENSIONAL TROPOSPHERIC WINDS FROM SPACE-BASED LIDAR</dc:subject><dc:subject>ACE (DECADAL SURVEY) > AEROSOL - CLOUD - ECOSYSTEMS</dc:subject><dc:subject>GACM > GLOBAL ATMOSPHERIC COMPOSITION MISSION</dc:subject><dc:subject>NASA DECADAL-SURVEY > NASA DECADAL SURVEY STUDIES</dc:subject><dc:subject>GEOSCIENTIFIC INFORMATION</dc:subject><dc:subject>INLAND WATERS</dc:subject><dc:subject>OCEANS</dc:subject><dc:subject>ENGLISH</dc:subject><dct:references scheme="None">http://science.nasa.gov/earth-science/decadal-surveys/</dct:references><dct:references scheme="None">http://science.nasa.gov/earth-science/decadal-surveys/</dct:references><dct:references scheme="None">http://decadal.gsfc.nasa.gov/</dct:references><dct:references scheme="None">http://dsds.nasa.gov/</dct:references><dct:abstract>[These missions are in the planning stage. Please monitor the project web sites for mission updates] [Source: NASA's Science Mission Directorate, Earth Sciences, http://science.nasa.gov/earth-science/decadal-surveys/ ] NASA relies on the science community to identify and prioritize leading-edge scientific questions and the observations required to answer them. One principal means by which NASA’s Science Mission Directorate engages the science community in this task is through the National Research Council (NRC). The NRC conducts studies that provide a science community consensus on key questions posed by NASA and other U.S. Government agencies. The broadest of these studies in NASA’s areas of research are decadal surveys. As the name implies, NASA and its partners ask the NRC once each decade to look out ten or more years into the future and prioritize research areas, observations, and notional missions to make those observations. The NRC completed its first decadal survey for Earth science, Earth Science and Applications from Space: National Imperatives for the Next Decade and Beyond (NRC, 2007) in January 2007 at the request of NASA, NOAA, and USGS. [At this URL, click on “Sign In” to download a free pdf of the report.] At the highest level, the report recommends that: “The U.S. government, working in concert with the private sector, academe, the public, and its international partners, should renew its investment in Earth-observing systems and restore its leadership in Earth science and applications.” Detailed recommendations in the decadal survey are provided in three categories: * Setting the Foundation: Observations in the Current Decade * New Observations for the Next Decade * Turning Satellite Observations into Knowledge and Information For the next decade, the decadal survey identified 15 new space missions for NASA (including 1 joint mission with NOAA) and 3 missions for NOAA (including the 1 joint mission). The 15 missions for NASA are presented in three time-phased blocks. Importantly, the 17 missions are presented as the result of a “prioritization methodology designed to achieve a robust, integrated program”(pg. 7) and the “missions listed…form a minimal, yet robust, observational component of an Earth information system that is capable of addressing a broad range of societal needs.” Information regarding all missions is available at the following home page: http://decadal.gsfc.nasa.gov/</dct:abstract><ows:BoundingBox crs="urn:x-ogc:def:crs:EPSG:6.11:4326" dimensions="2"><ows:LowerCorner>-90.0 -180.0</ows:LowerCorner><ows:UpperCorner>90.0 180.0</ows:UpperCorner></ows:BoundingBox></csw:SummaryRecord>
# get supported result types
csw.getdomain('GetRecords.resultType')
csw.results
{'parameter': 'GetRecords.resultType', 'type': 'csw:Record', 'values': ['hits', 'results', 'validate']}