Skip to main content

A simple Morse code encoder and decoder for Python.

Project description

morsepy

GitHub Repo PyPI License: MIT

Python Last Commit Stars

Maintained by acrazypie

A simple and lightweight Python library to encode and decode Morse code.
Supports letters, numbers, and punctuation symbols — perfect for small projects, learning, or creative experiments.


🚀 Installation

You can install it directly from PyPI:

pip install morsepy

Or, if you’re developing locally:

pip install -e .

🧠 Usage

from morsepy import encode, decode

text = "ciao mondo!"
code = encode(text)
print("Morse:", code)

decoded = decode(code)
print("Decoded:", decoded)

Output:

Morse: _._. .. ._ ___ / __ ___ _. _.. ___ _._.__
Decoded: ciao mondo!

📚 Features

  • 🔤 Encode any text into Morse code
  • 🔁 Decode Morse code back to text
  • 🧩 Supports A–Z, 0–9, and common punctuation
  • ⚡ Lightweight, dependency-free

📦 Project Structure

morsepy/
├── morsepy/
│   ├── __init__.py
│   └── core.py
├── pyproject.toml
├── README.md
└── LICENSE

🪪 License

Released under the MIT License
© 2025 Elisa

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

morse_coder-1.0.0.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

morse_coder-1.0.0-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file morse_coder-1.0.0.tar.gz.

File metadata

  • Download URL: morse_coder-1.0.0.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for morse_coder-1.0.0.tar.gz
Algorithm Hash digest
SHA256 3b2d1c0aaca3dc81fde625e8b96e9d23ce9647a5bacbb4aea35fa71e3f4f30ce
MD5 c2da6a2fcc395fbb5a959d318090b341
BLAKE2b-256 f7266bbf049a8c649a5cf66c1e25cd04b221985e884de2256e9c18e31567560e

See more details on using hashes here.

File details

Details for the file morse_coder-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: morse_coder-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 2.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for morse_coder-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e2ae52e18c3ddf39420a2b48ac098bca1de07de3412a8545abd34714c4352b30
MD5 b57b11af7f2e71168c81f62586abe3d2
BLAKE2b-256 a960ab052a83e6147bd556c299828ca5180f5c21e4b8abf9c6f9c23b1d87c668

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page