Metadata-Version: 2.4
Name: pysweph
Version: 2.10.3.3
Summary: Community fork of Pyswisseph, a Python extension to the Swiss Ephemeris
Author-email: Stanislas Marquis <stan@astrorigin.com>
Maintainer-email: Kathryn de la Rosa <hello@sailorfe.dev>
License-Expression: AGPL-3.0-or-later
Project-URL: Homepage, https://sailorfe.github.io/pysweph
Project-URL: Documentation, https://sailorfe.github.io/pysweph
Project-URL: Repository, https://github.com/sailorfe/pysweph
Project-URL: Issues, https://github.com/sailorfe/pysweph/issues
Project-URL: Original Project, https://github.com/astrorigin/pyswisseph
Keywords: astrology,ephemeris,swisseph,astronomy
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Religion
Classifier: Programming Language :: C
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Religion
Classifier: Topic :: Scientific/Engineering :: Astronomy
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Dynamic: license-file

# pysweph

Modern Python bindings for the [Swiss Ephemeris](https://www.astro.com/swisseph/swephinfo_e.htm), a high-precision astronomical computation library for astrology developed and maintained since 1997.

`pysweph` continues the work of [astrorigin/pyswisseph](https://github.com/astrorigin/pyswisseph) with updated documentation, bug fixes, and ongoing community maintenance.

## Background

In mid-2025, the documentation for Pyswisseph (`astrorigin.com/pyswisseph`) became inaccessible, and the maintainer has been unresponsive to issues and pull requests. This fork, `pysweph`, aims to keep the Python interface stable, documented, and installable for users who rely on it.

## Upstream and scope

`pysweph` links directly to the official [Swiss Ephemeris C library](https://github.com/aloistr/swisseph) maintained by Alois Treindl and Astrodienst.

The previous Python package (`astrorigin/pyswisseph`) included Stanislas Marquis’ auxiliary repositories (`swephelp`, `sqlite3`, and related utilities). These have been intentionally removed in `pysweph` to reduce complexity and depend only on the canonical Swiss Ephemeris source.

## What's new in pysweph

- Full documentation rebuild using Sphinx and MyST Markdown, following the Diataxis framework
- Regenerated API reference directly from Python docstrings
- Original tutorials and conceptual guides.
- Bug fixes improving error handling in `swe.calc()` functions and `swe.deltat_ex`
- Continuous integration and Github Pages documentation hosting
- Compatible with the upstream Swiss Ephemeris C library

You can browse the documentation here: [https://sailorfe.github.io/pysweph](https://sailorfe.github.io/pysweph).

## Installation

`pyswisseph` is available directly from [PyPI](https://pypi.org/project/pysweph).

```sh
uv pip install pysweph
# or
pip install pyswseph
```

`pysweph` is a drop-in replacement for `pyswisseph`. As long as you uninstall `pyswisseph` from any existing project first, your import should still be

```py
import swisseph as swe
```

## Versioning

This project follows the versioning scheme: `<swe_major>.<swe_minor>.<swe_patch>.<wrapper_increment>`

- The first three numbers match the Swiss Ephemeris C library version.
- The fourth number increments for Python wrapper changes.
- Current C library version: 2.10.3 (released 2022).

`pysweph` starts from `pyswisseph==2.10.3.2`. The first release of this fork is `2.10.3.3`.

If the original maintainer of `pyswisseph` returns, this project will coordinate or merge changes as appropriate.

## Credits

- **Alois Treindl**, creator of the Swiss Ephemeris
- **Stanislas Marquis**, author of the original Python bindings (`pyswisseph`)
- **sailorfe**, maintainer of `pysweph` continuation

## License

`pysweph` is licensed under the GNU Affero General Public License version 3, whose text you can read at [LICENSE](./LICENSE).
