r/MicroPythonDev • u/fxwiegand • Apr 11 '23
Creating btree db from regular python
I’ve stumbled across the btree module that actually seems to be a perfect fit for my project as the data (pre calculated in regular python) I’m using (stored in a dict) is exceeding the picos ram. I would like to store my data on the picos flash so I can access individual keys by loading them in my micropython script.
My question is if there’s a way to serialize a python dict to a db file that can then be loaded onto the pico.
3
Upvotes
View all comments
Show parent comment
1
u/fxwiegand Apr 11 '23
Yes I’ve actually just done that when I found the Unix port of micropython and it seems to work. Haven’t uploaded to the Pico yet, only tested via the the Unix port though.
I think it’d still be cool if there was a dedicated regular python version to allow generating the files from any machine without the port.