Skip to main content

🌙 astro_what

A Python command-line tool to explore moon phases, positions, and lunar events — directly from your terminal. Built using Skyfield and Click, it’s perfect for hobbyist astronomers, students, and night-sky enthusiasts.

Features

  • Get real-time moon phase and illumination data
  • Forecast upcoming lunar phase transitions
  • Visualize the moon’s position using polar charts
  • Fully offline-friendly after installation

Installation

pip install astro-what

Usage in CLI

  • astro moon --date 2025-06-23
  • astro phases --days 5
  • astro chart --date 2025-06-23

🧰 Available Functions in astro_what

The following functions are accessible when using astro_what as a Python module:

From astro_what.core:

  • get_moon_info(date_str, hour, lat, lon) Returns a dictionary containing:

      - Moon phase (e.g. “Waxing Gibbous”)
    
      - Illumination percentage
    
      - Altitude and azimuth in degrees
    
  • get_next_lunar_phases(from_date, days) Returns a list of upcoming lunar phase transitions within a given timeframe.

From astro_what.moon_tools:

  • show_moon_chart(date_str, hour, lat, lon) Opens a polar plot showing the Moon’s position relative to the horizon — useful for visualizing where to look in the sky.

🌙 Example: Get Moon Information

	from astro_what.core import get_moon_info

	moon = get_moon_info(date_str="2025-06-23", hour=6, lat=12.2958, lon=76.6394)

	print(f"Phase       : {moon['phase']}")
	print(f"Illumination: {moon['illumination']}%")
	print(f"Altitude    : {moon['altitude']}°")
	print(f"Azimuth     : {moon['azimuth']}°")

🌗 Example: Get Upcoming Lunar Phases

	from astro_what.core import get_next_lunar_phases

	phases = get_next_lunar_phases(from_date="2025-06-23", days=5)
	for p in phases:
	    print(f"{p['phase']} → {p['timestamp']} UTC")

📈 Example: Plot Moon Position Chart

	from astro_what.moon_tools import show_moon_chart

	show_moon_chart(date_str="2025-06-23", hour=6, lat=12.2958, lon=76.6394)

Metadata

Release files for astro-what 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for astro-what 0.1.4
File Size Uploaded
astro_what-0.1.4.tar.gz 4.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for astro-what 0.1.4
File Interpreter ABI Platform
astro_what-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 9.9 kB

Release files / astro_what-0.1.4.tar.gz

Download URL astro_what-0.1.4.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
cdcd7c732685163d5b49f73e6ab54e44997a1db0ec28664672d7d82d26440f28
BLAKE2b-256 checksum
How to use checksums
4d07e784e3ed69e05409e77db3364138150936c9b099ed7732f752dd9764ec91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Release files / astro_what-0.1.4-py3-none-any.whl

Download URL astro_what-0.1.4-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
53d9abf6654c96a1a4af8376131896f7449a2c24f5bff027075621460d8a0f6e
BLAKE2b-256 checksum
How to use checksums
63101be58f95b4bda80d4a270c83a3d8cbaf22fad06920a83f11ac1402d29008
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.1

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page