sunhailin-Leo / fastapi_profiler

A FastAPI Middleware of https://github.com/joerick/pyinstrument to check your service performance.
MIT License
231 stars 13 forks source link

import lib error in example #14

Closed betta-cyber closed 1 year ago

betta-cyber commented 1 year ago

In examples, the code use from fastapi_profiler import PyInstrumentProfilerMiddleware to import lib, it might be wrong.

Python 3.6.9 (default, Mar 10 2023, 16:46:00) 
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from fastapi_profiler import PyInstrumentProfilerMiddleware
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'PyInstrumentProfilerMiddleware'

It should be:

>>> from fastapi_profiler.profiler_middleware import PyInstrumentProfilerMiddleware
sunhailin-Leo commented 1 year ago

@betta-cyber