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.3.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.3-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: astro_what-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 85bf13094423c09d36c15ae934306b987ecac5c20ca33895ca8fe6af2ed06f79
MD5 bd1cf6ef52e5dba4432833c4e45e91b4
BLAKE2b-256 04b043d694b89704b656f6342564bdcf6e65cdb0e45c8291af57d98c1744944e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: astro_what-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 79aa58a0ba23e29fb47b32895cd2d1871e12b5bd2c85949a36e28446debea207
MD5 8ade6d4da51076881d02d5f51c49afec
BLAKE2b-256 dcbec6af0123ffbec2e88cfceff749cbaf70353ae9714428f1ef474936a9723b

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