Streamflow is one of the most important variables in hydrology, but it is difficult to measure continuously. As a result, nearly all streamflow time series are estimated from rating curves that define a mathematical relationship between streamflow and some easy-to-measure proxy like water surface elevation (stage). Despite the existence of automated methods, most rating curves are still fit manually, which can be time-consuming and subjective. Although several automated methods exist, they vary greatly in performance because of the non-convex nature of the problem. In this work, we develop a parameterization of the segmented power law that works reliably with minimal data, which could serve operationally or as a benchmark for evaluating other methods. The model, along with test data and tutorials, is available as an open-source Python package called ratingcurve. The implementation uses a modern probabilistic machine-learning framework, which is relatively easy to modify so that others can improve upon it.