Files
pygeoapi/docker/examples/geosparql/test.pygeoapi.config.yml
T
Benjamin Webb 205ff3002c Add Gzip to response types (#795)
* Add gzip to API.py

* pytest for gzip

* fix pytest

* Update test_api.py

* Add gzip to server block of configuration files

* Update api.py to include gzip opts from config

Update logic behind gzip compression  such that compression will only happen when gzip in the Accept-Encoding request header and config.server.gzip is True. Use server charset for encoding/decoding and include charset in Content-Type when compressed.

* Update pytest to use gzip config options

Update pytest to test with (gzip in Accept-Encoding & server.gzip = False), (gzip in Accept-Encoding & server.gzip = True), (gzip not in Accept-Encoding & server.gzip = True)

* Better Content Negotiation (#7)

* Change content negotiation in _get_format()

* Add to pytest and force h to always be string

* Force F_JSON to default response

* Update test_api.py for utf-16 encoding

* better content negotiation pytest.

* Add comments to pytest

* Fix flake 8

* Improve docstring for gzip decorator function
2021-10-27 20:17:02 -04:00

107 lines
3.6 KiB
YAML

# =================================================================
#
# Authors: Tom Kralidis <tomkralidis@gmail.com>
#
# Copyright (c) 2020 Tom Kralidis
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights to use,
# copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following
# conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
#
# =================================================================
server:
bind:
host: localhost #change to your hostname if running your own instance
port: 5000
url: http://localhost:5000 #change to host URL if running your own instance
mimetype: application/json; charset=UTF-8
encoding: utf-8
gzip: false
language: en-US
cors: true
pretty_print: true
limit: 100
map:
url: https://tile.openstreetmap.org/{z}/{x}/{y}.png
attribution: '<a href="https://www.openstreetmap.org/copyright">© OpenStreetMap contributors</a>'
# ogc_schemas_location: /opt/schemas.opengis.net
# templates:
# path: /skin-dashboard/templates
# static: /skin-dashboard/static
logging:
level: ERROR
logfile: /tmp/pygeoapi.log
metadata:
identification:
title: Geojson item types
description: Provides test features for geosparql.
keywords:
- geospatial
- data
- api
keywords_type: theme
terms_of_service: https://creativecommons.org/licenses/by/4.0/
url: https://github.com/internetofwater/geoconnex.us
license:
name: CC-BY 4.0 license
url: https://creativecommons.org/licenses/by/4.0/
provider:
name: Team geoconnex
url: https://github.com/internetofwater/geoconnex.us
contact:
address: 2111 Campus Dr
city: Durham
stateorprovince: North Carolina
postalcode: 27708
country: USA
email: kyle.onda@duke.edu
url: https://internetofwater.org
role: pointOfContact
resources:
objects:
type: collection
title: GeoJSON objects
description: GeoJSON geometry types for GeoSparql and Schema Geometry conversion.
keywords:
- shapes
links:
- type: text/html
rel: canonical
title: data source
href: https://en.wikipedia.org/wiki/GeoJSON
hreflang: en-US
extents:
spatial:
bbox: [-180,-90,180,90]
crs: http://www.opengis.net/def/crs/OGC/1.3/CRS84
temporal:
begin: null
end: null # or empty (either means open ended)
providers:
- type: feature
name: GeoJSON
data: /data/items.geojson
id_field: id
uri_field: uri