From a8c6d1eb8bc1f8d6633ed56ce91170cd9d212134 Mon Sep 17 00:00:00 2001 From: Gabor Szarnyas Date: Wed, 2 Oct 2024 14:59:54 +0200 Subject: [PATCH] formatting --- _posts/2024-10-04-pyodide.md | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/_posts/2024-10-04-pyodide.md b/_posts/2024-10-04-pyodide.md index 950e732135..941ac94aa5 100644 --- a/_posts/2024-10-04-pyodide.md +++ b/_posts/2024-10-04-pyodide.md @@ -6,15 +6,15 @@ thumb: "/images/blog/thumbs/241004.svg" excerpt: "Run DuckDB in an in-browser Python environment to enable simple querying on remote files, interactive documentation, and easy to use training materials." --- -## Time to "Hello World" +## Time to “Hello World” -The first time that you are using a new library, the most important thing is how quickly you can get to "Hello World". +The first time that you are using a new library, the most important thing is how quickly you can get to “Hello World”. -> Note Want to see "Hello World"? +> Note Want to see “Hello World”? > [Jump to the examples!]({% post_url 2024-10-04-pyodide %}#pyscript-editor) Likewise, if someone is visiting any documentation you have written, you want them to quickly and easily get your tool up and running. -If you want to try "expert mode", try leading an entire conference room of people through those setup steps! +If you want to try “expert mode”, try leading an entire conference room of people through those setup steps! The classroom or conference workshop environment makes it far more critical that installation be bulletproof. Python is one of our favorite ways to use DuckDB, but Python is notoriously difficult to set up – doubly so for a novice programmer. @@ -72,7 +72,6 @@ There is no need to work 1:1 with the 15% of folks in the audience with some qui Everyone will get this to work on the first try, in seconds, so you can get to the content you want to teach. Plus, it is free, with no signup required of any kind! - ## Pyodide Examples We will cover multiple ways to embed Pyodide-powered-Python directly into your site, so your users can try out your new DuckDB-backed tool with a single click! @@ -166,21 +165,21 @@ The Pyodide team has added DuckDB to their hosted repository of libraries, and e That is what enables JupyterLite to simply run `%pip install duckdb`, and PyScript to specify DuckDB as a package in the `py-editor config` parameter or in the `` tag. Pyodide then downloads the Wasm-compiled version of the DuckDB library from Pyodide's repository. We want to send a big thank you to the Pyodide team, including [Hood Chatham](https://github.com/hoodmane) and [Gyeongjae Choi](https://github.com/ryanking13), as well as the Voltron Data team including [Phillip Cloud](https://github.com/cpcloud) for leading the effort to get this to work. -Thanks to [Carlo](https://github.com/carlopi) here at DuckDB Labs as well! +Thanks to [Carlo](https://github.com/carlopi) at DuckDB Labs as well! ### Limitations Running in the browser is a more restrictive environment (for security purposes), so there are some limitations when using DuckDB in Pyodide. There is no free lunch! -* Single threaded +* Single-threaded * Wasm does not have the concept of threads, yet! * A few extra steps to query remote files * Remote files can't be accessed by DuckDB directly * Instead, pull the files locally with Pyodide first - * DuckDB Wasm has custom enhancements to make this possible, but these are not present in DuckDB's Python client + * DuckDB-Wasm has custom enhancements to make this possible, but these are not present in DuckDB's Python client * No runtime-loaded extensions - * Several extensions are automatically included like parquet, icu, and json + * Several extensions are automatically included like `parquet`, `icu`, and `json` ## Conclusion @@ -190,7 +189,7 @@ It is also an approach that scales to an arbitrary number of users because Pyodi We have seen how to embed Pyodide in a static site in multiple ways, as well as how to read remote files. If you are excited about DuckDB in Pyodide, feel free to join us on Discord. -We have a show-and-tell section where you can share what you build with the community. +We have a `#show-and-tell` channel where you can share what you build with the community. We would also really love some help with enabling runtime-loaded extensions – please reach out if you can help! Happy quacking about!