3 ms·
Thanks for sharing, me and @simonw seem to be bumping into each other regularly :) I've been meaning to give Datasette a try and plug it into my system! Even
by karlicoss 6y ago
Thanks for sharing, me and @simonw seem to be bumping into each other regularly :)
I've been meaning to give Datasette a try and plug it into my system!
Even though I prefer to rely on code as the main interface, in most cases I already have sqlite for free, because it's used as a cache [0]. If a function is marked with @cachew decorator, its results would be cached on the disk, invalidated on arguments changes, etc.
[0] https://github.com/karlicoss/cachew#what-is-cachew https://github.com/karlicoss/cachew#what-is-cachew
- karlicoss 6y agoP.S. just gave it a go! pipx install datasette && datasette install datasette-cluster-map ## warm up HPI (to invalidate and dump a newer sqlite cache file) python3 -c 'import my.photos as P; P.print_all()' ## run Datasette datasette /path/to/cache/photos.sqlite tada! https://imgur.com/a/N25Zirs https://imgur.com/a/N25Zirs very nice :) Only had to adjust the query in the last step to conform to the naming (i.e. `select _cachew_union_repr_Photo_geo_lat as latitude, _cachew_union_repr_Photo_geo_lon as longitude`)
- simonw 6y agoThat's really cool!