Atmospheric escape is considered to be one of the main channels for evolution in sub-Jovian planets, particularly in their early lives. While there are several hypotheses proposed to explain escape in exoplanets, testing them with atmospheric observations remains a challenge. In this context, high-resolution transmission spectroscopy of transiting exoplanets for the metastable helium triplet (He 2 3 S) at 1 083 nm has emerged as a reliable technique for observing and measuring escape. To aid in the prediction and interpretation of metastable He transmission spectroscopy observations, we developed the code p-winds. This is an open-source, fully documented, scalable Python implementation of the one-dimensional, purely H+He Parker wind model for upper atmospheres coupled with ionization balance, ray-tracing, and radiative transfer routines. We demonstrate an atmospheric retrieval by fitting p-winds models to the observed metastable He transmission spectrum of the warm Neptune HAT-P-11 b and take the variation in the in-transit absorption caused by transit geometry into account. For this planet, our best fit yields a total atmospheric escape rate of approximately 2.5 × 10 10 g s −1 and an outflow temperature of 7200 K. The range of retrieved mass loss rates increases significantly when we let the H atom fraction be a free parameter, but its posterior distribution remains unconstrained by He observations alone. The stellar host limb darkening does not have a significant impact on the retrieved escape rate or outflow temperature for HAT-P-11 b. Based on the non-detection of escaping He for GJ 436 b, we are able to rule out total escape rates higher than 3.4 × 10 10 g s −1 at 99.7% (3σ) confidence.