snick
Handy gadgets for taming indented text
A small collection of practical utilities for working with indented strings and text formatting:
- Dedent triple-quoted strings without giving up indented code
- Build multi-line output line by line with
Conjoiner - Format data structures like
pprint, but withjson.dumps-style indentation and trailing commas - Strip ANSI codes and stray whitespace from terminal output
- Wrap and indent text blocks for logs and reports
Built on the Python standard library — nothing extra to install.
Quickstart
Requirements
- Python 3.10 or greater
Installation
Install the latest release from PyPI:
pip install snick
Quick taste
import snick
message = snick.dedent(
"""
The Force will be with you.
Always.
"""
)
print(message)
Running this gives:
The Force will be with you.
Always.
To learn about all the features, see the documentation.
Try the demo
The fastest way to see snick in action is to run the interactive demo. No install required:
uvx --from=snick[demo] snick-demo
The demo walks through every feature, one function at a time. Each step shows the source code and its output, then asks whether to continue.
Metadata
Release files for snick 3.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| snick-3.2.0.tar.gz | 12.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| snick-3.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.3 kB
Release files / snick-3.2.0.tar.gz
| Download URL | snick-3.2.0.tar.gz |
|---|---|
| Size | 12.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a8711b42a08449ca1ac408f68d6dd536a2d6fbc207ddb31e31802bb19bf6a039
|
|
BLAKE2b-256 checksum How to use checksums |
b93f1f541a1759c6e9dfb804a095c92a6b424a8db1f3aa8158185bf78a707900
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / snick-3.2.0-py3-none-any.whl
| Download URL | snick-3.2.0-py3-none-any.whl |
|---|---|
| Size | 17.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fcfd29647c7ed4ed70a14f5b08f5eb667329cb03ba00d97d9ba5716572924e1b
|
|
BLAKE2b-256 checksum How to use checksums |
2745517235b9479e666265ac94851a78d6d197b3ca6b77861966de565c0a0bf1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|