WhiteboxTools (Lindsay, 2016) can be used to delineate watershed with the inputs of DEM and outlet point shapefile. The installation instruction and example scripts can be found at https://pypi.org/project/whitebox/ . After installing WhiteboxTools, the module can be imported in Python.
For an experiment, the GTOPO30 DEM was downloaded from USGS earthexplorer (USGS, n.d.). The DEM was reprojected to Conus Alber (EPSG:5070) and clipped to the area where watershed will be delineated. This DEM was processed using a WhiteboxTools function (feature_preserving_smoothing) as shown in the example script. The outlet was decided as a point on West Branch of Susquehanna River near Belford, PA. This outlet point shapefile was created in QGIS. To delineate the watershed, three WhiteboxTools functions (breach_depressions, d8_pointer, watershed) were used sequentially. More functions and detailed information can be found from Lindsay (2017). The blue polygon in Fig 1. shows the delineated watershed for the outlet point (red point) in this example.
Reference
Lindsay, J. B. (2016). Whitebox GAT: A case study in geomorphometric analysis. Computers & Geosciences, 95: 75-84. DOI: 10.1016/j.cageo.2016.07.003
Lindsay, J. B. (2017). Hydrological Analysis – WhiteboxTools User Manual. Retrieved from https://jblindsay.github.io/wbt_book/available_tools/hydrological_analysis.html#Watershed
USGS (n.d.). USGS EarthExolorer. Retrieved from https://earthexplorer.usgs.gov