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

Uploaded Source

Built Distributions

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

Uploaded PyPy

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

Uploaded CPython 3.12

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

Uploaded CPython 3.11

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

Uploaded CPython 3.9

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

Uploaded CPython 3.8

File details

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

File metadata

  • Download URL: dictdumper-0.8.4.post4.tar.gz
  • Upload date:
  • Size: 76.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for dictdumper-0.8.4.post4.tar.gz
Algorithm Hash digest
SHA256 4d85cb2ecacc6ecfc1a97ec9f80276aefe231279fa5b6ed910e27f2bc02db35d
MD5 5ea0b8a1f6f4e0ac80ec34de81d79f0a
BLAKE2b-256 2bfcc85d01652f05ae3bdc16179ececb6801757bee6b3c8fbd34e044a7bb3547

See more details on using hashes here.

Provenance

The following attestation bundles were made for dictdumper-0.8.4.post4.tar.gz:

Publisher: create-release.yml on JarryShaw/DictDumper

Attestations:

File details

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

File metadata

File hashes

Hashes for dictdumper-0.8.4.post4-pp310-none-any.whl
Algorithm Hash digest
SHA256 83deffb4cdc72c00979fac9e98a374d7839b93760ab03998ba46f27c20611a02
MD5 7191c36a87402c38efa61e1f4f8b6e07
BLAKE2b-256 76481a21d2103c8cc754dcaebcacbfbd24328790e8d358606f71c9b8f0296b35

See more details on using hashes here.

Provenance

The following attestation bundles were made for dictdumper-0.8.4.post4-pp310-none-any.whl:

Publisher: create-release.yml on JarryShaw/DictDumper

Attestations:

File details

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

File metadata

File hashes

Hashes for dictdumper-0.8.4.post4-cp312-none-any.whl
Algorithm Hash digest
SHA256 8b6966759a8fa37bf99aa424300249c73838347a9d55999c20b1a4730e137697
MD5 5c7721372c7fd6a2b0f0919c5fcb4bfb
BLAKE2b-256 f9db7963670a95c9e1bf99b950dcc59626c6be7c02842211ed63f04b30607f08

See more details on using hashes here.

Provenance

The following attestation bundles were made for dictdumper-0.8.4.post4-cp312-none-any.whl:

Publisher: create-release.yml on JarryShaw/DictDumper

Attestations:

File details

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

File metadata

File hashes

Hashes for dictdumper-0.8.4.post4-cp311-none-any.whl
Algorithm Hash digest
SHA256 a890d63a762903b764384f0736c8153b3834c0456b33e20fe115ce8daa96fe62
MD5 a1ed50be54e6ebed4761f6f6b945269a
BLAKE2b-256 7c7127d8fa096744be477ce132c97162477deb24cf2b83081ec07deeec6606d4

See more details on using hashes here.

Provenance

The following attestation bundles were made for dictdumper-0.8.4.post4-cp311-none-any.whl:

Publisher: create-release.yml on JarryShaw/DictDumper

Attestations:

File details

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

File metadata

File hashes

Hashes for dictdumper-0.8.4.post4-cp39-none-any.whl
Algorithm Hash digest
SHA256 2cb63b2c23bc679fd7b7cb950432bc5bd3ed0a600b98e49dd42288213a0c700e
MD5 111f8d2419f290e07b6099974f98fc8d
BLAKE2b-256 7d3296991dd64adb2a982574038148adb5fa28fcb700b77ebb8c4b9612b4de97

See more details on using hashes here.

Provenance

The following attestation bundles were made for dictdumper-0.8.4.post4-cp39-none-any.whl:

Publisher: create-release.yml on JarryShaw/DictDumper

Attestations:

File details

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

File metadata

File hashes

Hashes for dictdumper-0.8.4.post4-cp38-none-any.whl
Algorithm Hash digest
SHA256 0c524970168ce8d3db1a2f5d8995e0a41abddb58ae0489688753dc4c1b41eab7
MD5 5912951ae8a91b72bf534d55eaa322a2
BLAKE2b-256 0e53b60931a3985eb072b8ab45c9ca1f63f8674bc192695c182153cef1bbd4a4

See more details on using hashes here.

Provenance

The following attestation bundles were made for dictdumper-0.8.4.post4-cp38-none-any.whl:

Publisher: create-release.yml on JarryShaw/DictDumper

Attestations:

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