Skip to content

interactord/rfs-framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

62 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

RFS Framework πŸš€

Enterprise-Grade Reactive Functional Serverless Framework for Python

Python 3.10+ Version License: MIT Cloud Run Ready

ν˜„λŒ€μ μΈ μ—”ν„°ν”„λΌμ΄μ¦ˆ Python μ• ν”Œλ¦¬μΌ€μ΄μ…˜μ„ μœ„ν•œ ν•¨μˆ˜ν˜• ν”„λ‘œκ·Έλž˜λ° ν”„λ ˆμž„μ›Œν¬μž…λ‹ˆλ‹€.

🎯 Why RFS Framework?

  • νƒ€μž… μ•ˆμ „μ„±: Result νŒ¨ν„΄μœΌλ‘œ μ˜ˆμ™Έ μ—†λŠ” μ—λŸ¬ 처리
  • λ°˜μ‘ν˜• 슀트림: Mono/Flux νŒ¨ν„΄μ˜ 비동기 처리
  • ν΄λΌμš°λ“œ λ„€μ΄ν‹°λΈŒ: Google Cloud Run μ΅œμ ν™”
  • ν”„λ‘œλ•μ…˜ μ€€λΉ„: λͺ¨λ‹ˆν„°λ§, λ³΄μ•ˆ, 배포 μ „λž΅ λ‚΄μž₯

⚑ Quick Start

Installation

# 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

μžμ„Έν•œ μ„€μΉ˜ μ˜΅μ…˜μ€ μ„€μΉ˜ κ°€μ΄λ“œλ₯Ό μ°Έμ‘°ν•˜μ„Έμš”.

Basic Example

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.0

Reactive Streams

from 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λ₯Ό μ°Έμ‘°ν•˜μ„Έμš”.

πŸ—οΈ Architecture

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      β†’ μ„±λŠ₯ μ΅œμ ν™”

πŸ“š Documentation

핡심 λ¬Έμ„œ

μ£Όμ œλ³„ κ°€μ΄λ“œ

전체 λ¬Έμ„œ

πŸ› οΈ Development

Commands

# 개발 μ„œλ²„
rfs-cli dev --reload

# ν…ŒμŠ€νŠΈ
pytest --cov=rfs

# μ½”λ“œ ν’ˆμ§ˆ
black src/ && mypy src/

# μ‹œμŠ€ν…œ μƒνƒœ
rfs status  # 16개 핡심 κΈ°λŠ₯ λͺ¨λ‹ˆν„°λ§

Project Structure

rfs-framework/
β”œβ”€β”€ src/rfs/
β”‚   β”œβ”€β”€ core/          # Result νŒ¨ν„΄, DI, μ„€μ •
β”‚   β”œβ”€β”€ reactive/      # Mono/Flux 슀트림
β”‚   β”œβ”€β”€ hof/           # Higher-Order Functions
β”‚   β”œβ”€β”€ production/    # ν”„λ‘œλ•μ…˜ μ‹œμŠ€ν…œ
β”‚   └── cloud_run/     # Cloud Run 톡합
β”œβ”€β”€ tests/             # ν…ŒμŠ€νŠΈ μŠ€μœ„νŠΈ
β”œβ”€β”€ docs/              # ν•œκ΅­μ–΄ λ¬Έμ„œ
└── examples/          # 예제 μ½”λ“œ

✨ Key Features

🎯 ν•¨μˆ˜ν˜• ν”„λ‘œκ·Έλž˜λ°

  • Result/Maybe/Either λͺ¨λ‚˜λ“œ
  • ν•¨μˆ˜ ν•©μ„±κ³Ό 컀링
  • λΆˆλ³€μ„±κ³Ό 순수 ν•¨μˆ˜
  • 상세 λ¬Έμ„œ β†’

⚑ λ°˜μ‘ν˜• 슀트림

πŸ”’ μ—”ν„°ν”„λΌμ΄μ¦ˆ λ³΄μ•ˆ

πŸš€ ν”„λ‘œλ•μ…˜ μ€€λΉ„

  • Blue-Green/Canary 배포
  • Circuit Breaker νŒ¨ν„΄
  • μ„±λŠ₯ λͺ¨λ‹ˆν„°λ§
  • κ°•ν™”λœ LogLevel 검증: Cloud Run ν™˜κ²½ ν˜Έν™˜μ„± κ°œμ„  (v4.6.6)
  • 상세 λ¬Έμ„œ β†’

πŸ“Š Performance

Metric Value Note
μ‹œμž‘ μ‹œκ°„ ~50ms CLI μ΄ˆκΈ°ν™”
λ©”λͺ¨λ¦¬ μ‚¬μš© ~25MB κΈ°λ³Έ μ‹€ν–‰
응닡 μ‹œκ°„ <100ms API 호좜
μ²˜λ¦¬λŸ‰ 1200 RPS 벀치마크

🚧 Status

  • 완성도: 93% (v4.6.6)
  • ν”„λ‘œλ•μ…˜ μ€€λΉ„: βœ… Ready
  • μ΅œμ‹  κ°œμ„ : LogLevel 검증 μ‹œμŠ€ν…œ κ°•ν™” - Cloud Run ν™˜κ²½ ν˜Έν™˜μ„± μ™„λ²½ 지원
  • λ―Έμ™„μ„± ν•­λͺ©: TODO.md μ°Έμ‘°

🀝 Contributing

κΈ°μ—¬λ₯Ό ν™˜μ˜ν•©λ‹ˆλ‹€! 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-feature

πŸ“„ License

MIT License - LICENSE μ°Έμ‘°

πŸ†˜ Support


Made with ❀️ by the RFS Framework Team

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages