AnswerDotAI / AnswerDotAI/fh-pyinstrument

Add app.add_instrument() feature to FastHTML

Open
#5 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
4
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Per @jph00 would be nice for a built-in FastHTML control that does this and requires behavioural change of library:

```python
app = fast_app()
app.add_instrument() # Adds Profile middleware to app, or raises import error if fh-pyinstrument not installed

@rt
@instrument # Only works if app.add_instrument called
def index(): return Titled('Hello')
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the existing FastHTML app setup and decorator entry points to determine where app.add_instrument() and @instrument would integrate. Confirm the intended behavior: add Profile middleware, raise an import error when fh-pyinstrument is unavailable, and only enable @instrument after the app method is called.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.