gicait / geoserver-rest

Python library for management of geospatial data in GeoServer.
https://geoserver-rest.readthedocs.io
MIT License
191 stars 77 forks source link

More request customization #153

Closed iboates closed 1 month ago

iboates commented 2 months ago

Closes #133 and #82

This is a draft PR, it's not even close to being finished. It's also contingent on my tests branch PR here: https://github.com/gicait/geoserver-rest/pull/151

I have changed all the workspace endpoints to accommodate it. It should work, but I am wondering if it may be better to use something like request_params instead of kwargs, just so as not to potentially interfere with other keyword arguments. Such a parameter would I guess have to be a type of Dict[String, Any]

What do you guys think? For whichever option, I can add the functionality to the rest of the endpoints.

iamtekson commented 2 months ago

Thank you @iboates for initiating this PR. it looks great in shape!

iboates commented 2 months ago

Just FYI im on vacation until July. I might pick at this anyway in the meantime though

iamtekson commented 2 months ago

No worried @iboates, take your time😀!

iboates commented 1 month ago

@iamtekson @Zeitsperre I am now finished with this. You should be able to specify a dictionary of request parameters to the Geoserver init method which will then be applied to every subsequent request.

Originally I wanted to do it for each request, but the overwhelming DRY violations were too bothersome to ignore.

I also added a few new tests while I was at it, including one specifically to test that that this works.

Also, I replaced all the direct references to the requests lib with ones to the internally wrapped version.