Skip to content

Interested in using this with FastAPI #3

@mattduffield

Description

@mattduffield

Hello, I have been trying to use importlib.reload as a way to dynamically reload modules but for some reason, this only works the first time. I have a FastAPI server where I am loading models, forms, and views via a database. Everything starts up just fine and I can makes changes to the database and then call an endpoint that wraps a call to importlib.reload(...). However, this only works the first time but any subsequent change I make, I don't see it on my web site. I have been able to get intermittent success by calling the endpoint multiple times and refreshing my browser, but I am really looking for a smoother workflow.

I am curious if your library would work for my scenario? I am not sure why it works the first time and doesn't show any changes until I restart the server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions