Skip to main content

CLI astronomy toolkit for moon data and lunar phases

Project description

🌙 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)

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

astro_what-0.1.4.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

astro_what-0.1.4-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file astro_what-0.1.4.tar.gz.

File metadata

  • Download URL: astro_what-0.1.4.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for astro_what-0.1.4.tar.gz
Algorithm Hash digest
SHA256 cdcd7c732685163d5b49f73e6ab54e44997a1db0ec28664672d7d82d26440f28
MD5 389360fd8e924ddf0a303f40875307a9
BLAKE2b-256 4d07e784e3ed69e05409e77db3364138150936c9b099ed7732f752dd9764ec91

See more details on using hashes here.

File details

Details for the file astro_what-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: astro_what-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for astro_what-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 53d9abf6654c96a1a4af8376131896f7449a2c24f5bff027075621460d8a0f6e
MD5 414494cc2afb30df6772efa10eed6f43
BLAKE2b-256 63101be58f95b4bda80d4a270c83a3d8cbaf22fad06920a83f11ac1402d29008

See more details on using hashes here.

Supported by

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