  Trapping cold neutral atoms in close proximity to nanostructures has raised a
large interest in recent years, pushing the frontiers of cavity-QED and
boosting the emergence of the waveguide-QED field of research. The design of
efficient dipole trapping schemes in evanescent fields is a crucial requirement
and a difficult task. Here we present an open-source Python package for
calculating optical trapping potentials for neutral atoms, especially in the
vicinity of nanostructures. Given field distributions and for a variety of trap
configurations, nanotrappy computes the three-dimensional trapping potentials
as well as the trap properties, ranging from trap positions to trap frequencies
and state-dependent light shifts. We demonstrate the versatility for various
seminal structures in the field, e.g., optical nanofiber, alligator slow-mode
photonic-crystal waveguide and microtoroid. This versatile package facilitates
the systematic design of structures and provides a full characterization of
trapping potentials with applications to coherent manipulation of atoms and
quantum information science.
