godlights
GL: All In One (aio) — 여러 변수에 같은 attribute / 같은 함수를 한 번에 적용.
설치
pip install . # 프로젝트 폴더에서
pip install -e . # 개발용(편집 즉시 반영)
사용
from godlights import allinone as aio # 또는: from godlights import aio
class P:
def __init__(self, hp): self.hp = hp
def heal(self, amount):
self.hp += amount
return self.hp
a, b, c = P(10), P(20), P(30)
aio.call_all(a, b, c, argument="hp") # [10, 20, 30]
aio.call_all(a, b, c, "hp") # [10, 20, 30]
aio.set_all(a, b, c, argument="hp", value=100) # a.hp = b.hp = c.hp = 100
x1, x2, x3 = aio.run_func(str.upper, "a", "b", "c") # 'A', 'B', 'C'
d1, d2 = aio.run_func(lambda x, n: x**n, 2, 3, n=2) # 4, 9
aio.call_method(a, b, c, method="heal", amount=10) # [110, 110, 110]
aio.flatten_call([a, b, c], argument="hp") # [110, 110, 110]
함수
call_all(*args, argument)— 각 변수의argumentattribute를 리스트로 반환.set_all(*args, argument, value)— 각 변수의argumentattribute에 동일한value를 한 번에 설정.run_func(function, *args, **kwargs)—function(arg)를 각 arg마다 실행해 리스트로 반환.kwargs는 공통 전달.call_method(*args, method, **kwargs)— 각 변수의 같은 메서드를 동일 kwargs로 호출해 결과를 리스트로 반환.flatten_call(iterable, argument)— list/tuple 등에 든 변수들의 같은 attribute를 리스트로 반환.
모든 *args 헬퍼(call_all, set_all, call_method)는 argument/method를 키워드로 넘기거나, 마지막 위치 인자로 넘길 수 있습니다.
빌드 / 배포
pip install build twine
python -m build # dist/ 에 sdist, wheel 생성
twine upload dist/* # PyPI 업로드
테스트
pip install pytest
pip install -e .
pytest
CI/CD
.github/workflows/test.yml— push/PR마다 Python 3.8~3.12에서 pytest 실행.github/workflows/publish.yml— GitHub Release를 publish하면 빌드 후 PyPI에 업로드 (Trusted Publishing/OIDC 사용, PyPI 프로젝트 설정에서 이 저장소를 trusted publisher로 먼저 등록해야 함)
Release files for godlights 0.1.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 | |
|---|---|---|---|
| godlights-0.1.1.tar.gz | 3.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| godlights-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.4 kB
Release files / godlights-0.1.1.tar.gz
| Download URL | godlights-0.1.1.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0ac00b0f7316be77600db983a9ce110d5386aab09ccfcc717563491bbce0c065
|
|
BLAKE2b-256 checksum How to use checksums |
42dfe7c8868e5b9df1a9f9229b490a0d7a7a61567165a0b2b02020705501ce21
|
| 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 19, 2026.
Transparency logRelease files / godlights-0.1.1-py3-none-any.whl
| Download URL | godlights-0.1.1-py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c7a2a9730f7cfef9277420bba2722766c4f72a81fec2ca62314cf0971b02207e
|
|
BLAKE2b-256 checksum How to use checksums |
cf54c544374618bf416498f7bcb89a38f72890f9ac9bfb1fc873a579e4d81df7
|
| 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 19, 2026.
Transparency log