Skip to content

psincraian/myfy

Repository files navigation

myfy logo

myfy

PyPI Downloads

Build Python applications with FastAPI's ergonomics and enterprise-grade architecture.

A modern Python framework combining type-safe dependency injection, modular architecture, and sensible defaults—all in a lightweight, async-first design.


Quick Start

Installation

# Install with uv (recommended)
uv pip install myfy-core myfy-web myfy-frontend myfy-cli

# Or with pip
pip install myfy-core myfy-web myfy-frontend myfy-cli

Hello World

# app.py
from myfy.core import Application
from myfy.web import route, WebModule
from myfy.frontend import FrontendModule

@route.get("/api/hello/{name}")
async def hello(name: str) -> dict:
    return {"message": f"Hello {name}!"}

app = Application(auto_discover=False)
app.add_module(WebModule())
app.add_module(FrontendModule())

Run it:

uv run myfy run
# API: http://127.0.0.1:8000/api/hello/World
# Frontend: http://127.0.0.1:8000

Key Features

  • Type-Safe Dependency Injection - Constructor injection with compile-time validation
  • Modular Architecture - Composable modules with lifecycle management
  • FastAPI-Style Routes - Decorators, type hints, and async/await
  • Zero Config - Sensible defaults, configure only what you need
  • Profile-Based Settings - Environment-aware configuration (dev/test/prod)

Documentation

📖 Full Documentation at myfy.dev →


Learn More

  • Examples - Working applications in this repo
  • PRINCIPLES.md - Design philosophy and architecture decisions

License

MIT

About

No description, website, or topics provided.

Resources

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors 4

  •  
  •  
  •  
  •