Python library for particle physics