We present Ozone, a Python library for solving ordinary differential equations (ODEs) within gradient-based optimization algorithms. Ozone makes available the entire family of explicit and implicit Runge–Kutta methods and implements several solution approaches including parallel-in-time approaches. A unique feature is the ability to perform sensitivity analysis for any combination of method and solution approaches. Ozone is implemented as a library in the Computational System Design Language (CSDL), enabling the automatic calculation of the derivatives of the optimization objective and constraints that are outputs of the larger system within which the Ozone model is embedded. Ozone allows researchers to easily incorporate ODEs in multidisciplinary optimization and direct-transcript optimal control models. This paper describes the components of the software implementation of Ozone and demonstrates its features through four illustrative applications.