Skip to main content

Enterprise-Grade Reactive Functional Serverless Framework for Python

Project description

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

ํ•ต์‹ฌ ๋ฌธ์„œ

์ฃผ์ œ๋ณ„ ๊ฐ€์ด๋“œ

์ „์ฒด ๋ฌธ์„œ

๐Ÿ› ๏ธ 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 ๋ชจ๋‚˜๋“œ
  • ํ•จ์ˆ˜ ํ•ฉ์„ฑ๊ณผ ์ปค๋ง
  • ๋ถˆ๋ณ€์„ฑ๊ณผ ์ˆœ์ˆ˜ ํ•จ์ˆ˜
  • ์ƒ์„ธ ๋ฌธ์„œ โ†’

โšก ๋ฐ˜์‘ํ˜• ์ŠคํŠธ๋ฆผ

๐Ÿ”’ ์—”ํ„ฐํ”„๋ผ์ด์ฆˆ ๋ณด์•ˆ

๐Ÿš€ ํ”„๋กœ๋•์…˜ ์ค€๋น„

๐Ÿ“Š 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


Made with โค๏ธ by the RFS Framework Team

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rfs_framework-4.6.6.tar.gz (688.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rfs_framework-4.6.6-py3-none-any.whl (768.3 kB view details)

Uploaded Python 3

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

Hashes for rfs_framework-4.6.6.tar.gz
Algorithm Hash digest
SHA256 b1ac41536df9e4be7b8625ebadb45cb9898c446aa875445a5feba0ada72019f0
MD5 daf9c3d46496a20b98bd42aeadfd088a
BLAKE2b-256 fcba61264fe296ccc5445dc6312bc97e0fdf2b2c651e461e44eee29b0e85f235

See more details on using hashes here.

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

Hashes for rfs_framework-4.6.6-py3-none-any.whl
Algorithm Hash digest
SHA256 c5ddeabcfbbf36326e7ea343ba9f7fdc51043ecf99dc4f92eb2d3b5884083be3
MD5 d54dccc3312613cb3ffa3287cd13e9be
BLAKE2b-256 0ceec5b48fe188730e58075c9a198a890592ef2ecdf777e0cc7ef38c7f7d4a3e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page