Creating Coveragestore GeoTIFF using REST API
2020 update,
Using geoserver-rest library(pip install geoserver-rest
). The example case is below,
#import and initialize library
from geo.Geoserver import Geoserver
geo = Geoserver('http://localhost:8080/geoserver', username='admin', password='geoserver')
#Create/upload coveragestore (raster data)
geo.create_coveragestore(lyr_name='layer1' path=r'path\to\raster\file.tif', workspace='demo')