Skip to main content

Python SMS PDU Decoder

Project description

SMS-PDU Decoder

PyPI version

This library will help you to decode raw SMS data you can get from a GSM modem (generally by using AT commands).

It has some encoding functionality as well.

It is recommended to read the GSM 03.40 specification to better understand the components this library works wtih.

How to install

This library has been successfully tested and works with Python versions ranging from 3.7 up to 3.10.

pip install smspdudecoder

How to use

Please take a look at the source code, which comes with documentation and examples.

For instance, you can use GSM and UCS2 encodings just like that:

>>> from smspdudecoder.codecs import GSM, UCS2
>>> GSM.decode('C8F71D14969741F977FD07')
'How are you?'
>>> UCS2.decode('004C006F00720065006D00200049007000730075006D')
'Lorem Ipsum'

How to test and contribute

First, clone this repository:

git clone git@github.com:qotto/smspdudecoder.git
# or use HTTPS if you are unauthenticated:
# git clone https://github.com/qotto/smspdudecoder.git
cd smspdudecoder

Using Docker

The easiest way to test this library against all supported Python versions is to use Docker.

make docker-test

Behinds the scenes, this will build a Docker image with all supported Python versions and run the tests with tox.

Using your existing Python installation

If you want to simply run the test suite, make sure that you have dependencies installed with:

pip install -r requirements.txt

And use the following command:

make test

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

smspdudecoder-2.1.0.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

smspdudecoder-2.1.0-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file smspdudecoder-2.1.0.tar.gz.

File metadata

  • Download URL: smspdudecoder-2.1.0.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for smspdudecoder-2.1.0.tar.gz
Algorithm Hash digest
SHA256 b54b5270aab95aee990e04965b651d5bf4ba33e5da7086729797fe45fabdd882
MD5 ceef9dc10b6cdc92ac8dcfce69575876
BLAKE2b-256 be1f971c81440d83c28b9c26134cca587ff448ccddaee36444b013aa5895d110

See more details on using hashes here.

File details

Details for the file smspdudecoder-2.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for smspdudecoder-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 444091406db19d1c8ec680255421d2a5c39801b8e5e7154064ad963a0d9c39b6
MD5 e1e701b22c7a560352fc7130acb14969
BLAKE2b-256 4c22300b37b946baf0c2dd32f6878aade06800cd53b4603a0df2549c431205c9

See more details on using hashes here.

Supported by

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