Skip to main content

EmDashify — Em Dashes Made Easy

PyPI Python Tests License

The Python library you think you'll never need—until you use it more than the ones you do.

Why?

ChatGPT, Claude, and other large language models often use the em dash (—) when answering users. It's become especially noticeable in AI-generated responses: Pew Research Center found that em dashes appeared about twice as often in the English-language web text it studied as in 2023. Of course, the em dash predates AI—it's ordinary punctuation, not proof that a text was AI-written.

Yet most QWERTY keyboards have a - key, not a dedicated — key. EmDashify lets you type -- and turn it into a proper em dash in text, Markdown, or Word documents. No AI needed. Just punctuation.

Quick start

pip install emdashify
emdashify "Hello -- world"
# Hello—world
from emdashify import convert

convert("Hello -- world")                  # 'Hello—world'
convert("hello--world")                    # 'hello—world'
convert("Hello -- world", compact=False)   # 'Hello — world'

Word documents (.docx)

Convert an entire Word document, including paragraphs, tables, headers and footers, without flattening text formatting. Install the optional Word extra:

pip install "emdashify[word]"
emdashify --file draft.docx --output draft-fixed.docx
emdashify --file draft.docx --check
from emdashify import convert_docx

convert_docx("draft.docx", "draft-fixed.docx")

The original file is never overwritten. Word support is for .docx, not legacy .doc. Review complex documents with tracked changes or advanced Word fields after conversion.

Text and Markdown files

emdashify --file notes.md --diff
emdashify --file notes.md --output notes-fixed.md
emdashify --file notes.md --check

Compact by default: both word--word and word -- word become word—word. Flags (--help), dates, and --- stay unchanged; Markdown code blocks are protected. Use --spaced in the CLI (or compact=False in Python) to retain the former spaced style.

Requires Python 3.10+. For development or publishing, see release instructions.

License

BSD-3-Clause-Attribution. Redistributing EmDashify requires retaining license notices and this acknowledgment:

This product includes software developed by edujbarrios (https://github.com/edujbarrios/EmDashify).

Metadata

Release files for emdashify 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for emdashify 0.3.0
File Size Uploaded Provenance Actions
emdashify-0.3.0.tar.gz 16.7 kB With provenance Details for emdashify-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for emdashify 0.3.0
File Interpreter ABI Platform Actions
emdashify-0.3.0-py3-none-any.whl Python 3 none any Details for emdashify-0.3.0-py3-none-any.whl

Total release size: 27.9 kB

Release files / emdashify-0.3.0.tar.gz

Download URL emdashify-0.3.0.tar.gz
Size 16.7 kB
Tags Source
SHA-256 checksum
How to use checksums
73ef3479dc9f825c50fc3f4eed6cecc99679b58af78d72737bcbdc4e54335c49
BLAKE2b-256 checksum
How to use checksums
824a38ad3109249cba13d14775b5fb175461b637b18c98e45287f2318f77b170
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Release files / emdashify-0.3.0-py3-none-any.whl

Download URL emdashify-0.3.0-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a1d388cbcccfcca9b53e66b8e4f1e54a80bc929ce90c0b3ff35f8dbc3c743029
BLAKE2b-256 checksum
How to use checksums
da8990812ef9f9fb2fe1cb8288199187fc6bb1a435a0c20fd474f04fc7b34b78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Security for emdashify 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for emdashify-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page