Skip to main content

Python extension to the Swiss Ephemeris

Project description

Python extension to AstroDienst Swiss Ephemeris library.

The Swiss Ephemeris is the de-facto standard library for astrological calculations. It is a high-precision ephemeris, based upon the DE431 ephemerides from NASA’s JPL, and covering the time range 13201 BC to AD 17191.

>>> import swisseph as swe
>>> # first set path to ephemeris files
>>> swe.set_ephe_path('/usr/share/sweph/ephe')
>>> # find time of next lunar eclipse
>>> jd = swe.julday(2007, 3, 3) # julian day
>>> res = swe.lun_eclipse_when(jd)
>>> ecltime = swe.revjul(res[1][0])
>>> print(ecltime)
(2007, 3, 3, 23.347926892340183)
>>> # get ecliptic position of asteroid 13681 "Monty Python"
>>> jd = swe.julday(2008, 3, 21)
>>> xx, rflags = swe.calc_ut(jd, swe.AST_OFFSET+13681)
>>> # print longitude
>>> print(xx[0])
0.09843983166646618
Documentation:

https://astrorigin.com/pyswisseph

Repository:

https://github.com/astrorigin/pyswisseph

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyswisseph-2.10.3.2.tar.gz (6.9 MB view hashes)

Uploaded source

Built Distributions

pyswisseph-2.10.3.2-cp311-cp311-win32.whl (874.6 kB view hashes)

Uploaded cp311

pyswisseph-2.10.3.2-cp310-cp310-win32.whl (874.6 kB view hashes)

Uploaded cp310

pyswisseph-2.10.3.2-cp39-cp39-win32.whl (874.6 kB view hashes)

Uploaded cp39

pyswisseph-2.10.3.2-cp38-cp38-win32.whl (874.6 kB view hashes)

Uploaded cp38

pyswisseph-2.10.3.2-cp37-cp37m-win32.whl (875.2 kB view hashes)

Uploaded cp37

pyswisseph-2.10.3.2-cp36-cp36m-win32.whl (926.6 kB view hashes)

Uploaded cp36

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page