  We study the modification of the atomic spontaneous emission rate, i.e.
Purcell effect, of $^{87}$Rb in the vicinity of an optical nanofiber ($\sim$500
nm diameter). We observe enhancement and inhibition of the atomic decay rate
depending on the alignment of the induced atomic dipole relative to the
nanofiber. Finite-difference time-domain simulations are in quantitative
agreement with the measurements when considering the atoms as simple
oscillating linear dipoles. This is surprising since the multi-level nature of
the atoms should produce a different radiation pattern, predicting smaller
modification of the lifetime than the measured ones. This work is a step
towards characterizing and controlling atomic properties near optical
waveguides, fundamental tools for the development of quantum photonics.
