This paper describes the software tool "wepy", an implementation of the weighted ensemble algorithm in python. Wepy was designed to be a flexible simulation framework for rare or long-timescale molecular events, such as protein (un)folding, ligand (un)binding, and large-scale conformational changes or rearrangements. It is implemented as a pure python package, which works well with the OpenMM python library and can easily leverage other python tools for that are useful for molecular simulation and analysis such as mdtraj, scikit-learn, numpy and scipy. It has full support for high-dimensional adaptive resampling algorithms (WExplore and REVO) and provides a framework to easily facilitate the development of new resampling algorithms. Its modular design allows domain experts to write their own analysis functions and progress variables, while taking advantage of a vetted framework for parallel simulation and weighted ensemble resampling.