Skip to main content

Very simple package for parsing .nsippt files to json

Project description

Latest PyPI version Latest Travis CI build status

Very simple package for parsing .nsippt files to json. Use Python 3.4 and up.

Usage

pygments_style = 'sphinx'
import nsipptparser
import json

with open("sneaky.nsippt") as file:
    data = nsipptparser.parse(file)
    # Get the first length measurement of the first View
    length = data["ViewPropertiesSet"]["View Properties"][0]["Actions Set"]["Length"][0]["length value"]
    print("The length is ", length)

    # Get the base64 thumbnail of the first View
    thumbnail = data["ViewPropertiesSet"]["View Properties"][0]["Thumbnail"]
    print("The thumbnail is ", thumbnail)

    # Save to json file
    with open('data.json', 'w') as f:
        json.dump(data, f, indent=4)

Note: All values are parsed as strings, so you will have to parse the strings further yourself.

Installation

pip install nsipptparser

Requirements

Compatibility

Licence

MIT

Authors

nsipptparser was written by Russell Tran.

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

nsipptparser-0.1.1.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

nsipptparser-0.1.1-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file nsipptparser-0.1.1.tar.gz.

File metadata

  • Download URL: nsipptparser-0.1.1.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.3

File hashes

Hashes for nsipptparser-0.1.1.tar.gz
Algorithm Hash digest
SHA256 710fdc092544591b6f8f0dfad4cdc5277b4c8b9a69b8177805900d72d8e8a3d3
MD5 a305351c9f56715edbc5274d7a7b4ce3
BLAKE2b-256 8f63d65a89ebbc8419f2b856b21d680290a7eb5807674e756e5e0604a080a22a

See more details on using hashes here.

File details

Details for the file nsipptparser-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: nsipptparser-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.3

File hashes

Hashes for nsipptparser-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ec44034e528eef3d323810c5f3112151ec3b8b25b0a4277cab5300f68cfffde8
MD5 e43dbe52f2b0a1cd7721f96c47ab748d
BLAKE2b-256 5858cdf44da477605314a0ad7a34d81b48cb1a357d1953b52fa633fc3a2661fe

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