Elegant Astronomy for Python

Skyfield computes positions for the stars, planets, and satellites in orbit around the Earth. Its results should agree with the positions generated by the United States Naval Observatory and their Astronomical Almanac to within 0.0005 arcseconds (which equals half a “mas” or milliarcsecond).

Computing the position of Mars in the sky is as easy as:

from skyfield.api import load

planets = load('de421.bsp')
earth, mars = planets['earth'], planets['mars']

ts = load.timescale()
t =
astrometric =
ra, dec, distance = astrometric.radec()

10h 47m 56.24s
+09deg 03' 23.1"
2.33251 au

Skyfield can compute geocentric coordinates, as shown in the example above, or topocentric coordinates specific to your location on the Earth’s surface:

from skyfield.api import Topos

boston = earth + Topos('42.3583 N', '71.0636 W')
astrometric =
alt, az, d = astrometric.apparent().altaz()

25deg 27' 54.0"
101deg 33' 44.0"

Skyfield does not depend on the AstroPy project or its compiled libraries. But it accepts AstroPy time objects as input, and can return results in native AstroPy units:

from astropy import units as u
xyz =
altitude =

[-2.19049548  0.71236701  0.36712443] AU
25.465 deg


Skyfield’s documentation lives here at the main Skyfield web site:

But the source code and issue tracker live on other web sites:


2017 March 15

Released Skyfield 1.0! The API is now stable: a collection of awkward special cases in the code have now all been replaced with the overarching concept of letting the developer freely add and subtract vector functions — such as the position of a planet, a geographic location, or an Earth satellite.

2016 December 10

Released Skyfield 0.9.1 which fixes an obscure module that, while not documented or supported at this point, would cause a SyntaxError when the Python package install tool would try to compile all of Skyfield’s .py files to .pyc files.

2016 August 27

Released Skyfield 0.9 which adds the ability of Turning off downloads for expired files, offers an expanded Bibliography, and provides several bugfixes.

2016 March 30

Released Skyfield 0.8 with expanded documentation, that now includes an API Reference presenting the docstrings from all stable and supported methods.

2016 March 24

With the release of Skyfield 0.7, the final API upheavals of the pre-1.0 era are now complete. The introduction of the new timescale object has now eliminated all hidden state from the library, and has cleared the way for rapid development going forward.

Unless users encounter significant problems, version 1.0 should follow as soon as the documentation — and in particular the API Reference — has received a bit more polish. The project is almost there!