TraceMorph
TraceMorph adalah library Python untuk melacak eksekusi fungsi, membangun visualisasi call-chain, serta menghasilkan narasi error berbasis AI (via LLM API).
🚀 Fitur
- Dekorator tracing fungsi otomatis
- Pelacakan exception global
- Ekspor hasil trace ke JSON
- Narasi human-readable berbasis LLM
- Bisa diintegrasikan ke middleware, testing, atau backend
Cara install
pip install tracemorph
🧠 Contoh Penggunaan
from tracemorph import trace
@trace
def bagi(a, b):
return a / b
bagi(10, 2)
contoh 2
from tracemorph import trace, TraceBuilder
@trace()
def error_prone(x, y):
return x / y # Bisa error kalau y=0
if __name__ == "__main__":
try:
error_prone(10, 0)
except Exception:
pass
data = TraceBuilder.build_latest_and_export()
if data:
print(data['colored_narrative']) # Print narasi berwarna rapi di terminal
else:
print("No trace found.")
contoh 3
from tracemorph import trace, TraceBuilder
@trace
def test(x):
return x * 2
test(10)
print(TraceBuilder.build_narrative_for_last()[0])
Metadata
Release files for tracemorph 0.1.5
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 |
|---|---|---|---|---|
| tracemorph-0.1.5.tar.gz | 4.4 MB | Without provenance | Details for tracemorph-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tracemorph-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for tracemorph-0.1.5-py3-none-any.whl |
Total release size: 9.7 MB
Release files / tracemorph-0.1.5.tar.gz
| Download URL | tracemorph-0.1.5.tar.gz |
|---|---|
| Size | 4.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
87039610c94d823d5eaf3db71a896080d51715d788d5da816b7ef10edf97f741
|
|
BLAKE2b-256 checksum How to use checksums |
29f51cc5450c1283b78376d15f23ba37a1b163b864d3e08269decd518f067635
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.6
|
Release files / tracemorph-0.1.5-py3-none-any.whl
| Download URL | tracemorph-0.1.5-py3-none-any.whl |
|---|---|
| Size | 5.2 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
492d1c13286a6dba4424aca66e40cef06d109693109ed5ea4bd29ac4a2308645
|
|
BLAKE2b-256 checksum How to use checksums |
d2653ecf766a744fbfd2fb9f6ffc75f2866e681e8ced161d59e4f8cd44b69591
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.6
|
Security for tracemorph 0.1.5
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.