npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@remywang/snip

v0.4.1

Published

Runnable Python and SQL code snippets in the browser, via MicroPython and SQLite compiled to WebAssembly

Readme

Runnable Python and SQL code snippets, using WASM builds of MicroPython (~550 KB) and SQLite (~1.4 MB). Load the widget script once per page:

<script type="module" src="https://unpkg.com/@remywang/snip@0/snip.js"></script>

Write a code block, then place a snippet widget after it:

<pre>
print("Hello, World!")</pre>
<run-snip lang="python"></run-snip>

<pre>
SELECT 1 + 1;</pre>
<run-snip lang="sql"></run-snip>

Hidden template code can be specified with setup (prepended) and teardown (appended):

<script id="fruits.sql" type="text/plain">
CREATE TABLE fruits(name, qty);
INSERT INTO fruits VALUES ('apple', 3), ('pear', 5), ('plum', 2);
</script>

<pre>
SELECT name, qty FROM fruits ORDER BY qty DESC;</pre>
<run-snip lang="sql" setup="fruits.sql"></run-snip>

Snippets that share a session tag form a notebook. Running one concatenates every snippet up to it (in document order) and runs the whole thing from scratch — so cells build on each other, without the stale-state surprises of a persistent interpreter:

<pre>
x = 21</pre>
<run-snip lang="python" session="1"></run-snip>

<pre>
print(x * 2)</pre>
<run-snip lang="python" session="1"></run-snip>

setup and session compose: put setup on a session's first cell and its template becomes the session's shared setup, invisibly prepended whichever cell in the session actually runs:

<script id="math-setup.py" type="text/plain">
import math
</script>

<pre>
r = 2</pre>
<run-snip lang="python" session="2" setup="math-setup.py"></run-snip>

<pre>
math.pi * r ** 2</pre>
<run-snip lang="python" session="2"></run-snip>

A hide-run cell stays visible and editable, but drops its own run button — for a session cell that's only ever meant to run as part of a later one:

<pre>
nums = [3, 1, 4, 1, 5]</pre>
<run-snip lang="python" session="3" hide-run></run-snip>

<pre>
print(sorted(nums))</pre>
<run-snip lang="python" session="3"></run-snip>