Enterprise-Grade Reactive Functional Serverless Framework for Python
νλμ μΈ μν°νλΌμ΄μ¦ Python μ ν리μΌμ΄μ μ μν ν¨μν νλ‘κ·Έλλ° νλ μμν¬μ λλ€.
- νμ μμ μ±: Result ν¨ν΄μΌλ‘ μμΈ μλ μλ¬ μ²λ¦¬
- λ°μν μ€νΈλ¦Ό: Mono/Flux ν¨ν΄μ λΉλκΈ° μ²λ¦¬
- ν΄λΌμ°λ λ€μ΄ν°λΈ: Google Cloud Run μ΅μ ν
- νλ‘λμ μ€λΉ: λͺ¨λν°λ§, 보μ, λ°°ν¬ μ λ΅ λ΄μ₯
# PyPIμμ μ€μΉ (v4.6.6 - μ΅μ μμ λ²μ )
pip install rfs-framework
# μ νμ λͺ¨λ μ€μΉ
pip install rfs-framework[web] # FastAPI μΉ νλ μμν¬ (μλ£)
pip install rfs-framework[database] # λ°μ΄ν°λ² μ΄μ€ μ§μ (μλ£)
pip install rfs-framework[test] # ν
μ€ν
λꡬ (μλ£)
pip install rfs-framework[dev] # κ°λ° λꡬ (μλ£)
pip install rfs-framework[docs] # λ¬Έμν λꡬ (TBD)
pip install rfs-framework[ai] # AI/ML ν΅ν© (TBD)
# λͺ¨λ κΈ°λ₯ ν¬ν¨
pip install rfs-framework[all]
# GitHubμμ μ΅μ λ²μ μ€μΉ (v4.3.0)
pip install git+https://github.com/interactord/rfs-framework.gitμμΈν μ€μΉ μ΅μ μ μ€μΉ κ°μ΄λλ₯Ό μ°Έμ‘°νμΈμ.
from rfs import Result, Success, Failure
def divide(a: int, b: int) -> Result[float, str]:
if b == 0:
return Failure("Cannot divide by zero")
return Success(a / b)
# μμ ν μλ¬ μ²λ¦¬
result = divide(10, 2)
if result.is_success:
print(f"Result: {result.unwrap()}") # Result: 5.0from rfs.reactive import Flux
import asyncio
async def process_data():
result = await (
Flux.from_iterable(range(100))
.parallel(4) # 4κ° μ€λ λ λ³λ ¬ μ²λ¦¬
.map(lambda x: x * x)
.filter(lambda x: x % 2 == 0)
.collect_list()
)
return resultλ λ§μ μμ λ Examples Directoryλ₯Ό μ°Έμ‘°νμΈμ.
Application Layer
βββ CLI & Tools β κ°λ°μ λꡬ
βββ Web Framework β FastAPI ν΅ν©
βββ Cloud Services β GCP ν΅ν©
Core Layer
βββ Result Pattern β ν¨μν μλ¬ μ²λ¦¬
βββ Reactive Streams β λΉλκΈ° μ€νΈλ¦Ό
βββ State Machine β μν κ΄λ¦¬
βββ Event Sourcing β CQRS/μ΄λ²€νΈ μ€ν μ΄
Infrastructure Layer
βββ Security β RBAC/ABAC, JWT
βββ Monitoring β λ©νΈλ¦, λ‘κΉ
βββ Deployment β Blue-Green, Canary
βββ Optimization β μ±λ₯ μ΅μ ν
- ν΅μ¬ κ°λ - Result ν¨ν΄κ³Ό ν¨μν νλ‘κ·Έλλ°
- API Reference - μ 체 API λ¬Έμ
- μ¬μ©μ κ°μ΄λ - λ¨κ³λ³ μ¬μ© μλ΄
- μ€μ κ΄λ¦¬ - νκ²½λ³ μ€μ
- 보μ - μΈμ¦, μΈκ°, 보μ κ°ν
- λ°°ν¬ - νλ‘λμ λ°°ν¬ μ λ΅
- CLI λꡬ - λͺ λ Ήν μΈν°νμ΄μ€
- π Docs (νκ΅μ΄) - 17κ° λͺ¨λ μμΈ λ¬Έμ
- π HOF Library - Higher-Order Functions
- λ§μ΄κ·Έλ μ΄μ κ°μ΄λ - v3μμ v4λ‘ μ κ·Έλ μ΄λ
# κ°λ° μλ²
rfs-cli dev --reload
# ν
μ€νΈ
pytest --cov=rfs
# μ½λ νμ§
black src/ && mypy src/
# μμ€ν
μν
rfs status # 16κ° ν΅μ¬ κΈ°λ₯ λͺ¨λν°λ§rfs-framework/
βββ src/rfs/
β βββ core/ # Result ν¨ν΄, DI, μ€μ
β βββ reactive/ # Mono/Flux μ€νΈλ¦Ό
β βββ hof/ # Higher-Order Functions
β βββ production/ # νλ‘λμ
μμ€ν
β βββ cloud_run/ # Cloud Run ν΅ν©
βββ tests/ # ν
μ€νΈ μ€μνΈ
βββ docs/ # νκ΅μ΄ λ¬Έμ
βββ examples/ # μμ μ½λ
- Result/Maybe/Either λͺ¨λλ
- ν¨μ ν©μ±κ³Ό 컀λ§
- λΆλ³μ±κ³Ό μμ ν¨μ
- μμΈ λ¬Έμ β
- λΉλκΈ° Mono/Flux ν¨ν΄
- λ°±νλ μ μ§μ
- 30+ μ°μ°μ
- μμΈ λ¬Έμ β
- RBAC/ABAC μ κ·Ό μ μ΄
- JWT μΈμ¦
- μ·¨μ½μ μ€μΊλ
- μμΈ λ¬Έμ β
- Blue-Green/Canary λ°°ν¬
- Circuit Breaker ν¨ν΄
- μ±λ₯ λͺ¨λν°λ§
- κ°νλ LogLevel κ²μ¦: Cloud Run νκ²½ νΈνμ± κ°μ (v4.6.6)
- μμΈ λ¬Έμ β
| Metric | Value | Note |
|---|---|---|
| μμ μκ° | ~50ms | CLI μ΄κΈ°ν |
| λ©λͺ¨λ¦¬ μ¬μ© | ~25MB | κΈ°λ³Έ μ€ν |
| μλ΅ μκ° | <100ms | API νΈμΆ |
| μ²λ¦¬λ | 1200 RPS | λ²€μΉλ§ν¬ |
- μμ±λ: 93% (v4.6.6)
- νλ‘λμ μ€λΉ: β Ready
- μ΅μ κ°μ : LogLevel κ²μ¦ μμ€ν κ°ν - Cloud Run νκ²½ νΈνμ± μλ²½ μ§μ
- λ―Έμμ± νλͺ©: TODO.md μ°Έμ‘°
κΈ°μ¬λ₯Ό νμν©λλ€! Contributing Guideλ₯Ό μ°Έμ‘°νμΈμ.
# κ°λ° νκ²½ μ€μ
git clone https://github.com/interactord/rfs-framework
cd rfs-framework
pip install -e ".[dev]"
# ν
μ€νΈ μ€ν
pytest
# PR μ μΆ
git checkout -b feature/your-feature
git commit -m "feat: add feature"
git push origin feature/your-featureMIT License - LICENSE μ°Έμ‘°
- λ¬Έμ λ³΄κ³ : GitHub Issues
- ν λ‘ : Discussions
- λ¬Έμ: Wiki
Made with β€οΈ by the RFS Framework Team