Skip to main content

GeoServer REST Configuration

Project description

gsconfig-py3

gsconfig-py3 is a python3 library for manipulating a GeoServer instance via the GeoServer RESTConfig API.

gsconfig-py3 is a port of gsconfig (https://github.com/boundlessgeo/gsconfig) for python3.

Tested with geoserver 2.16.2.

The project is distributed under a MIT License .

Installing

git clone git@github.com:quadratic-be/gsconfig-py3.git
cd gsconfig-py3
python setup.py install

Getting Help

gsconfig-py3 keeps the same API as gsconfig, so you can refer to http://boundlessgeo.github.io/gsconfig/ for getting help to use it.

Sample Layer Creation Code

from geoserver.catalog import Catalog
cat = Catalog("http://localhost:8080/geoserver/")
topp = cat.get_workspace("topp")
shapefile_plus_sidecars = shapefile_and_friends("states")
# shapefile_and_friends should look on the filesystem to find a shapefile
# and related files based on the base path passed in
#
# shapefile_plus_sidecars == {
#    'shp': 'states.shp',
#    'shx': 'states.shx',
#    'prj': 'states.prj',
#    'dbf': 'states.dbf'
# }

# 'data' is required (there may be a 'schema' alternative later, for creating empty featuretypes)
# 'workspace' is optional (GeoServer's default workspace is used by... default)
# 'name' is required
ft = cat.create_featurestore(name, workspace=topp, data=shapefile_plus_sidecars)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gsconfig-py3-1.0.8.tar.gz (21.5 kB view hashes)

Uploaded Source

Built Distribution

gsconfig_py3-1.0.8-py3-none-any.whl (24.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page