keecas
Symbolic and units-aware calculations for Jupyter notebooks with beautiful LaTeX output.
What is keecas?
keecas minimizes boilerplate for symbolic calculations using Python dicts as the core container - keys represent left-hand side symbols, values represent right-hand side expressions. Built on SymPy, Pint, and Pipe, it provides automatic unit conversion and LaTeX rendering for Quarto documents.
Quick Example
from keecas import symbols, u, pc, show_eqn
# 1. Define symbols with LaTeX notation
F, A, sigma = symbols(r"F, A, \sigma")
# 2. Cell-local parameters
_p = {
F: 10 * u.kN,
A: 50 * u.cm**2,
}
# 3. Cell-local expressions
_e = {
sigma: "F / A" | pc.parse_expr
}
# 4. Evaluation with pipe operations
_v = {
k: v | pc.subs(_e | _p) | pc.convert_to([u.MPa]) | pc.N
for k, v in _e.items()
}
# 5. Display as LaTeX amsmath
show_eqn([_p | _e, _v])
Output:
\begin{align}
F & = 10{\,}\text{kN} & \\[8pt]
A & = 50{\,}\text{cm}^{2} & \\[8pt]
\sigma & = \dfrac{F}{A} & = 2.0{\,}\text{MPa}
\end{align}
See hello_world.ipynb for more examples.
Installation
pip install keecas
# or
uv add keecas
Quick Start
Launch JupyterLab with keecas template:
keecas edit # Minimal template
keecas edit --template quickstart # Comprehensive examples
keecas edit analysis.ipynb # Open specific notebook
keecas edit --temp # Temporary session
Configuration
Manage global and local settings via TOML files:
# Initialize configuration
keecas config init --global
# Edit configuration
keecas config edit --global # Terminal editor
keecas config open --local # System editor (GUI)
# View configuration
keecas config show # Merged settings
keecas config path # File locations
Key Features
- Dict-based equations: Natural mapping of LHS to RHS
- Pipe operations: Chain operations like
expr | pc.subs(...) | pc.N - Unit-aware: Automatic conversion between Pint and SymPy units
- LaTeX output: Renders as amsmath align blocks
- Cross-references: Label generation for Quarto documents
- Multi-language: 10 languages supported (5 fully localized)
- Configuration: Global/local TOML-based settings
Documentation
Full documentation: https://kompre.github.io/keecas
License
MIT License - see LICENSE
Metadata
Release files for keecas 1.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| keecas-1.2.1.tar.gz | 72.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| keecas-1.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 158.1 kB
Release files / keecas-1.2.1.tar.gz
| Download URL | keecas-1.2.1.tar.gz |
|---|---|
| Size | 72.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2108e7e1b4db5782ad4af358699cc62b022451d1812ca0814ce6989c5e6cc99f
|
|
BLAKE2b-256 checksum How to use checksums |
8506f784cfa3b936dcea8fc8810a3304046afd75fe20bac1d2aa461bfe403abc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 13, 2026.
Transparency logRelease files / keecas-1.2.1-py3-none-any.whl
| Download URL | keecas-1.2.1-py3-none-any.whl |
|---|---|
| Size | 86.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ce59d42c5979cb8fc4992807ca4bc0bc1e448fa35858641ef4a7d8310475b277
|
|
BLAKE2b-256 checksum How to use checksums |
a7d755968efa8c854eda5cf01a7c515532ec511b8a0cbc288745a38394bd8ea0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 13, 2026.
Transparency log