Skip to main content

Astro Constants Library

Here's a detailed and professional README.md description for your project:


Astro Constants Library

Astro Constants is a Python library that provides a comprehensive collection of commonly used astronomical and physical constants. This library is designed for developers, researchers, educators, and astronomy enthusiasts to simplify calculations and projects related to astrophysics, cosmology, and space science.

Features

  • Predefined Constants:

    • Speed of Light (SPEED_OF_LIGHT)
    • Gravitational Constant (GRAVITATIONAL_CONSTANT)
    • Planck's Constant (PLANCK_CONSTANT)
    • Astronomical Unit (AU) (ASTRONOMICAL_UNIT)
    • Light Year (LIGHT_YEAR)
    • Parsec (PARSEC)
    • Masses and Radii of Celestial Bodies (Sun, Earth, Moon, Jupiter, etc.)
    • Surface Temperature of the Sun
    • Cosmic Microwave Background (CMB) Temperature
    • Orbital Periods (Earth, Moon)
    • Solar Luminosity
    • And many more!
  • Easy-to-Use:

    • Access constants with simple Python imports for quick implementation.
  • Well-Documented:

    • Full descriptions of all constants are provided to ensure clarity and usability.

Installation

You can install the library directly from PyPI:

pip install astro-constants

Usage

Import the library into your Python project and access constants:

from astro_constants import SPEED_OF_LIGHT, MASS_OF_SUN

print(f"The speed of light is {SPEED_OF_LIGHT} m/s.")
print(f"The mass of the Sun is {MASS_OF_SUN} kg.")

Included Constants

Here is a partial list of constants available in this library:

Fundamental Constants

  • Speed of Light: 299792458 m/s
  • Gravitational Constant: 6.67430e-11 m^3/kg/s^2
  • Planck's Constant: 6.62607015e-34 J·s
  • Boltzmann Constant: 1.380649e-23 J/K

Astronomical Units

  • Astronomical Unit (AU): 1.496e11 meters
  • Light Year: 9.461e15 meters
  • Parsec: 3.0857e16 meters

Celestial Bodies

  • Mass of the Sun: 1.989e30 kg
  • Mass of the Earth: 5.972e24 kg
  • Mass of the Moon: 7.348e22 kg
  • Radius of the Sun: 6.9634e8 meters
  • Radius of the Earth: 6.371e6 meters

Orbital and Solar Data

  • Earth Orbital Period: 365.25 days
  • Moon Orbital Period: 27.322 days
  • Solar Luminosity: 3.828e26 watts

Contributing

We welcome contributions! If you'd like to contribute to this project, please:

  1. Fork the repository on GitHub.
  2. Make your changes.
  3. Submit a pull request with a clear description of the changes.

License

This project is licensed under the MIT License.

Support

If you encounter any issues or have suggestions, feel free to open an issue on the GitHub repository.


Installation

Install the library locally with:

pip install astro-constants

Metadata

Release files for astro-constants 1.5.0

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-constants 1.5.0
File Size Uploaded
astro_constants-1.5.0.tar.gz 2.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for astro-constants 1.5.0
File Interpreter ABI Platform
astro_constants-1.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 5.2 kB

Release files / astro_constants-1.5.0.tar.gz

Download URL astro_constants-1.5.0.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3b937a6f16cdc0fd86552b36bc9f94483a5e2a6a4df6c5b02b46e55fa06569f6
BLAKE2b-256 checksum
How to use checksums
5e15eede89a69dfe206f82240bda19a849ff1ac3755f7eaff04dd8b7d9a8e867
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Release files / astro_constants-1.5.0-py3-none-any.whl

Download URL astro_constants-1.5.0-py3-none-any.whl
Size 2.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f864cd8dacfab92a953378331c0292f9080d200edffe1c104ae77471444446a1
BLAKE2b-256 checksum
How to use checksums
a9612b2954c607e1c13bd96e145638050c83db449ec751347db30834b83fd27e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Release history Release notifications | RSS feed

This release

1.5.0 This release

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.0.0

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