Skip to main content

A Package containing tools for decoding/encoding Smile Format data to/from python object

Project description

NewSmile

Another Smile Format Decoder/Encoder for Python 3

Decoding example

from newsmile import SmileDecoder
decoder = SmileDecoder()
with open('smile-data-file', 'rb') as smile_file:
    data = decoder.decode(smile_file.read())

Encoding example

import json
from newsmile import SmileEncoder
encoder = SmileEncoder(shared_values=True, encoding='iso-8859-1')
dico = {'a': 1, 'b': [2, 3, 4], 'c': {'subkey': 'a string'}}
smile_data = encoder.encode(json.dumps(dico))

Running tests

cd tests
python test.py

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

newsmile-1.0.tar.gz (299.2 kB view hashes)

Uploaded Source

Built Distribution

newsmile-1.0-py3-none-any.whl (7.6 kB view hashes)

Uploaded Python 3

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