I'm trying to create a datastore in Geoserver with gsconfig and it works, up to a point where i want to enable for instance "Expose primary keys" or "Support on the fly geometry simplification" tags on the datastore. Any suggestions?

1 Answer 1


This should work:

     ds = catalog.create_datastore(store_name, workspace_name)

     ds.connection_parameters.update({'host': host, 
                                       'database': database,
                                       'user': user_name,
                                       'passwd': pw, 'dbtype':db_type,
                                       'schema': schema, 
                                       'Expose primary keys': 'true'})

The update method on connection_parameters accepts a dictionary as input where the keys can be set.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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