Skip to main content
EinsteinPy logo
Name:

EinsteinPy

Website:

https://einsteinpy.org/

Version:

0.5.0

astropy docslatest Join the chat at https://gitter.im/EinsteinPy-Project/EinsteinPy riotchat mailing license

circleci ghactions appveyor codecov

EinsteinPy is an open-source pure Python package dedicated to the study of problems arising in General Relativity and gravitational physics. Using EinsteinPy, it is possible to approach problems symbolically as well as numerically. On the symbolic side, EinsteinPy provides a robust API, which allows users to access several predefined metrics or to define custom metrics and perform symbolic calculations on them. Computation of quantities, such as terms of metric tensors, Christoffel symbols, Riemann Curvature tensor, Ricci tensor, stress-energy tensor and more are all supported and extensible, since the symbolic modules are built on top of SymPy. On the numerical side, EinsteinPy provides tools to calculate and visualize geodesics, metric singularities and hypersurface embeddings in certain spacetimes. We hope to extend the package to include more features in the future. EinsteinPy is released under the MIT license.

Documentation

docslatest docsstable

Complete documentation, including a user guide and an API reference, can be perused on the wonderful Read the Docs.

Examples

mybinder

Several tutorial Jupyter notebooks on specific applications of EinsteinPy can be found in the examples directory. You can launch a Jupyter notebook instance in the cloud using binder to run and edit these notebooks without installing anything. Try it out!

Requirements

EinsteinPy requires the following Python packages:

  • NumPy, for basic numerical routines

  • SciPy, for solving ordinary differential equations

  • SymPy, for symbolic calculations

  • Astropy, for handling conversion between physical units

  • Matplotlib, for producing static visualizations

  • Plotly, for producing interactive visualizations

  • Numba, for accelerating the code

EinsteinPy is currently tested on Linux, Windows and macOS on Python 3.10 to 3.15, against the latest NumPy.

Platform

Site

Status

Linux

CircleCI

circleci

macOS

Github Actions

ghactions

Windows x64

Appveyor

appveyor

Installation

Currently, the recommended way to install EinsteinPy is using pip from PyPI:

$ pip install einsteinpy

Or, you can install the package using conda:

$ conda install einsteinpy --channel conda-forge

Note that the package on conda-forge is currently a version behind PyPI. We are working on updating it.

For Debian/Ubuntu/Mint users, the package is installable via apt (Ubuntu 19.04 onwards):

$ sudo apt install python3-einsteinpy

If you prefer to install from source to stay on the latest but likely unstable version, you can do so using the method described here.

Problems

If the installation fails or you find something that doesn’t work as expected, please open an issue in the issue tracker.

Contributing

EinsteinPy is a community project. Hence, all contributions are more than welcome! For more information, head to CONTRIBUTING or see the developer guide.

Support

Join the chat at https://gitter.im/EinsteinPy-Project/EinsteinPy riotchat mailing

Please join our [matrix] channel or Gitter chat room for general discussions and further queries.

Release announcements take place on our mailing list. Feel free to join!

If you still have a doubt, write to us directly at all@einsteinpy.org.

Citing

If you use EinsteinPy in your project, please drop us a line. You can also use the DOI to cite it in your publications. This is the latest one:

doi

And this is an example citation format:

Shreyas Bapat et al (2021). EinsteinPy 0.4.0 (v0.4.0). Zenodo. https://doi.org/10.5281/zenodo.2582387

License

license

EinsteinPy is released under the MIT license, thereby allowing commercial use of the library. Please refer to COPYING for more details.

FAQ

Why “EinsteinPy”?

EinsteinPy borrows the name of the famous physicist, Nobel laureate and revolutionary human, Dr. Albert Einstein. This is a small tribute on our part for the amazing work he did for humanity!

Can I do <insert nerdy thing> with EinsteinPy?

EinsteinPy is focused on general relativity. One can always discuss probable features in discussion forums and the mailing list and also work with the maintainers to try to implement them. We welcome every contribution to EinsteinPy. Please see CONTRIBUTING for more details.

What’s the future of the project?

EinsteinPy is actively maintained and we hope to receive an influx of new contributors. The best way to get an idea about the roadmap is to view the milestones of the project.

Inspiration

The documentation and code structure is shamelessly inspired by poliastro. We wholeheartedly thank the poliastro developers that made this possible. EinsteinPy is nothing without its supporters and community.

Metadata

Release files for einsteinpy 0.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 einsteinpy 0.5.0
File Size Uploaded Provenance Actions
einsteinpy-0.5.0.tar.gz 33.0 MB Without provenance Details for einsteinpy-0.5.0.tar.gz

Built distribution (wheel)

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

Total release size: 33.1 MB

Release files / einsteinpy-0.5.0.tar.gz

Download URL einsteinpy-0.5.0.tar.gz
Size 33.0 MB
Tags Source
SHA-256 checksum
How to use checksums
2eee8f66a58de91ac854919424bc8582a0ff09bbc3a7a22cb641422b92e42852
BLAKE2b-256 checksum
How to use checksums
35e4935de0bc992dc2b2a5c528f070ca45e5d13a03581f6e18b7cce7b4f90316
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.0

Release files / einsteinpy-0.5.0-py3-none-any.whl

Download URL einsteinpy-0.5.0-py3-none-any.whl
Size 89.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3f8af4cf3e8972c9b95e103c4888fb2a258bdb2bab8d3006b927b1a75bbe259d
BLAKE2b-256 checksum
How to use checksums
d1d70ea6566f5e5454a8240ccfa1453baf401441e8d0a9d6cfbe6a02b51e08dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.0

Security for einsteinpy 0.5.0

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.

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