Skip to main content

gm-lifecycle

함수의 실행 주기를 객체로 추적하는 Python 라이브러리입니다.

설치

pip install gm-lifecycle

소개

gm-lifecycle은 함수 호출 한 번을 하나의 LifeCycle 객체로 표현합니다. 함수 실행 중 원하는 데이터를 기록하고, 함수 간 호출 관계를 자동으로 추적하며, 실행 완료나 예외 발생 시 hook을 실행할 수 있습니다.

빠른 시작

from lifecycle import App, TracerManager, LifeCycle

class MyLC(LifeCycle[[int, int], int]):
    def on_enter(self, a: int, b: int) -> None:
        self.operands = (a, b)

    def on_exit(self, return_value: int) -> None:
        print(f"{self.operands[0]} + {self.operands[1]} = {return_value}")

app = App()
manager = TracerManager(MyLC, app)

@manager.tracing
def add(a: int, b: int) -> int:
    return a + b

add(1, 2)  # 1 + 2 = 3

문서

모듈 상세 API는 lifecycle/README.md를 참고하세요.

라이선스

MIT

Metadata

Release files for gm-lifecycle 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gm-lifecycle 1.1.0
File Size Uploaded Provenance Actions
gm_lifecycle-1.1.0.tar.gz 3.0 kB With provenance Details for gm_lifecycle-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gm-lifecycle 1.1.0
File Interpreter ABI Platform Actions
gm_lifecycle-1.1.0-py3-none-any.whl Python 3 none any Details for gm_lifecycle-1.1.0-py3-none-any.whl

Total release size: 6.4 kB

Release files / gm_lifecycle-1.1.0.tar.gz

Download URL gm_lifecycle-1.1.0.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
7cb4cfc7982d06e8c1a2a9cb5e41257bdd87cc7168dd5d67261ff39bc55bca07
BLAKE2b-256 checksum
How to use checksums
59091cc8016fca52500edac0925cdbcbf27e4f7795cdcfb68772cd9fa16d2766
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 8, 2026.

Transparency log

Release files / gm_lifecycle-1.1.0-py3-none-any.whl

Download URL gm_lifecycle-1.1.0-py3-none-any.whl
Size 3.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
70dccd4a35f4efee13a0849dc2ddaaf12ed75b7e5edbe071d0e7bf8bdf0bffa7
BLAKE2b-256 checksum
How to use checksums
727dcad8cd5bbd7c41b040977edb34e5222ca9131625c5bd3cc082ee96e75131
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 8, 2026.

Transparency log

Security for gm-lifecycle 1.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for gm_lifecycle-1.1.0.tar.gz

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 Apr 8, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page