Skip to content

Commit 57b1cb2

Browse files
committed
Revise dense-python post
1 parent 259c7cf commit 57b1cb2

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
type: post
3+
title: Introducing dense-python
4+
author: Andrew Wray
5+
subtitle: A convenient template for new Python projects
6+
date: 2025-07-01
7+
summary: The dense-python repository provides a reusable template for starting Python projects quickly.
8+
tags: ["python", "template"]
9+
---
10+
11+
Dense Analysis has released **dense-python**, a template repository designed to help developers spin up new Python projects with minimal setup. The repository collects a set of best practices used across Dense Analysis projects and packages them into a starting point you can clone and modify.
12+
13+
Available on [GitHub](https://github.com/dense-analysis/dense-python), the template comes preconfigured with modern tooling for formatting, linting, static type checks, and continuous integration. By cloning the repository and customizing it for your work, you can skip much of the boilerplate configuration typically required when starting from scratch.
14+
15+
### Distroless Python containers
16+
17+
For containerized deployments, dense-python includes a reproducible build pipeline that produces distroless images. Distroless containers ship only the Python runtime and your project code, resulting in smaller and more secure images than traditional distributions. The provided `Dockerfile` demonstrates how to compile wheels with the `uv` build tool and copy them into the final distroless image. Read more about the advantages in [this article on distroless Python images](https://pythonspeed.com/articles/distroless-python/).
18+
19+
### Testing with network isolation
20+
21+
The template configures **pytest** so that tests run with socket access disabled by default. This makes it easy to catch accidental network calls in unit tests. Strict marker checking is also enabled, ensuring that every custom marker is declared in your configuration. Together, these settings help keep tests fast and deterministic.
22+
23+
### Pyright type checking
24+
25+
Static type checking is handled by [**Pyright**](https://github.com/microsoft/pyright), the engine behind Pylance in VS Code and also used by Cursor. It offers quick feedback on type annotations without slowing down development. A ready-to-use `pyrightconfig.json` is included so that type errors are caught early.
26+
27+
### Package builds with uv
28+
29+
Instead of `pip`, dense-python relies on the lightning-fast `uv` tool to create virtual environments and build distribution packages. This speeds up the packaging process and ensures consistent builds across platforms.
30+
31+
### Open for contributions
32+
33+
Dense-python is open source and welcomes contributions. If you find a useful improvement or fix, open a pull request or start a discussion on the project page. We hope this template saves you time on setup so you can focus on writing code.

0 commit comments

Comments
 (0)