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", compact=True) # '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

Safe by default: only standalone -- becomes —. Flags (--help), dates, and --- stay unchanged; Markdown code blocks are protected. Use --compact for word--word.

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.2.1

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.2.1
File Size Uploaded Provenance Actions
emdashify-0.2.1.tar.gz 15.8 kB With provenance Details for emdashify-0.2.1.tar.gz

Built distribution (wheel)

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

Total release size: 26.7 kB

Release files / emdashify-0.2.1.tar.gz

Download URL emdashify-0.2.1.tar.gz
Size 15.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2a5616ac480a9fac0a607951ca81c576796976dbea850cf862e8c6b82f3c4fb5
BLAKE2b-256 checksum
How to use checksums
e68d21b9e38b5994e0aa53aa27299b8feea2e07670722795dfa5ca42ecfed8df
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.2.1-py3-none-any.whl

Download URL emdashify-0.2.1-py3-none-any.whl
Size 10.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
696635d059a10198033f0ab063b2b70f6d08693958617dadcb6ea7fda6855a5e
BLAKE2b-256 checksum
How to use checksums
2dfdd4da32a8fe0519a570510f02541c3c9fff0f24d261be724f86fd89c13d83
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.2.1

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.2.1.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