Skip to main content

The Verse – Find properties of objects in our universe (and others) without leaving Python

The 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

>>> import theverse
>>> print(theverse.earth.equatorial_radius)
6378137.0 m
>>> for planet_name, planet_obj in theverse.solar_system.planets.items():
...     print(f'{planet_name: <10}  {planet_obj.mass}')
...
Mercury     3.3011e+23 kg
Venus       4.8675e+24 kg
Earth       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
>>> for star_name in theverse.universe.stars:
...     print(star_name)
...
Sun

Installation

Install Python 3.6+ if it is not already available on your machine. See https://www.python.org/, or use the package manager or app store for your operating system. Because The Verse requires Astropy and its dependencies (which include NumPy), you may want to consider a Python distribution like Anaconda instead.

Install setuptools for Python if it is not already installed. This can be accomplished by running

python -m pip install setuptools

on the command line. Depending on your system, you may need to use python3 instead of python. This will often be the case for Linux and OS X.

Install Astropy if it is not already installed.

Install theverse by running this on the command line:

python -m pip install theverse

Depending on your system, you may need to use python3 instead of python. This will often be the case for Linux and OS X.

Upgrading

python -m pip install theverse --upgrade

Depending on your system, you may need to use python3 instead of python. This will often be the case for Linux and OS X.

Installing the development version

If you want to install the development version to use the latest features, download theverse from GitHub, extract the files, and then run

python setup.py install

Depending on your system, you may need to use python3 instead of python. This will often be the case for Linux and OS X.

Technical details

Objects in the universe are represented as class instances. For example, the Sun is an instance of the class Star.

Physical properties are represented via a subclass of astropy.units.Quantity. This ensures that all quantities have associated units. Quantities also have reference and reference_url attributes that provide information about the source of values.

Collections of objects, like theverse.universe.stars, are instances of a dict subclass. For example, theverse.universe.stars maps star names (strings) to instances of the class Star. 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.

Metadata

Release files for theverse 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for theverse 0.1.1
File Size Uploaded Provenance
theverse-0.1.1.tar.gz 14.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for theverse 0.1.1
File Interpreter ABI Platform
theverse-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 32.6 kB

Release files / theverse-0.1.1.tar.gz

Download URL theverse-0.1.1.tar.gz
Size 14.8 kB
Tags Source
SHA-256 checksum
How to use checksums
1c001c9c287356bb8d8543cd4d155530600ee0c10a65d9eeba7ffd76299dff8d
BLAKE2b-256 checksum
How to use checksums
8f3df42560f39f75819590be0e9ac2326c994276c4659863b86cb68a20739c0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1.post20200604 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.3

Release files / theverse-0.1.1-py3-none-any.whl

Download URL theverse-0.1.1-py3-none-any.whl
Size 17.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
661d8bac062d2ba44e3cfff1a275e7e966b8b6f1e3f56c11330c9ecee1955757
BLAKE2b-256 checksum
How to use checksums
d0368980b8570bb4c9050e847f37cad66b66dad501c58517d495ebdd952900ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1.post20200604 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.3

Security for theverse 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

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