AnswerDotAI / AnswerDotAI/fh-pyinstrument
Add app.add_instrument() feature to FastHTML
- 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