Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is MicroPython supported? #78

Closed
pfalcon opened this issue Dec 14, 2015 · 7 comments
Closed

Is MicroPython supported? #78

pfalcon opened this issue Dec 14, 2015 · 7 comments

Comments

@pfalcon
Copy link

pfalcon commented Dec 14, 2015

This line: https://github.com/msiemens/tinydb/blob/master/tinydb/storages.py#L13 made me wonder, is https://github.com/micropython/micropython supported anyhow? (ujson is micropython's builtin json module, which offers subset of functionality).

@msiemens
Copy link
Owner

The ujson I meant there is this one: https://github.com/esnme/ultrajson.

I think in principle TinyDB could run on MicroPython, but I assume that it would require a little bit of porting work as I'm currently using the re, os, contextlib, abc, os, warnings and sys Python modules.

@msiemens
Copy link
Owner

@pfalcon Is there any interest in having this ported to MicroPython?

@pfalcon
Copy link
Author

pfalcon commented Dec 23, 2015

Thanks for clarification! MicroPython comes with a subset of stdlib, https://github.com/micropython/micropython-lib , and some of the modules you list already there (but likely subset of functionality is implemented), while some, like abc, aren't yet there. I just started writing my own simple file-based ORM, https://github.com/pfalcon/filedb , but then decided to do a quick search to make sure I don't duplicate effort, and was surprised by that line in tinydb. Well, I guess at this stage it makes more sense to continue working on filedb, as it's intended to run in the most minimal environments, but I'll keep in mind tinydb if something more advanced will be required. So, let me close this.

@pfalcon pfalcon closed this as completed Dec 23, 2015
@gentleadam
Copy link

I'm searching around and started using TinyDB for another project. I think this would actually be useful in MicroPython. I'd be interested to see if you have the time to port this!

@msiemens
Copy link
Owner

Hey @milkshakespoon, currently I don't have time to maintain a port. I've looked into this a little and MicroPython is incompatible with the current TinyDB codebase in a few regards (metaclasses not supported, collections.Mapping doesn't recognize dicts). So basically the only way to make it work would be to create a fork. If anyone wants to create one and maintain such a fork, I'll gladly link to it in the extensions list, but I'm afraid I can't do more.

@gentleadam
Copy link

Hey @milkshakespoon, currently I don't have time to maintain a port. I've looked into this a little and MicroPython is incompatible with the current TinyDB codebase in a few regards (metaclasses not supported, collections.Mapping doesn't recognize dicts). So basically the only way to make it work would be to create a fork. If anyone wants to create one and maintain such a fork, I'll gladly link to it in the extensions list, but I'm afraid I can't do more.

Thanks for the response. Be awesome if someone does that! Unfortunately my coding skills are no where near good enough to create something like this.

@ahmadmicro
Copy link

I started a micropython port here: https://github.com/ahmadmicro/tinydb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants