qotto / smspdudecoder

Python SMS PDU Decoder
MIT License
60 stars 19 forks source link

PDU encoder #7

Closed bronte2k7 closed 1 year ago

bronte2k7 commented 3 years ago

really lacking

alexpirine commented 3 years ago

Hi @bronte2k7 , could you please describe your use case and give an example of the API you wish you had?

bronte2k7 commented 3 years ago

Hello Your code is very neat. So my example will be in your style.

class PDU:
    def encode(data={}):
        return {'encoded_data': '', 'length': 'int'}  # perhaps some more necessary data

    def decode(data=None):
        return {'decoded_data': '', 'length': 'int'}  # perhaps some more necessary data

# p.s. I really hope that you understand me

Of all the libraries I've seen, only yours works with python 3, but lacks an encoder)))

alexpirine commented 1 year ago

Closing this for now, since the project is only capable of decoding right now.

If anyone is interested in a Python encoder, it would be helpful to present use cases to move forward. And even better, creating a PR :)