Enterprise-Grade Reactive Functional Serverless Framework for Python
Project description
RFS Framework ๐
Enterprise-Grade Reactive Functional Serverless Framework for Python
ํ๋์ ์ธ ์ํฐํ๋ผ์ด์ฆ Python ์ ํ๋ฆฌ์ผ์ด์ ์ ์ํ ํจ์ํ ํ๋ก๊ทธ๋๋ฐ ํ๋ ์์ํฌ์ ๋๋ค.
๐ฏ Why RFS Framework?
- ํ์ ์์ ์ฑ: Result ํจํด์ผ๋ก ์์ธ ์๋ ์๋ฌ ์ฒ๋ฆฌ
- ๋ฐ์ํ ์คํธ๋ฆผ: Mono/Flux ํจํด์ ๋น๋๊ธฐ ์ฒ๋ฆฌ
- ํด๋ผ์ฐ๋ ๋ค์ดํฐ๋ธ: Google Cloud Run ์ต์ ํ
- ํ๋ก๋์ ์ค๋น: ๋ชจ๋ํฐ๋ง, ๋ณด์, ๋ฐฐํฌ ์ ๋ต ๋ด์ฅ
โก Quick Start
Installation
# PyPI์์ ์ค์น (v4.6.5 - ์ต์ ์์ ๋ฒ์ )
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
ํต์ฌ ๋ฌธ์
- ํต์ฌ ๊ฐ๋ - Result ํจํด๊ณผ ํจ์ํ ํ๋ก๊ทธ๋๋ฐ
- API Reference - ์ ์ฒด API ๋ฌธ์
- ์ฌ์ฉ์ ๊ฐ์ด๋ - ๋จ๊ณ๋ณ ์ฌ์ฉ ์๋ด
์ฃผ์ ๋ณ ๊ฐ์ด๋
- ์ค์ ๊ด๋ฆฌ - ํ๊ฒฝ๋ณ ์ค์
- ๋ณด์ - ์ธ์ฆ, ์ธ๊ฐ, ๋ณด์ ๊ฐํ
- ๋ฐฐํฌ - ํ๋ก๋์ ๋ฐฐํฌ ์ ๋ต
- CLI ๋๊ตฌ - ๋ช ๋ นํ ์ธํฐํ์ด์ค
์ ์ฒด ๋ฌธ์
- ๐ Docs (ํ๊ตญ์ด) - 17๊ฐ ๋ชจ๋ ์์ธ ๋ฌธ์
- ๐ HOF Library - Higher-Order Functions
- ๋ง์ด๊ทธ๋ ์ด์ ๊ฐ์ด๋ - v3์์ v4๋ก ์ ๊ทธ๋ ์ด๋
๐ ๏ธ 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 ๋ชจ๋๋
- ํจ์ ํฉ์ฑ๊ณผ ์ปค๋ง
- ๋ถ๋ณ์ฑ๊ณผ ์์ ํจ์
- ์์ธ ๋ฌธ์ โ
โก ๋ฐ์ํ ์คํธ๋ฆผ
- ๋น๋๊ธฐ Mono/Flux ํจํด
- ๋ฐฑํ๋ ์ ์ง์
- 30+ ์ฐ์ฐ์
- ์์ธ ๋ฌธ์ โ
๐ ์ํฐํ๋ผ์ด์ฆ ๋ณด์
- RBAC/ABAC ์ ๊ทผ ์ ์ด
- JWT ์ธ์ฆ
- ์ทจ์ฝ์ ์ค์บ๋
- ์์ธ ๋ฌธ์ โ
๐ ํ๋ก๋์ ์ค๋น
- Blue-Green/Canary ๋ฐฐํฌ
- Circuit Breaker ํจํด
- ์ฑ๋ฅ ๋ชจ๋ํฐ๋ง
- ์์ธ ๋ฌธ์ โ
๐ Performance
| Metric | Value | Note |
|---|---|---|
| ์์ ์๊ฐ | ~50ms | CLI ์ด๊ธฐํ |
| ๋ฉ๋ชจ๋ฆฌ ์ฌ์ฉ | ~25MB | ๊ธฐ๋ณธ ์คํ |
| ์๋ต ์๊ฐ | <100ms | API ํธ์ถ |
| ์ฒ๋ฆฌ๋ | 1200 RPS | ๋ฒค์น๋งํฌ |
๐ง Status
- ์์ฑ๋: 93% (v4.3.0)
- ํ๋ก๋์ ์ค๋น: โ Ready
- ๋ฏธ์์ฑ ํญ๋ชฉ: 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
- ๋ฌธ์ ๋ณด๊ณ : GitHub Issues
- ํ ๋ก : Discussions
- ๋ฌธ์: Wiki
Made with โค๏ธ by the RFS Framework Team
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rfs_framework-4.6.6.tar.gz.
File metadata
- Download URL: rfs_framework-4.6.6.tar.gz
- Upload date:
- Size: 688.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b1ac41536df9e4be7b8625ebadb45cb9898c446aa875445a5feba0ada72019f0
|
|
| MD5 |
daf9c3d46496a20b98bd42aeadfd088a
|
|
| BLAKE2b-256 |
fcba61264fe296ccc5445dc6312bc97e0fdf2b2c651e461e44eee29b0e85f235
|
File details
Details for the file rfs_framework-4.6.6-py3-none-any.whl.
File metadata
- Download URL: rfs_framework-4.6.6-py3-none-any.whl
- Upload date:
- Size: 768.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5ddeabcfbbf36326e7ea343ba9f7fdc51043ecf99dc4f92eb2d3b5884083be3
|
|
| MD5 |
d54dccc3312613cb3ffa3287cd13e9be
|
|
| BLAKE2b-256 |
0ceec5b48fe188730e58075c9a198a890592ef2ecdf777e0cc7ef38c7f7d4a3e
|