trmath 🔢
Türkçe destekli, sembolik & sayısal Python matematik motoru.
pip install trmath # sadece çekirdek
pip install "trmath[symbolic]" # + sympy (türev, integral, limit…)
pip install "trmath[full]" # + sympy + numpy + matplotlib
Hızlı başlangıç
from trmath import TrMathEngine
engine = TrMathEngine()
# Sayısal
r = engine.calculate("2**10 + sin(pi/4)")
print(r.result) # 1024.7071…
# Türkçe doğal dil
r = engine.calculate("karekök 144")
print(r.result) # 12.0
# Sembolik (sympy gerekir)
r = engine.calculate("türev x**3 x")
print(r.result) # 3*x**2
print(r.latex_output) # 3 x^{2}
# Birim dönüşümü
r = engine.calculate("100 C -> F")
print(r.result) # 212.0
# Toplu hesap
results = engine.batch_calculate(["2+2", "türev sin(x) x", "fib 10"])
Özellikler
| Kategori | Örnekler |
|---|---|
| Sayısal | 2^10, sin(pi/4), log(e) |
| Doğal dil (TR) | "5 artı 3", "karekök 16", "10 çarpı sin 30" |
| Sembolik | türev, integral, limit, çöz, sadeleştir, faktör |
| İleri sembolik | Taylor serisi, Laplace, Fourier |
| Sayı teorisi | asal, EBOB, EKOK, Fibonacci, faktöriyel |
| İstatistik | ortalama, standart sapma, varyans, medyan |
| Matris | det, transpose, inverse, özdeğer |
| Grafik | plot x**2 from -5 to 5, plot3d x**2+y**2 |
| Birim | 5 km -> m, 100 C -> F, 1 gb -> mb |
| Değişken | x = 5, y = x*2 |
MathResult
Her hesap bir MathResult döner:
r = engine.calculate("integral x**2 x")
r.success # True / False
r.result # x**3/3
r.latex_output # \frac{x^{3}}{3}
r.steps # adım adım açıklama listesi
r.execution_time_ms
r.error # hata varsa mesaj
r.plot_path # grafik kaydedildiyse dosya yolu
CLI
trmath # interaktif REPL başlatır
Güvenlik
- Yasaklı kelime listesi (
import,exec,eval,os.,sys.…) - Parantez derinliği limiti (>20 reddedilir)
- Input uzunluğu limiti (>5000 karakter reddedilir)
- Timeout koruması (varsayılan 10s)
Geliştirme
git clone https://github.com/kullanici/trmath
cd trmath
pip install -e ".[dev]"
pytest
Lisans
MIT
Metadata
Release files for trmath 2.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| trmath-2.1.0.tar.gz | 22.6 kB | Without provenance | Details for trmath-2.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| trmath-2.1.0-py3-none-any.whl | Python 3 | none | any | Details for trmath-2.1.0-py3-none-any.whl |
Total release size: 42.0 kB
Release files / trmath-2.1.0.tar.gz
| Download URL | trmath-2.1.0.tar.gz |
|---|---|
| Size | 22.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
38bbfb4bbe23144fb3e02e42995e07485a725c7762b3924570ce29aecae84eec
|
|
BLAKE2b-256 checksum How to use checksums |
c5a0201d83b4d16746e96764c553f1edac8054084db8aade398d41cad792bc27
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.0
|
Release files / trmath-2.1.0-py3-none-any.whl
| Download URL | trmath-2.1.0-py3-none-any.whl |
|---|---|
| Size | 19.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a6d5068c5848f4fed75b57c548fdaca0fff1e72ad5049d6b3478d3117c1c0572
|
|
BLAKE2b-256 checksum How to use checksums |
e844424051d56f7b869c21951eeb0c2e89aefba3b257f6c1d7b37466be54b85d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.0
|
Security for trmath 2.1.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.