I want to generate WFS and WMS from a PostGIS database. To do this I want to make a script with Python (or with another language) to store my shapefile on GeoServer and then deploy services automatically.

Is there any good approach to follow?

OWSlib could be one?

And what about geoscripting?

Point of situation: I have made a script for creating shapefiles and generate metadata so the next step is to build a script that post my datasets into GeoServer to generate services. The number of datasets are constantly growing because is periodic data, and I will assume that this upload script simply will be executed occasionally by user interaction or eventually a daemon could be configured.

The data will be provided from different database, converted into specific datasets(shapefile) and will feed a GeoServer (or MapServer), service.

Is there any script that already make this interaction, to upload shapefiles from a specific directory into GeoServer?

  • 3
    There is the Rest API in GeoServer -- not sure if that is what you meant. Commented Jun 23, 2015 at 10:34
  • A few more details in the question please: how many shapefiles? How often do they change? What formats do you want to publish the layers out in? Do you really need postgis, or would a straight shapefile data source be enough? (hint - tell us more about the data and your needs!) Scripting is the solution, but for more details on that, you need to help us with the problem.
    – BradHards
    Commented Jun 23, 2015 at 11:16
  • BradHands, thanks for your suggestion i added to question the scenario to answer to your questions..
    – ePascoal
    Commented Jun 23, 2015 at 11:41

1 Answer 1


You may use geoconfig python module:

gsconfig is a python library for manipulating a GeoServer instance via the GeoServer RESTConfig API.


Here is a similar Q/A that may help too:

Python Geoserver gsconfig create resource from Postgis store table

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.