  Chance constraints are a valuable tool for the design of safe decisions in
uncertain environments; they are used to model satisfaction of a constraint
with a target probability. However, because of possible non-convexity and
non-smoothness, optimizing over a chance constrained set is challenging. In
this paper, we establish an exact reformulation of chance constrained problems
as a bilevel problems with convex lower-levels. We then derive a tractable
penalty approach, where the penalized objective is a difference-of-convex
function that we minimize with a suitable bundle algorithm. We release an
easy-to-use open-source python toolbox implementing the approach, with a
special emphasis on fast computational subroutines.
