The application of deep learning techniques to remote sensing and geospatial data is a burgeoning area of research. However, most state-of-the-art systems have their roots in computer vision with procedures that do not necessarily lend themselves to remote sensing data. On the contrary, managing geospatial data require handling different projections, spatial resolutions and data formats. We present Keras Spatial, a python package for preprocessing and augmenting geospatial data. Keras Spatial provides three main components (1) a spatial data generator class, which is similar to the Keras image data generator, (2) a GeoDataFrame for storing training samples boundaries and properties, (3) a callback mechanism for on-the-fly reprojection and data augmentation.The novelty of the developed package arises due to the flexibility to combine the components in different ways to solve a variety of data preparation problems. We demonstrate the usage of Keras Spatial package by preparing digital elevation data for a segmentation model, and replacing conventional manual preprocessing steps, such as tiling rasters to samples, masking samples outside of the study area, and adding digital elevation model derivatives. We also discuss advanced data preprocessing features of this package, such as accessing remote data source directly, combining different input rasters data regardless of their native projection and resolution, and decoupling the model configuration, input layer dimensions, from the geographic scale, where the latter feature allows training the same model to recognize geographic objects that exist at hierarchical scales.