Skip to main content

DictDumper: comprehensive network packet analysis library

Project description

DictDumper

  The dictdumper project is an open source Python program works as a stream formatted output dumper for dict.

  • About
    • dictdumper.Dumper
    • dictdumper.JSON
    • dictdumper.PLIST
    • dictdumper.Tree
    • dictdumper.XML
    • dictdumper.HTML
  • Installation
  • Usage

About

  Currently, it supports following formats --

  • dictdumper.Dumper -- abstract base class of all dumpers
  • dictdumper.JSON -- dump JavaScript object notation (JSON) format file
  • dictdumper.PLIST -- dump Apple property list (PLIST) format file
  • dictdumper.Tree -- dump tree-view text (TXT) format file
  • dictdumper.XML -- dump extensible markup language (XML) file (base class)
  • dictdumper.HTML -- dump JavaScript file under Vue.js framework (DEPRECATED)

 

Installation:

Note that dictdumper supports Python versions 2.7 and all versions since 3.0

pip install dictdumper

 

Usage

dictdumper is quite easy to use. After installation, importation, and initialisation, you can simple call the instance to dump contents.

Take dictdumper.Tree for example

import dictdumper
dumper = dictdumper.Tree('out.txt')
test_1 = dict(
    foo=-1,
    bar='Hello, world!',
    boo=dict(
        foo_again=True,
        bar_again=memoryview(b'bytes'),
        boo_again=None,
    ),
)
dumper(test_1, name='test_1')
$ cat out.txt
test_1
  |-- foo -> -1
  |-- bar -> Hello, world!
  |-- boo
        |-- foo_again -> True
        |-- bar_again
        |     |-- type -> memoryview
        |     |-- value -> 62 79 74 65 73
        |     |-- text -> bytes
        |-- boo_again -> NIL
import datetime
test_2 = dict(
    foo=[1, 2.0, 3],
    bar=(1.0, bytearray(b'a long long bytes'), 3.0),
    boo=dict(
        foo_again=b'bytestring',
        bar_again=datetime.datetime(2020, 1, 31, 20, 15, 10, 163010),
        boo_again=float('-inf'),
    ),
)
dumper(test_2, name='test_2')
$ cat out.txt
test_1
  |-- foo -> -1
  |-- bar -> Hello, world!
  |-- boo
        |-- foo_again -> True
        |-- bar_again
        |     |-- type -> memoryview
        |     |-- value -> 62 79 74 65 73
        |     |-- text -> bytes
        |-- boo_again -> NIL

test_2
  |-- foo
  |     |--> 1
  |     |--> 2.0
  |     |--> 3
  |-- bar
  |     |-- type -> tuple
  |     |-- value
  |           |--> 1.0
  |           |--> --
  |           |     |-- type -> bytearray
  |           |     |-- value
  |           |     |     |--> 61 20 6c 6f 6e 67 20 6c 6f 6e 67 20 62 79 74 65
  |           |     |          73
  |           |     |-- text -> a long long bytes
  |           |--> 3.0
  |-- boo
        |-- foo_again -> 62 79 74 65 73 74 72 69 6e 67
        |-- bar_again -> 2020-01-31T20:15:10.163010
        |-- boo_again -> -Infinity
test_3 = dict(
    foo="stringstringstringstringstringstringstringstringstringstring",
    bar=[
        "s1", False, "s3",
    ],
    boo=[
        "s4", dict(s="5", j="5"), "s6"
    ],
    far=dict(
        far_foo=["s1", "s2", "s3"],
        far_var="s4",
    ),
    biu=float('nan'),
)
dumper(test_3, name='test_3')
$ cat out.txt
test_1
  |-- foo -> -1
  |-- bar -> Hello, world!
  |-- boo
        |-- foo_again -> True
        |-- bar_again
        |     |-- type -> memoryview
        |     |-- value -> 62 79 74 65 73
        |     |-- text -> bytes
        |-- boo_again -> NIL

test_2
  |-- foo
  |     |--> 1
  |     |--> 2.0
  |     |--> 3
  |-- bar
  |     |-- type -> tuple
  |     |-- value
  |           |--> 1.0
  |           |--> --
  |           |     |-- type -> bytearray
  |           |     |-- value
  |           |     |     |--> 61 20 6c 6f 6e 67 20 6c 6f 6e 67 20 62 79 74 65
  |           |     |          73
  |           |     |-- text -> a long long bytes
  |           |--> 3.0
  |-- boo
        |-- foo_again -> 62 79 74 65 73 74 72 69 6e 67
        |-- bar_again -> 2020-01-31T20:15:10.163010
        |-- boo_again -> -Infinity

test_3
  |-- foo
  |     |--> stringstringstringstringstringstringstri
  |          ngstringstringstring
  |-- bar
  |     |--> s1
  |     |--> False
  |     |--> s3
  |-- boo
  |     |--> s4
  |     |--> --
  |     |     |-- s -> 5
  |     |     |-- j -> 5
  |     |--> s6
  |-- far
  |     |-- far_foo
  |     |     |--> s1
  |     |     |--> s2
  |     |     |--> s3
  |     |-- far_var -> s4
  |-- biu -> NaN

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

dictdumper-0.8.4.post3.tar.gz (76.1 kB view details)

Uploaded Source

Built Distributions

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

dictdumper-0.8.4.post3-pp310-none-any.whl (18.5 kB view details)

Uploaded PyPy

dictdumper-0.8.4.post3-pp39-none-any.whl (18.5 kB view details)

Uploaded PyPy

dictdumper-0.8.4.post3-pp38-none-any.whl (18.5 kB view details)

Uploaded PyPy

dictdumper-0.8.4.post3-cp312-none-any.whl (18.5 kB view details)

Uploaded CPython 3.12

dictdumper-0.8.4.post3-cp311-none-any.whl (18.5 kB view details)

Uploaded CPython 3.11

dictdumper-0.8.4.post3-cp310-none-any.whl (18.5 kB view details)

Uploaded CPython 3.10

dictdumper-0.8.4.post3-cp39-none-any.whl (18.5 kB view details)

Uploaded CPython 3.9

dictdumper-0.8.4.post3-cp38-none-any.whl (18.5 kB view details)

Uploaded CPython 3.8

File details

Details for the file dictdumper-0.8.4.post3.tar.gz.

File metadata

  • Download URL: dictdumper-0.8.4.post3.tar.gz
  • Upload date:
  • Size: 76.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for dictdumper-0.8.4.post3.tar.gz
Algorithm Hash digest
SHA256 6b43a720564f7ddf4fa1d2d3b5d74dacd372b5b4d758089626ed7ad674ea2fd4
MD5 a495bfe80bb7dc23e22604f3397b01f5
BLAKE2b-256 0f5fc9c3c056f1a625bc57ead30bedaf971cac52f71d27f61544c3cb2046501f

See more details on using hashes here.

File details

Details for the file dictdumper-0.8.4.post3-pp310-none-any.whl.

File metadata

File hashes

Hashes for dictdumper-0.8.4.post3-pp310-none-any.whl
Algorithm Hash digest
SHA256 57429cbe12685cac91774cfa2ab1ed06ea7962bb154edf53a09bccfce2c7fc41
MD5 c49868ddfc90eebfa0df107e76789ac0
BLAKE2b-256 f80f5fed0dcf2888b551294c07b2eb2ce54fd02c150a8e3b160cc2c667716590

See more details on using hashes here.

File details

Details for the file dictdumper-0.8.4.post3-pp39-none-any.whl.

File metadata

File hashes

Hashes for dictdumper-0.8.4.post3-pp39-none-any.whl
Algorithm Hash digest
SHA256 b3abb723bb8bae2c4361a7e7f59d0c840a0cc0e13bc5d5694b2e0c606371ebd2
MD5 8d95fb1ddead1ba8502c86ef1a417e6c
BLAKE2b-256 71292a99bf5eee001db65bd898f19d788fb0265fd55aea65ad395046945d7f9c

See more details on using hashes here.

File details

Details for the file dictdumper-0.8.4.post3-pp38-none-any.whl.

File metadata

File hashes

Hashes for dictdumper-0.8.4.post3-pp38-none-any.whl
Algorithm Hash digest
SHA256 bada6246cff8809e80455f2802a9d1f9ca0f3af527c445b7099fea86abe49623
MD5 9f3301e3eaedb491cb4b5715d56f80cc
BLAKE2b-256 670a020e48a5c60267a52035b654435e5230c3aeefab43970eb186832ba59289

See more details on using hashes here.

File details

Details for the file dictdumper-0.8.4.post3-cp312-none-any.whl.

File metadata

File hashes

Hashes for dictdumper-0.8.4.post3-cp312-none-any.whl
Algorithm Hash digest
SHA256 b7c701e501bb9d0ad03d4292152be602e5959da1126366e22c3a67730668fc06
MD5 2532a26ad06fbee7dcadd829104933a0
BLAKE2b-256 72148ea4d1cd8631e46d1102faedb99f6f8663d80b8013439bcdb4ae75ede042

See more details on using hashes here.

File details

Details for the file dictdumper-0.8.4.post3-cp311-none-any.whl.

File metadata

File hashes

Hashes for dictdumper-0.8.4.post3-cp311-none-any.whl
Algorithm Hash digest
SHA256 2935b64212d25b9f7807eedf133341b8c2e00a5b83c51427a4411390e332e5aa
MD5 d73cd9616d65f1089daa6fb51d01e122
BLAKE2b-256 bb9014cd6db6df4147be5f68e1ef3e22e5fd460a57712aeefc237a72f7b42d1b

See more details on using hashes here.

File details

Details for the file dictdumper-0.8.4.post3-cp310-none-any.whl.

File metadata

File hashes

Hashes for dictdumper-0.8.4.post3-cp310-none-any.whl
Algorithm Hash digest
SHA256 0b77d3fcd8afdc1dc587817496386e4c175d06f4336c7f3521aeb14766f1a293
MD5 1c42f6f70324019271a7e84c8141e403
BLAKE2b-256 96ba2fa7b262373baf1f4f5dcd19665444673ffb4db3a4feee323ac066c5221b

See more details on using hashes here.

File details

Details for the file dictdumper-0.8.4.post3-cp39-none-any.whl.

File metadata

File hashes

Hashes for dictdumper-0.8.4.post3-cp39-none-any.whl
Algorithm Hash digest
SHA256 ac683cc0d859de2691588e2a7196806776bc85b7bb1305befb8f5c4b681b8fab
MD5 75ac15b82eadb71ba824e23c42df0d11
BLAKE2b-256 db96f7b496aa7937b8fa6186f15ebb5cecd0d2f79bddd16b21acc4fd9851e0af

See more details on using hashes here.

File details

Details for the file dictdumper-0.8.4.post3-cp38-none-any.whl.

File metadata

File hashes

Hashes for dictdumper-0.8.4.post3-cp38-none-any.whl
Algorithm Hash digest
SHA256 b3bb0e414865319c7f983ceb018b3141c21ecc352aa78786abf87e02edd6ff91
MD5 6df4d2a61bc2922bb5d4407c0ded72a2
BLAKE2b-256 c7cb163a8222a9709d5a0635e3ea39aafc58409c612c4b0ccbbe9ac70d52a517

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