casadi
CasADi -- framework for algorithmic differentiation and numeric optimization
Decision gist · record as of 2026-08-14
Yes, if you need symbolic optimization with automatic differentiation. CasADi is actively maintained, has no known vulnerabilities, and offers broad platform support. The main consideration is the copyleft license: if you're building proprietary software, verify that using an unmodified library under LGPLv3+ aligns with your licensing strategy, or contact the maintainers about commercial options.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a working C++ compiler or prebuilt wheel for your Python version and platform; wheels are provided for Python 2.7 and 3.4–3.12 on common architectures.
- Medium install friction due to compiled C++ bindings, but prebuilt wheels are available for common Python versions (2.7, 3.10–3.12) and platforms (macOS, Windows, Linux).
- The project is actively maintained with a recent commit history and no known vulnerabilities.
License · maintenance · safety
copyleft license (copyleft) — Licensed under LGPLv3+, a copyleft license requiring that derivative works and modifications remain open-source under the same license. Proprietary projects using CasADi must either comply with these terms or obtain a commercial license.
last release 2025-09-10 (338 days) · last repo commit 2026-08-12 · 2,272 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,536,190 downloads/mo, #3,798 on PyPI
Alternatives
Verify before relying
pip install casadi
import casadi as ca
import numpy as np
# Define a simple optimization variable
x = ca.SX.sym('x')
# Define objective and solve
objective = (x - 2)**2
solver = ca.nlpsol('solver', 'ipopt', {'x': x, 'f': objective})
result = solver(x0=0)- Whether CasADi's symbolic computation model is suitable for real-time or embedded optimization tasks
- Performance characteristics compared to other automatic differentiation frameworks for large-scale problems
- Availability of commercial licensing options for proprietary use
What it is and what it does
CasADi is a symbolic computation and optimization framework written in C++ with Python bindings. It provides automatic differentiation, allowing you to define optimization problems symbolically and have gradients computed automatically. The package is designed for researchers and engineers working on nonlinear optimization, optimal control, and algorithmic differentiation tasks where you need to compute derivatives efficiently without hand-coding them.
The framework depends only on numpy at runtime and offers prebuilt wheels for Python 2.7 and 3.4–3.12 across macOS, Windows, and Linux. It has been in production use since 2017 and maintains active development. The copyleft license means that if you modify CasADi itself, those changes must remain open-source; using it unmodified in a proprietary application is permitted but may require review of your use case.
Use it for
- Define and solve nonlinear optimization problems with automatic gradient computation
- Implement optimal control algorithms where symbolic differentiation reduces implementation burden
- Perform sensitivity analysis and parameter optimization in scientific computing workflows
- Build embedded optimization routines for real-time control systems
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need symbolic optimization with automatic differentiation.
CasADi is actively maintained, has no known vulnerabilities, and offers broad platform support. The main consideration is the copyleft license: if you're building proprietary software, verify that using an unmodified library under LGPLv3+ aligns with your licensing strategy, or contact the maintainers about commercial options.
Install
casadi on PyPI
Before you install
Medium install friction due to compiled C++ bindings, but prebuilt wheels are available for common Python versions (2.7, 3.10–3.12) and platforms (macOS, Windows, Linux). The project is actively maintained with a recent commit history and no known vulnerabilities.
Requires a working C++ compiler or prebuilt wheel for your Python version and platform; wheels are provided for Python 2.7 and 3.4–3.12 on common architectures.
License in practice
Licensed under LGPLv3+, a copyleft license requiring that derivative works and modifications remain open-source under the same license. Proprietary projects using CasADi must either comply with these terms or obtain a commercial license.
Quickstart
pip install casadi
import casadi as ca
import numpy as np
# Define a simple optimization variable
x = ca.SX.sym('x')
# Define objective and solve
objective = (x - 2)**2
solver = ca.nlpsol('solver', 'ipopt', {'x': x, 'f': objective})
result = solver(x0=0)
Verify before relying
- Whether CasADi's symbolic computation model is suitable for real-time or embedded optimization tasks
- Performance characteristics compared to other automatic differentiation frameworks for large-scale problems
- Availability of commercial licensing options for proprietary use
Package facts
| License | copyleft license copyleft |
| Python support | Not specified |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 1 packagenumpy |
| Maintenance | Actively maintained 338 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,536,190 / month, #3,798 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: Science/ResearchLicense :: OSI ApprovedOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: POSIXOperating System :: UnixProgramming Language :: C++Programming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonTopic :: Scientific/Engineering |
Evidence: casadi-3.7.2-cp27-none-macosx_10_13_x86_64.macosx_10_13_intel.whl; casadi-3.7.2-cp27-none-manylinux1_i686.whl; casadi-3.7.2-cp27-none-manylinux2010_x86_64.whl; casadi-3.7.2-cp27-none-win_amd64.whl; casadi-3.7.2-cp310-none-macosx_10_13_x86_64.macosx_10_13_intel.whl; casadi-3.7.2-cp310-none-macosx_11_0_arm64.whl; casadi-3.7.2-cp310-none-manylinux2014_aarch64.whl; casadi-3.7.2-cp310-none-manylinux2014_i686.whl; casadi-3.7.2-cp310-none-manylinux2014_x86_64.whl; casadi-3.7.2-cp310-none-win_amd64.whl; casadi-3.7.2-cp311-none-macosx_10_13_x86_64.macosx_10_13_intel.whl; casadi-3.7.2-cp311-none-macosx_11_0_arm64.whl; casadi-3.7.2-cp311-none-manylinux2014_aarch64.whl; casadi-3.7.2-cp311-none-manylinux2014_i686.whl; casadi-3.7.2-cp311-none-manylinux2014_x86_64.whl; casadi-3.7.2-cp311-none-win_amd64.whl; casadi-3.7.2-cp312-none-macosx_10_13_x86_64.macosx_10_13_intel.whl; casadi-3.7.2-cp312-none-macosx_11_0_arm64.whl; casadi-3.7.2-cp312-none-manylinux2014_aarch64.whl; casadi-3.7.2-cp312-none-manylinux2014_i686.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “automatic differentiation python”
- casadiCasADi is a framework for algorithmic differentiation and numeric…
- jaxJAX is a Python library for automatic differentiation, XLA…
- autogradAutograd automatically computes derivatives of Python and NumPy code,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Scientific/Engineering packages
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
pandas provides fast, flexible data structures (Series and DataFrame) for loading, cleaning, transforming, and analyzing labeled or relational data in Python.
scipy provides numerical algorithms for mathematics, science, and engineering—including optimization, integration, linear algebra, Fourier transforms, signal and image processing, and ODE solvers—built on numpy arrays.
scikit-learn provides a comprehensive Python library for supervised and unsupervised machine learning, including classification, regression, clustering, dimensionality reduction, and model evaluation tools built on NumPy and SciPy.
Install it if you need to train, evaluate, or deploy supervised or unsupervised learning models.
dill extends Python's pickle module to serialize and deserialize a much wider range of Python objects, including functions, lambdas, classes, and interpreter sessions, to byte streams for storage or network transmission.
Multiprocess is an enhanced fork of Python's standard multiprocessing library that uses dill for better serialization, allowing you to spawn processes with a threading-like API and share complex objects between them.
Install it if you use multiprocessing and encounter pickle serialization limits with lambdas or complex objects.
See also sparsediffpy · numdifftools · Theano · AeroSandbox · gekko · dwave-optimization · Theano-PyMC · autograd · pytensor · symengine