The Cherenkov Telescope Array (CTA) observatory will probe the non-thermal universe above 20 GeV up to several hundreds of TeV with a significant improvement in sensitivity and angular resolution compared to current experiments. Its outstanding capabilities will allow to increase the number of extragalactic cosmic accelerators detected at very high energy (VHE) and therefore to better constrain the population of VHE accelerators and the gamma-ray absorption processes in the intergalactic medium.
For the first time in history of imaging atmospheric Cherenkov telescopes (IACTs), CTA will be an open observatory and high-level data will be made available to the astronomical community. Gammapy is an open-source Python package developed by the Cherenkov telescope community that provides tools to simulate the gamma-ray sky and analyse IACT data. The versatile architecture of, and steady user contribution to Gammapy enable a large variety of high-level data analyses. Examples of Gammapy applications are presented, particularly in the context of extragalactic science with CTA.