Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions brand/build/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"modern-di-arq": lambda: sym.hopper(_CX, _CY, R),
"modern-di-celery": lambda: sym.celery_stalk(_CX, _CY, R),
"modern-di-fastapi": lambda: sym.bolt_disc(_CX, _CY, R),
"modern-di-fastmcp": lambda: sym.plug(_CX, _CY, R),
"modern-di-faststream": lambda: sym.faststream(_CX, _CY, R),
"modern-di-flask": lambda: sym.flask_horn(_CX, _CY, R),
"modern-di-grpc": lambda: sym.rpc_arrow(_CX, _CY, R),
Expand Down
26 changes: 26 additions & 0 deletions brand/build/symbols.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,32 @@ def rpc_arrow(cx: float, cy: float, r: float) -> str:
return out


def plug(cx: float, cy: float, r: float) -> str:
"""FastMCP cue: a plug, MCP being the port tools plug into, with a bolt knocked out."""
bw, bh = 1.3 * r, 1.0 * r
top = cy - 0.6 * r
prong_w, prong_h = 0.21 * r, 0.45 * r
prongs = "".join(
f'<rect x="{cx + dx * r - prong_w / 2:.1f}" y="{top - prong_h:.1f}" '
f'width="{prong_w:.1f}" height="{prong_h + 0.1 * r:.1f}" rx="{prong_w * 0.3:.1f}" fill="{GOLD}"/>'
for dx in (-0.3, 0.3)
)
body = (
f'<rect x="{cx - bw / 2:.1f}" y="{top:.1f}" width="{bw:.1f}" height="{bh:.1f}" '
f'rx="{0.22 * r:.1f}" fill="{GOLD}"/>'
)
cord = (
f'<path d="M{cx:.1f},{top + bh - 0.05 * r:.1f} '
f"C{cx:.1f},{cy + 0.85 * r:.1f} {cx + 0.5 * r:.1f},{cy + 0.7 * r:.1f} "
f'{cx + 0.75 * r:.1f},{cy + 0.95 * r:.1f}" fill="none" stroke="{GOLD}" '
f'stroke-width="{0.24 * r:.1f}" stroke-linecap="round"/>'
)
bcy = top + bh / 2
norm = [(0.12, -0.38), (-0.24, 0.07), (0.0, 0.07), (-0.12, 0.38), (0.24, -0.07), (0.0, -0.07)]
bolt = " ".join(f"{cx + dx * r:.1f},{bcy + dy * r:.1f}" for dx, dy in norm)
return prongs + body + cord + f'<polygon points="{bolt}" fill="{CREAM}"/>'


def key(cx: float, cy: float, r: float) -> str:
"""jwks-client: a key, the signing key a JWKS publishes."""
sw = r * 0.2
Expand Down
1 change: 1 addition & 0 deletions brand/projects/modern-di-fastmcp/lockup-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions brand/projects/modern-di-fastmcp/lockup-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added brand/projects/modern-di-fastmcp/lockup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added brand/projects/modern-di-fastmcp/mark-1024.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added brand/projects/modern-di-fastmcp/mark-512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions brand/projects/modern-di-fastmcp/mark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ production Python services. Each project is independent, so use one piece or all
[`modern-di`](https://github.com/modern-python/modern-di): typed, scoped
dependency injection with one wiring shared across web frameworks (FastAPI,
Litestar, Starlette, Flask, aiohttp), task queues (Celery, arq, taskiq), RPC
and messaging (gRPC, FastStream, aiogram), and CLIs (Typer).
and messaging (gRPC, FastStream, aiogram), MCP servers (FastMCP), and CLIs
(Typer).
([`that-depends`](https://github.com/modern-python/that-depends), the older
DI framework, is still maintained.)
- Call other services reliably with
Expand Down
1 change: 1 addition & 0 deletions tests/test_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def test_project_frame_parses_and_uses_tokens() -> None:
"modern-di-taskiq",
"modern-di-flask",
"modern-di-grpc",
"modern-di-fastmcp",
"jwks-client",
"release-scope",
}
Expand Down
Loading