conjunctions
Finds conjunctions (closest apparent angular separation, geocentric or from an observer location) between the Moon, the naked-eye planets (Mercury, Venus, Mars, Jupiter, Saturn), bright star clusters (Pleiades, Hyades, Beehive, M35) and bright stars near the ecliptic (Aldebaran, Pollux, Castor, Regulus, Spica, Antares).
Star clusters take precedence over bright stars: when a body's conjunction with a star coincides (within a day) with its conjunction with a cluster lying within the separation limit of that star — e.g. Aldebaran in front of the Hyades — only the cluster is reported.
Install
Requires Python 3.11+.
pip install conjunctions
or, from a checkout, with uv: uv sync.
Library
from conjunctions import find_conjunctions
print(find_conjunctions("2026-10-01", "2026-12-31", max_separation_deg=3))
print(find_conjunctions(planets_only=True)) # today -> one year from today, Moon/planets only
start defaults to today (UTC) and end to one year after start.
Returns a JSON string; each entry has utc (closest approach), bodies,
separation_deg (largest pairwise separation in the group) and sun_elongation_deg.
min_bodies (default 2) keeps only groups of at least that many objects; overlapping
pair conjunctions are merged into the largest group whose members all lie within
max_separation_deg of each other.
Pass latitude/longitude (and optionally elevation_m) for topocentric positions.
The output's observer includes the location's time zone (offline lookup via
timezonefinder), and each entry gets a visibility block with alt/az snapshots:
closest– the moment of closest approachclosest_visible– closest moment within ±1 day with every body abovemin_altitude_deg(default 0) and the Sun belowmax_sun_altitude_deg(default −6°, civil twilight)after_sunset/before_sunrise– 1 h after the nearest sunset / before the nearest sunrisebest– which of the above to use (closest_visible, else whichever twilight snapshot has everything above the horizon;nullif not visible)
CLI
conjunctions 2026-01-01 2027-01-01 -s 3 -e 15 # within 3°, at least 15° from the Sun
conjunctions --lat 35.78 --lon -78.64 # next 12 months, local times for that location
conjunctions -p --lat 35.78 --lon -78.64 # Moon and planets only (no stars/clusters)
conjunctions 2026-10-01 2026-11-01 --lat 35.78 --lon -78.64 --tz UTC
conjunctions 2026-01-01 2027-01-01 -n 3 --lat 35.78 --lon -78.64 --min-alt 10 -v
conjunctions --paths # show data and cache directories
Times display in --tz, else the observer's time zone, else the system zone.
Prints a human-readable list (best viewing time with each body's alt/az and compass
direction); -v adds all snapshots, --json / --compact print the raw JSON.
Files
- Ephemeris (
de440s.bsp, downloaded on first use if missing): first of$CONJUNCTIONS_DATA_DIR,/var/data, the site cache dir, or the user cache dir that already has it (else first writable). - Results cache:
$CONJUNCTIONS_CACHE_DIR, else the site or user cache dir (viaplatformdirs). Use--no-cache(oruse_cache=False) to recompute.
Tests
uv run pytest
Tests use a temporary results cache and need de440s.bsp (downloaded on first run if missing).
Metadata
Release files for conjunctions 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| conjunctions-0.1.0.tar.gz | 11.4 kB | Without provenance | Details for conjunctions-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| conjunctions-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for conjunctions-0.1.0-py3-none-any.whl |
Total release size: 24.7 kB
Release files / conjunctions-0.1.0.tar.gz
| Download URL | conjunctions-0.1.0.tar.gz |
|---|---|
| Size | 11.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
14f81bcfd8a87cc3f04b3da2d78f365ca886c1bf21177c0c1f9f60c4d843d52e
|
|
BLAKE2b-256 checksum How to use checksums |
132edbbbc6fe9d66cc3103ab7cbb73bdacb4358a0b19a9ab86b01d40d5c60add
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.11
|
Release files / conjunctions-0.1.0-py3-none-any.whl
| Download URL | conjunctions-0.1.0-py3-none-any.whl |
|---|---|
| Size | 13.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6f214f91eb4cd75e70731106a1995f87000d0cfbb3ce142123ed4084ca2ba88a
|
|
BLAKE2b-256 checksum How to use checksums |
41e000513999b820603dec3db4c4e46de29d547c6b0cb93a6abbfae6ef202f0d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.11
|
Security for conjunctions 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.