Package: theverse
The Verse – Find properties of objects in our universe (and others) without leaving PythonThe Verse is a Python library of properties of objects in our universe, such
as the mass and radius of the Earth and other planets.Though The Verse can be useful for reference purposes, it is primarily being
developed for use in generating physics, astronomy, and chemistry problems
with realistic parameters.  For example, a random planet can be chosen from
the Solar System, and then its mass and radius can be used to generate a
problem that involves calculating gravitational acceleration based on those
properties.The Verse is currently at an early stage of development.  At present, it only
contains part of the Solar System—the Sun and a few planets, with only a few
properties each.  Eventually, it will contain a broader range of things from
our universe, such as more planetary data, stars, exoplanets, spacecraft and
other vehicles, animals, elements, and particles.  It will also eventually
contain things from various fictional verses.Example>>>importtheverse>>>print(theverse.earth.equatorial_radius)6378137.0 m>>>forplanet_name,planet_objintheverse.solar_system.planets.items():...print(f'{planet_name:<10}{planet_obj.mass}')...Mercury     3.3011e+23 kgVenus       4.8675e+24 kgEarth       5.9724e+24 kg>>>print(theverse.earth.primary.name)Sun>>>print(theverse.earth.primary.mass)1.9885e+30 kg>>>print(theverse.sun.reference_url)https://nssdc.gsfc.nasa.gov/planetary/factsheet/sunfact.html>>>forstar_nameintheverse.universe.stars:...print(star_name)...SunInstallationInstallPython 3.6+if it is not already available on your machine.  Seehttps://www.python.org/, or use the package manager or app store for your
operating system.  Because The Verse requiresAstropyand its dependencies (which includeNumPy), you may want to consider a Python distribution
likeAnacondainstead.Installsetuptoolsfor Python if it is not already installed.  This can be accomplished by
runningpython -m pip install setuptoolson the command line.  Depending on your system, you may need to usepython3instead ofpython.  This will often be the case for Linux and OS X.InstallAstropyif it is not already installed.Installtheverseby running this on the command line:python -m pip install theverseDepending on your system, you may need to usepython3instead ofpython.
This will often be the case for Linux and OS X.Upgradingpython -m pip install theverse --upgradeDepending on your system, you may need to usepython3instead ofpython.
This will often be the case for Linux and OS X.Installing the development versionIf you want to install the development version to use the latest features,
downloadtheversefromGitHub, extract
the files, and then runpython setup.py installDepending on your system, you may need to usepython3instead ofpython.
This will often be the case for Linux and OS X.Technical detailsObjects in the universe are represented as class instances.  For example, the
Sun is an instance of the classStar.Physical properties are represented via a subclass ofastropy.units.Quantity.
This ensures that all quantities have associated units.  Quantities also havereferenceandreference_urlattributes that provide information about the
source of values.Collections of objects, liketheverse.universe.stars, are instances of a
dict subclass.  For example,theverse.universe.starsmaps star names
(strings) to instances of the classStar.  The dict subclass used in these
cases allows values to be accessed normally (theverse.universe.stars['Sun'])
and also as lowercased attributes (theverse.universe.stars.sun).  The dict
subclass does not support standard dict methods for adding or deleting keys;
data should typically be treated as immutable once it is loaded.