A simple Morse code encoder and decoder for Python.
Project description
morsepy
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b2d1c0aaca3dc81fde625e8b96e9d23ce9647a5bacbb4aea35fa71e3f4f30ce
|
|
| MD5 |
c2da6a2fcc395fbb5a959d318090b341
|
|
| BLAKE2b-256 |
f7266bbf049a8c649a5cf66c1e25cd04b221985e884de2256e9c18e31567560e
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2ae52e18c3ddf39420a2b48ac098bca1de07de3412a8545abd34714c4352b30
|
|
| MD5 |
b57b11af7f2e71168c81f62586abe3d2
|
|
| BLAKE2b-256 |
a960ab052a83e6147bd556c299828ca5180f5c21e4b8abf9c6f9c23b1d87c668
|