SymPy

Full-featured computer algebra system (CAS) written entirely in pure Python

Library
PyPI
v1.14.0
14,972 stars
BSD 3-Clause License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
93 /100 Excellent
Development Activity 100
Maintenance 84
Community 88
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
78 /100 Good
Architecture 85
Code Quality 88
Innovation 82
Learning Curve 55

SymPy is a computer algebra system that lets Python perform symbolic mathematics: algebraic simplification, calculus (differentiation, integration, limits, series), equation solving, matrix algebra, and much more, all producing exact symbolic results rather than floating-point approximations. It is implemented entirely in pure Python with no mandatory compiled dependencies, using mpmath for arbitrary-precision numerical evaluation when needed.

SymPy is one of the most widely used open-source CAS projects and underpins symbolic math functionality across the scientific Python stack, including Jupyter’s math rendering, physics and engineering toolchains, and educational software, while also being usable as a standalone library or through its interactive isympy shell.

What You Get

  • Symbolic algebra and simplification: expand, factor, simplify, solve equations and systems exactly
  • Symbolic calculus: derivatives, integrals, limits, series expansions, and differential equation solving
  • Matrix and linear algebra module with symbolic entries, plus a separate holonomic-functions module
  • Domain-specific submodules for physics, geometry, combinatorics, number theory, cryptography, and code generation
  • LaTeX/pretty-printing output and Jupyter notebook integration for readable mathematical rendering

Common Use Cases

  • Symbolically solving equations, integrals, or differential equations that resist numerical approaches
  • Deriving and simplifying physics or engineering formulas before converting them to numerical code via codegen
  • Teaching and learning mathematics interactively through the isympy shell or Jupyter notebooks with rendered math
  • Generating optimized numerical code (C, Fortran, Python) from symbolic expressions for performance-critical pipelines
  • Verifying analytical derivations programmatically as part of scientific computing workflows

Under The Hood

Architecture SymPy’s core (sympy/core) defines the expression-tree representation (Basic, Expr) that every symbolic object is built from, with an assumptions system layered on top to reason about properties like positivity or realness; dozens of largely independent top-level packages (calculus, matrices, physics, geometry, combinatorics, codegen, parsing, plotting) extend this core with domain-specific symbolic algorithms, and external/multipledispatch manage optional integrations and type-based dispatch across the codebase.

Tech Stack Pure Python with no required compiled extensions, relying on mpmath as its numerical evaluation backend; packaged via a standard pyproject.toml/setup.py, with optional integrations for numpy, scipy, matplotlib (plotting), and Jupyter for rich display.

Code Quality The project has an exceptionally large and mature test suite embedded alongside each module (doctest-driven examples plus dedicated test files), enforced flake8 linting, and codecov coverage tracking; the codebase is large (dozens of subpackages) but consistently organized by mathematical domain, with a long-established contribution process and CODE_OF_CONDUCT.

API Design The primary entry point (from sympy import *, symbol creation via symbols(), then calling functions like diff(), integrate(), solve()) is approachable for anyone with basic math background, though the sheer breadth of specialized submodules (physics, holonomic functions, Lie algebras) means mastering the full library has a steep learning curve; documentation is extensive with a dedicated docs site and countless runnable examples.

Used by 5 apps in this directory

Python
100%
Apache 2.0

Agno

AI Development · Automation · Devops

42,358

Build, run, and manage agent platforms with a full production stack — SDK, runtime, and control plane included.

View details
93
Repo Health
87
Technical
66
Dependency
Built with
Python 100%
Updated 5 days ago
TypeScript
91%
Apache 2.0

Helicone

AI Development · Analytics · Monitoring

6,182

An open-source AI gateway and LLM observability platform that routes requests to 100+ models while logging cost, latency, and full traces for every call.

View details
70
Repo Health
81
Technical
65
Dependency
Built with
TypeScript 91%
Updated 2 weeks ago
Python
62%
Apache 2.0

marimo

Data Engineering · Developer Tools

22,918

A reactive Python notebook that eliminates hidden state, runs reproducibly, and deploys as a web app or script — stored as pure Python, built for the AI era.

View details
89
Repo Health
91
Technical
65
Dependency
Built with
Python 62%
TypeScript 37%
Updated 6 days ago
Python
94%
Apache 2.0

SWIRL

Data Engineering · Databases · Search

3,047

Federated AI search and RAG across 100+ enterprise sources—no data extraction, no vector database required.

View details
62
Repo Health
83
Technical
65
Dependency
Built with
Python 94%
Updated 1 weeks ago
C
76%
AGPL 3.0

TDengine

Databases

25,146

A high-performance, open-source time-series database built in C for IoT, connected vehicles, and industrial monitoring workloads, with built-in stream processing, caching, and data subscription.

View details
97
Repo Health
71
Technical
68
Dependency
Built with
C 76%
C++ 16%
Updated 1 weeks ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers