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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
601268f9a24d127d7fc8486a3358d2a93bba22f3eeb8132a354b67dfb40a38db
|
|
| MD5 |
fe3f7828f1473f8360d18c7f44afa057
|
|
| BLAKE2b-256 |
36831d92c8c90e9f3fff96e404a93a44cad136693b36c59570e513c0aa318a5f
|
File details
Details for the file constellation_enum-0.1.0-py3-none-any.whl.
File metadata
- Download URL: constellation_enum-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce8b04fea0358a625f53c77ac4d0f117233e9b40028c68fd05612dcc9ff8897a
|
|
| MD5 |
ab276b9064a1be989c2aa0703ac1fd17
|
|
| BLAKE2b-256 |
9f48fb7aa48a222854241a7d55be6a9c58794923962e1bbfaab34cb52079c216
|