Skip to content

How to pass a binary file data to python #2164

Closed Answered by WebReflection
bestneymarjr asked this question in Q&A
Discussion options

You must be logged in to vote

If you are able to extract the DB as Uint8Array you can create a Blob then a URL that will serve that blob and you can fetch it via pyscript fetch as array_buffer() which will give you a memoryview of that data ... you can then pass it to sqlite (if that's available in pyodide) as db to use and the rest is regular SQL.

That being said, it's not clear what is your current stack so any extra detail might help.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@bestneymarjr
Comment options

@bestneymarjr
Comment options

Answer selected by WebReflection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants