Skip to main content

A Python enum for astronomical constellations with standard abbreviations

Project description

Constellation Enum

A Python enum for astronomical constellations with standard abbreviations.

This package provides a comprehensive enum of all 88 modern constellations recognized by the International Astronomical Union (IAU), along with their standard 3-letter abbreviations.

Features

  • ✨ All 88 IAU-recognized constellations
  • 🔤 Standard 3-letter abbreviations
  • 🐍 Pure Python, no dependencies
  • 📝 Full type hints support

Installation

pip install constellation-enum

Usage

from constellation import Constellation

# Example usage
print(Constellation.Andromeda)  # Directly access the enum member
print(Constellation['Andromeda'])  # Access by name
print(Constellation['And'])  # Access by abbreviation

# Accessing name, abbreviation, and value
print(Constellation.Andromeda.name)  # 'Andromeda'
print(Constellation.Andromeda.abbr)  # 'And'
print(Constellation.Andromeda.value)  # 1 (auto-assigned value)

# Comparing enum members
print(Constellation.Andromeda == Constellation['And'])  # True

# Iterate through all constellations
for constellation in Constellation:
    print(f"{constellation.name} ({constellation.abbr})")

All Constellations

The enum includes all 88 modern constellations:

  • Andromeda (And), Antlia (Ant), Apus (Aps), Aquarius (Aqr), Aquila (Aql)
  • Ara (Ara), Aries (Ari), Auriga (Aur), Boötes (Boo), Caelum (Cae)
  • And 78 more...

License

MIT License - see LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

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

constellation_enum-0.1.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

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

constellation_enum-0.1.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file constellation_enum-0.1.0.tar.gz.

File metadata

  • Download URL: constellation_enum-0.1.0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.6

File hashes

Hashes for constellation_enum-0.1.0.tar.gz
Algorithm Hash digest
SHA256 601268f9a24d127d7fc8486a3358d2a93bba22f3eeb8132a354b67dfb40a38db
MD5 fe3f7828f1473f8360d18c7f44afa057
BLAKE2b-256 36831d92c8c90e9f3fff96e404a93a44cad136693b36c59570e513c0aa318a5f

See more details on using hashes here.

File details

Details for the file constellation_enum-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for constellation_enum-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ce8b04fea0358a625f53c77ac4d0f117233e9b40028c68fd05612dcc9ff8897a
MD5 ab276b9064a1be989c2aa0703ac1fd17
BLAKE2b-256 9f48fb7aa48a222854241a7d55be6a9c58794923962e1bbfaab34cb52079c216

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