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 @@ -20,6 +20,7 @@
"that-depends": lambda: sym.graph(_CX, _CY, R, dashed=False),
"modern-di-fastapi": lambda: sym.bolt_disc(_CX, _CY, R),
"modern-di-litestar": lambda: sym.star_disc(_CX, _CY, R),
"modern-di-starlette": lambda: sym.sparkle_cluster(_CX, _CY, R),
"modern-di-faststream": lambda: sym.faststream(_CX, _CY, R),
"modern-di-typer": lambda: sym.terminal(_CX, _CY, R),
"modern-di-pytest": lambda: sym.bars(_CX, _CY, R),
Expand Down
30 changes: 30 additions & 0 deletions brand/build/symbols.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,36 @@ def _star5(cx: float, cy: float, radius: float, color: str, inner: float = 0.42)
return f'<polygon points="{body}" fill="{color}"/>'


def _sparkle4(cx: float, cy: float, radius: float, color: str, inner: float = 0.34) -> str:
"""Four-point sparkle (concave star) centred on (cx,cy)."""
pts: list[tuple[float, float]] = []
for i in range(4):
ao = -90 + i * 90
pts.append(
(
cx + radius * math.cos(math.radians(ao)),
cy + radius * math.sin(math.radians(ao)),
)
)
ai = ao + 45
pts.append(
(
cx + radius * inner * math.cos(math.radians(ai)),
cy + radius * inner * math.sin(math.radians(ai)),
)
)
body = " ".join(f"{x:.1f},{y:.1f}" for x, y in pts)
return f'<polygon points="{body}" fill="{color}"/>'


def sparkle_cluster(cx: float, cy: float, r: float) -> str:
"""Starlette cue: a large four-point sparkle with a small companion
(a "little star" — starlette)."""
big = _sparkle4(cx - 0.174 * r, cy + 0.130 * r, r * 0.82, GOLD)
small = _sparkle4(cx + 0.565 * r, cy - 0.522 * r, r * 0.36, GOLD)
return big + small


def _circ_arc(cx: float, cy: float, rad: float, a0: float, a1: float, w: float) -> str:
"""Clockwise arc a0->a1 (deg, increasing) with a leading arrowhead at a1."""
a1s = a1 - 7 # stop the stroke short so the head caps it cleanly
Expand Down
1 change: 1 addition & 0 deletions brand/projects/modern-di-starlette/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-starlette/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-starlette/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-starlette/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-starlette/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-starlette/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 @@ -67,7 +67,7 @@ production Python services. Use one piece or all of them — each is independent
- **Wire your dependencies** with
[`modern-di`](https://github.com/modern-python/modern-di) — typed, scoped
dependency injection with one wiring shared across FastAPI, Litestar,
FastStream, and Typer.
Starlette, FastStream, and Typer.
([`that-depends`](https://github.com/modern-python/that-depends), its
production-proven predecessor, is still maintained.)
- **Call other services reliably** with
Expand Down Expand Up @@ -98,6 +98,7 @@ catalog below.
- [`modern-di`](https://github.com/modern-python/modern-di) — powerful DI framework with scopes.
- [`modern-di-fastapi`](https://github.com/modern-python/modern-di-fastapi) — `modern-di` integration for FastAPI.
- [`modern-di-litestar`](https://github.com/modern-python/modern-di-litestar) — `modern-di` integration for Litestar.
- [`modern-di-starlette`](https://github.com/modern-python/modern-di-starlette) — `modern-di` integration for Starlette.
- [`modern-di-faststream`](https://github.com/modern-python/modern-di-faststream) — `modern-di` integration for FastStream.
- [`modern-di-typer`](https://github.com/modern-python/modern-di-typer) — `modern-di` integration for Typer.
- [`modern-di-pytest`](https://github.com/modern-python/modern-di-pytest) — `modern-di` integration for pytest.
Expand Down
Loading