# csvoss/onelinerizer

Shamelessly convert any Python 2 script into a terrible single line of code

Repository: https://github.com/csvoss/onelinerizer
Canonical: https://ross.abutalabs.com/products/onelinerizer
Homepage: http://www.onelinerizer.com/
Language: Python
License: MIT
License Family: permissive
Last push: 2025-05-18T19:54:54+00:00

## Health v2 (maintenance only)
Score: 33/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 22, release rhythm 8, longevity 100
- inputs: {"age_days": 4247, "days_push": 472, "days_rel": 473, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1523, forks 111 (observed 2026-08-28T04:04:58.104277+00:00)

## What it is
Oneliner-izer is a Python tool that converts any Python 2 script into a single line of code using lambda expressions, list comprehensions, and other tricks, without newlines, semicolons, or eval/exec. It is available as a pip-installable CLI and Python module, with a live web demo.

## Use cases
- convert a python script into one line
- turn python code into a single line for code golf
- onelinerize a python 2 file
- compress python code into one line without semicolons
- learn how to write python one-liners with lambdas
- transform multi-line python programs into lambda expressions

## When to choose
- you want to convert Python 2 scripts into a single line for fun, code golf, or constrained coding exercises
- you want a pip-installable CLI or importable module for one-lining Python code
- you want to study lambda-based tricks for emulating statements, loops, and functions

## When to avoid
- you need production-quality code transformation or refactoring of Python 3 code
- you need readable, maintainable output
- you need a general-purpose Python minifier or obfuscator with performance goals

## Facets
- artifact type: cli-tool
- maturity: maintenance
- function: parser, compiler, developer-tools, cli
- domain: developer-tools, programming-languages, parsers
- platform: python, cli, cross-platform
- tags: code-golf, python-2, code-transformation, novelty, lambda-calculus, command-line

## Member repositories
- csvoss/onelinerizer (main) score 33

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:58.104277+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:31:44.421124+00:00, confidence not recorded.
  - readme: https://github.com/csvoss/onelinerizer (fetched 2026-08-28T04:04:58.104277+00:00, sha 510831b86900)
  - registry_pypi: https://pypi.org/pypi/onelinerizer/json (fetched 2026-08-29T11:34:35.626327+00:00, sha 0af76f6e3b9d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
