cd /news/machine-learning/datalens-the-data-tool-that-refused-… Β· home β€Ί topics β€Ί machine-learning β€Ί article
[ARTICLE Β· art-122912] src=dev.to β†— pub= topic=machine-learning verified=true sentiment=Β· neutral

DataLens: The Data Tool That Refused to pip install Anything

A developer and teammate built DataLens, a data tool with a zero-dependency constraint, by implementing an autoencoder's neural network using only Python 3.14's standard library. They hand-rolled matrix multiplication, activation functions, and backpropagation, and used the array module for performance and sqlite3 for SQL analytics, discovering capabilities not highlighted in the docs.

read4 min views2 publishedSep 8, 2026

Somewhere in the DataLens build, my teammate and I hit the wall every "zero-dependency" project eventually hits: the anomaly detector needed a neural net, and the rulebook said no third-party packages. No NumPy. No pandas. No scikit-learn. Just Python 3.14's standard library.

Our first reaction was denial. You cannot build an ANN without a matrix library β€” everyone knows that. numpy.dot() is basically load-bearing infrastructure for machine learning in Python. We spent an embarrassing amount of time trying to convince ourselves some obscure math submodule secretly did vectorized linear algebra. It doesn't. There is no shortcut. If you want matrix multiplication in pure stdlib Python, you write nested for loops and you like it.

What we normally would have installed

In any other project, this is a two-second decision: pip install numpy, import it, move on with your life. Matrix ops, broadcasting, vectorized activation functions β€” all free. Neither of us had ever really had to think about how A @ B works under the hood, because neither of us had ever had to write it ourselves.

What it actually took to replace it

An autoencoder needs: matrix multiplication, transpose, element-wise activation functions (sigmoid, ReLU), and gradient computation for backprop. Without NumPy, every one of those is a hand-rolled function operating on nested Python lists. Matrix multiply becomes three nested loops instead of one line. A forward pass that would be a single .dot() call turns into a small file of helper functions: matmul(), transpose(), add_bias(), sigmoid(), sigmoid_derivative(). We split it β€” one of us built the forward pass and activation functions, the other took backprop and the training loop β€” and then spent a good while debugging the seam where the two met.

The genuinely hard part wasn't the math β€” it was performance. Pure Python loops over lists of lists are slow, and profiling a dataset with a few thousand rows through even a small autoencoder made that obvious fast. We ended up leaning hard on Python's array module instead of plain lists for the weight matrices, which cuts memory overhead and makes numeric access noticeably faster since array stores a single primitive type contiguously instead of boxing every float as a Python object. It's the closest thing the standard library has to a "no dependency" NumPy array, and neither of us knew it existed until this project forced us to find it.

The stdlib corner nobody told us about

The other surprise was sqlite3. We'd always thought of it as "the toy database module," something you use for a quick local cache, not real analytics. Turns out it's a fully capable SQL engine sitting in the standard library, in-memory mode and all β€” sqlite3.connect(":memory:") gives you a real query engine with joins, aggregates, and indexes, with zero setup. We ended up building DataLens's entire SQL analytics layer on top of it instead of hand-rolling a query parser, which honestly felt like cheating in the best way.

The thing that turned out harder than the docs made it look

The docs for array make it sound like a drop-in replacement for lists with a type constraint. What they don't emphasize is that array only holds primitive numeric types β€” no nested structures β€” so representing a 2D matrix means either flattening to 1D and doing manual index math (row * width + col) everywhere, or nesting arrays inside a list and losing some of the contiguous-memory benefit you wanted in the first place. We went with flattening, and every single matrix operation had to be rewritten around that indexing scheme. It works, and it's fast, but it made debugging genuinely painful β€” a transpose bug three layers into backprop just looks like "the model isn't learning," not "your index math is wrong," and it took the two of us comparing notes line by line to actually find it.

Why bother

The constraint felt arbitrary at first β€” obviously NumPy would make all of this trivial and safe. But writing the matrix ops by hand meant we actually understood, for the first time, what a forward pass and backward pass are doing numerically, instead of trusting a black box. And the deployment story is real: DataLens compiles down to one portable .py file that runs on any machine with Python 3.14, no pip install, no dependency resolution, no supply-chain risk. For a data quality tool meant to run in locked-down or air-gapped environments, that's not a nice-to-have β€” it's the whole point.

Turns out "zero dependency" isn't a limitation you work around. It's a forcing function that makes you actually learn the thing you'd normally outsource β€” and a decent excuse to argue with your teammate about whose indexing bug it was.

**Repo:** [github.com/Akshith1413/DataLens](https://github.com/Akshith1413/DataLens)

If you've ever hand-rolled something you normally `pip install`, drop it in the comments β€” curious what stdlib corners other people have found.
── more in #machine-learning 4 stories Β· sorted by recency
astledsa.substack.com Β· Β· #machine-learning
DSL Mania
── more on @datalens 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/datalens-the-data-to…] indexed:0 read:4min 2026-09-08 Β· β€”