Skip to main content

PyMorseKit

A lightweight Python library for encoding, decoding, and exporting Morse code as audio.

PyPI version Python versions License


Features

  • Encode plain text to Morse code
  • Decode Morse code back to text
  • Export Morse code as WAV audio files
  • Supports letters, numbers, and common punctuation
  • Lightweight with no external dependencies

Installation

pip install PyMorseKit

Quick Start

from pymorsekit import encode, decode

print(encode("SOS"))
# ... --- ...

print(decode("... --- ..."))
# SOS

Audio Export

Generate Morse code audio and save it as a WAV file.

from pymorsekit import save_audio

save_audio(
    text="SOS",
    output="sos.wav"
)

This creates a WAV file containing the Morse code audio for the provided text.


API Reference

encode(text: str) -> str

Convert plain text into Morse code.

encode("HELLO WORLD")
# .... . .-.. .-.. --- / .-- --- .-. .-.. -..

decode(morse: str) -> str

Convert Morse code back into plain text.

decode(".... . .-.. .-.. --- / .-- --- .-. .-.. -..")
# HELLO WORLD

save_audio(text: str, output: str) -> str

Generate Morse code audio and save it as a WAV file.

save_audio("HELLO", "hello.wav")

Supported Characters

Category Examples
Letters A-Z
Numbers 0-9
Punctuation . , ? ! / ( ) : ; = + - _ " $ @

Contributing

Contributions, bug reports, and feature requests are welcome.

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push your branch
  5. Open a pull request

Author

Developed and maintained by JackMa

GitHub: https://github.com/Fmasterpro27


License

This project is licensed under the Apache License 2.0.

Metadata

Release files for PyMorseKit 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 PyMorseKit 0.2.1
File Size Uploaded Provenance Actions
pymorsekit-0.2.1.tar.gz 8.4 kB Without provenance Details for pymorsekit-0.2.1.tar.gz

Built distribution (wheel)

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

Total release size: 17.3 kB

Release files / pymorsekit-0.2.1.tar.gz

Download URL pymorsekit-0.2.1.tar.gz
Size 8.4 kB
Tags Source
SHA-256 checksum
How to use checksums
9cffc29aa41d81eb610b72fa7983a4d94fa9adf3917c08c9a745d61956b1a7da
BLAKE2b-256 checksum
How to use checksums
999c35a6abf7dd2353652a86accc6cbc9149643a084f82506fb35057d7855cd3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Release files / pymorsekit-0.2.1-py3-none-any.whl

Download URL pymorsekit-0.2.1-py3-none-any.whl
Size 8.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9a4e3f44ebae99ab01fd4193dcabbf7416a3693bb381c33d4a4e5628ee8b110e
BLAKE2b-256 checksum
How to use checksums
3ea25b3e0536b4610b49025f290051f85958c76753bf462351d382041a95ecbb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Security for PyMorseKit 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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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