Skip to main content

Calpylus is a powerful calculus toolkit built in Python.

Project description

📐 Calpylus

Calpylus is a powerful and beginner-friendly Python library built for symbolic and visual calculus. Whether you're a student studying calculus, an educator building tools, or a developer creating math-powered apps — Calpylus has your back with expressive syntax, beautiful plotting, and a growing feature set.

Developed with ❤️ by Mohammad Mahfuz Rahman


✨ Features

  • ✅ Symbolic Differentiation and Integration
  • ✅ 2D Function Plotting (Matplotlib-based)
  • ✅ 3D Surface Plotting (graph3D)
  • ✅ Simple, intuitive API
  • ✅ Built using SymPy and Matplotlib

📦 Installation

Install directly from PyPI:

pip install calpylus

Or install from GitHub (for development):

pip install git+https://github.com/mahfuz0712/Calpylus.git

🧪 Quick Start

import matplotlib.pyplot as plt
from calpylus.calculus import Calculus as cl

# Define a function
f = "sin(x)"
g = "cos(x)"

# Plot 2D graphs
cl.graph(f)
cl.graph(g)

# Plot a 3D surface
cl.graph3D("sin(x)*cos(y)")

# Final blocking call to keep all windows open until closed manually
plt.show()

Differential & Integral Calculus

Symbolically differentiate an expression with respect to a variable.

cl.differentiate("x**2 + sin(x)")
# Output: 2*x + cos(x)

cl.differentiate(expr: str, variable='x')

Symbolically integrate an expression with respect to a variable.

cl.integrate("x**2")
# Output: x**3/3

cl.integrate(expr: str, variable='x')

Graphical View

Plots a 2D graph of a function of x.

cl.graph(expr: str)

cl.graph("x**2 + 2*x + 1")

3D Graph

Plots a 3D surface plot of a function in terms of x and y.

cl.graph3D(expr: str)
cl.graph3D("sin(x) * cos(y)")

🧠 Under the Hood

Feature Library Used
Symbolic Math sympy
2D/3D Plotting matplotlib

🤝 Contributing

Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change or add.

To run locally:

git clone https://github.com/mahfuz0712/Calpylus.git
cd Calpylus
pip install -e .

📜 License

This project is licensed under the MIT License.


🙋 FAQ

Q: Can I use this library without knowing advanced calculus?
A: Yes! The library is designed to be intuitive and beginner-friendly.

Q: Will you add support for limits, series expansion, etc.?
A: Absolutely. These features are planned in future releases.


🌐 Links


“Mathematics is the music of reason.” — James Joseph Sylvester
Calpylus turns that music into code. 🎶

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

calpylus-0.0.4.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

calpylus-0.0.4-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file calpylus-0.0.4.tar.gz.

File metadata

  • Download URL: calpylus-0.0.4.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for calpylus-0.0.4.tar.gz
Algorithm Hash digest
SHA256 5743b95130985ad333a335a15cbebc8c68ac3932f7a9efb7cd2666b5a93a0725
MD5 54cd41172a0c569cce71e921b7cc1bb1
BLAKE2b-256 cdd1f97ccaa8cef9c1ead021857f8a0f9ee1d7edfbcd68c473530cabb3dce764

See more details on using hashes here.

File details

Details for the file calpylus-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: calpylus-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for calpylus-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0e95796b34353f4c37d90e3c808458d40b934632a93c1a1912ed800ae8e82deb
MD5 a85c727af200f9d468928459b2b9c1d4
BLAKE2b-256 d948629936a3469761edbe67b9e88853a3a5d887bb9cdfef73081e29ca9ea7dc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page