Book Image

GeoServer Cookbook

By : Stefano Iacovella
Book Image

GeoServer Cookbook

By: Stefano Iacovella

Overview of this book

Table of Contents (17 chapters)
GeoServer Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Managing workspaces with REST


Now that you are familiar with REST, it is time to get your hands on GeoServer and have a look at how its REST interface works.

Basically, it exposes operations to you so that you can manage all configurations' objects. You will find the same items, for example, layers and styles, which you are used to creating from the web interface.

In this first recipe, you will start with workspaces and namespaces, which are the logical groups that contain all other configuration's items.

Getting ready

We stated before that Python's main aims are simplicity and code readability; unfortunately, this is not always the case. Interacting with REST using standard Python libraries may be painful and very verbose. Luckily, there is an open source project that solves this problem. The project produced a library called Requests and I have to say, it is a really appropriate name.

Note

Requests is an open source project started by Kenneth Reitz. You can download and use it liberally; it...