🚉 VPEng @ Sequel Institute
🤓 Startup advisor
✒️ Writing about MCP
🐍 Python
☁️ AWS
🧙♂️ Elixir
🐷Ham radio
🇺🇸↔🇬🇷 [Boston // Athens]
Mostly tech things here
BUT! This is terrible and largely unnecessary, if fun (for certain definitions of fun). If you're going to use regular expressions, set up your dict so that the keys are extractable, unique pieces of your string (in the example, "customers") and extract that from your input string for the lookup:
BUT! This is terrible and largely unnecessary, if fun (for certain definitions of fun). If you're going to use regular expressions, set up your dict so that the keys are extractable, unique pieces of your string (in the example, "customers") and extract that from your input string for the lookup:
In this snippet, we set up a dict that points to Model objects using keys that are valid regular expressions representing dynamic table names. To get the right model, you use dict.items() and check each key for a match. You can build a list or just take the first match.
In this snippet, we set up a dict that points to Model objects using keys that are valid regular expressions representing dynamic table names. To get the right model, you use dict.items() and check each key for a match. You can build a list or just take the first match.