Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove FastAPI in favor of Starlette #280

Closed
mvanderlee opened this issue Jan 8, 2024 · 3 comments · Fixed by #288
Closed

Remove FastAPI in favor of Starlette #280

mvanderlee opened this issue Jan 8, 2024 · 3 comments · Fixed by #288

Comments

@mvanderlee
Copy link
Contributor

This project imports FastAPI simply to provide type hints. Moreover the middleware's function isn't limited to FastAPI and works fine with any Starlette implementation.

It'd be great if all code references to FastAPI could be replaced with Starlette.

@chbndrhnns
Copy link
Contributor

When I was looking for an instrumentation for starlette, I knew about this package and now I am also wondering if I can just throw a Starlette app at it. I'll give it a try!

@mvanderlee
Copy link
Contributor Author

@chbndrhnns atm, I've been using my branch https://github.com/mvanderlee/prometheus-starlette-instrumentator/tree/no-fastapi

requirements.txt

git+https://github.com/mvanderlee/prometheus-starlette-instrumentator.git@da344ce83c5c40b70fd7f0b2fb33905d9498ee3c

setup.py

setup(
    install_requires=[
        'prometheus-fastapi-instrumentator @ git+https://github.com/mvanderlee/prometheus-starlette-instrumentator.git@da344ce83c5c40b70fd7f0b2fb33905d9498ee3c',
    ],
)

@chbndrhnns
Copy link
Contributor

We have FastAPI installed anyway for another use case so it seems I am good to way with this version here, as well. Thanks for the link, though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants