A Python library with extensive natural constants, equations, and formulae.
Find a file
Fabian Schober 5c11fd8e24 Prepare naturedynamics for PyPI publication
Populate the empty top-level __init__.py so `import naturedynamics as nd;
nd.constants.SPEED_OF_LIGHT` works as documented in the README, fix
carnot_efficiency's over-indented return (was unreachable dead code,
always returning None), set the package author to the current maintainer,
sync dev extras with requirements-dev.txt, and ignore build/ dist/ output.

Claude-Session: https://claude.ai/code/session_016HKXv2RYErNkLLGYuBmusE
2026-09-05 11:15:50 +02:00
naturedynamics Prepare naturedynamics for PyPI publication 2026-09-05 11:15:50 +02:00
.gitignore Prepare naturedynamics for PyPI publication 2026-09-05 11:15:50 +02:00
LICENSE Initial commit 2025-06-29 02:43:58 +05:30
pyproject.toml Prepare naturedynamics for PyPI publication 2026-09-05 11:15:50 +02:00
README.md Updated Readme 2026-09-04 08:20:36 +02:00
requirements-dev.txt Added dependencies for development environment 2025-08-10 02:55:06 +05:30
requirements.txt feat: add requirements.txt 2025-08-10 02:51:52 +05:30

naturedynamics — A Comprehensive Physics Library in Python

naturedynamics is a Python library that offers an extensive collection of physical constants, equations, and formulas. It is a fork of https://github.com/reumer06/fphysics. @reumer06 did an amazing job in compiling an exhaustive collection of laws and formulas. This was exactly what I envisioned too, so I am very grateful to build on that and extend it in all kind of directions.

Key Features

Constants Database

Includes essential physical constants — SI base units, quantum constants, astronomical parameters, and more.

Modular Formula Collections

Separate modules for mechanics, thermodynamics, electromagnetism, atomic physics, nuclear physics, relativity, statistical mechanics, and beyond.

Unit Conversion

Convert seamlessly between SI, CGS, and natural units.

Built for Learning and Worldbuilding

Perfect for integration into scientific calculators, simulations and teaching aids.

Quick Start

import naturedynamics as nd
from naturedynamics.relativity.general import schwarzschild_radius
from naturedynamics.thermodynamics.heat_engines import carnot_efficiency

# Access fundamental constants
print(nd.constants.SPEED_OF_LIGHT)   

# Calculate Schwarzschild radius
print(schwarzschild_radius(10))

#Calulate the Carnot Efficiency
print(carnot_efficiency(500, 300))

Contributing

I welcome all contributions — from adding new formulas to refining documentation.

  1. Fork the repository
  2. Create a feature branch
  3. Submit a pull request
  4. Report issues or suggest enhancements

License

MIT License - see LICENSE file for details.