Skip to main content

Python SMS PDU Decoder

Project description

SMS-PDU Decoder

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.0.0.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

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

smspdudecoder-2.0.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: smspdudecoder-2.0.0.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12

File hashes

Hashes for smspdudecoder-2.0.0.tar.gz
Algorithm Hash digest
SHA256 d5d8ae76877a5e183b2518de7b86a2a0dabc405d0f2cf01025d0070990b83c58
MD5 28084d9b9e253eb189a2e4124a08ab1f
BLAKE2b-256 79310c848da99a36b387846e65751b52c143faea6ef4590a05cf1aa22f9f5444

See more details on using hashes here.

File details

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

File metadata

  • Download URL: smspdudecoder-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12

File hashes

Hashes for smspdudecoder-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c023dc6118f7d2bae75f3d35dd45426a14915698075906bb8954f6f14fa914fc
MD5 a0b41515206f66a14826e92c930cdc79
BLAKE2b-256 5e94ce4ab873a461f28f9f7bd719e8c579081e23d5a17a325b3ccabc88c70b97

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