Python trie implementation - efficiently search trie based on prefixes

@adhamfaisal

Okay, I found a nice implementation of trie that works directly in an Anvil app.

As you can see here, on your very large list, the autocompletion works instantly, returning a list of a prefix matches in the trie.

I have your words stored in a module, but this causes the app to load very slowly. You will want to put the words somewhere else (perhaps in a DataTable with a “please wait” Notification for your users during the initial load).

clone:
https://anvil.works/build#clone:A7T6NRQIS5RDKXGK=3T6LAP6WSNC7CLKBSBL5AK4O

Does this work for you?

1 Like