Skip to main content

Python dict formatted dumper.

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 Mmarkup 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,                   # int
    bar = 'Hello, world!',      # string
    boo = dict(                 # dict
        foo_again = True,       # bool
        bar_again = b'bytes',   # bytes (b'\x62\x79\x74\x65\x73')
        boo_again = None,       # NoneType
    ),
)
dumper(test_1, name='test_1')
$ cat out.txt
PCAP File Tree-View Format

test
  |-- foo -> -1
  |-- bar -> hello
  |-- boo
        |-- foo_again -> True
        |-- bar_again -> 62 79 74 65 73
        |-- boo_again -> N/A
import datetime
test_2 = dict(
    foo = [1, 2.0, 3],          # list
    bar = (1.0, 2, 3.0),        # tuple
    boo = dict(                 # dict
        foo_again = 'a long long bytes',
                                # bytes
        bar_again = datetime.datetime.today(),
                                # datetime
        boo_again = -1.0,       # float
    ),
)
dumper(test_2, name='test_2')
$ cat out.txt
PCAP File Tree-View Format

test_1
  |-- foo -> -1
  |-- bar -> Hello, world!
  |-- boo
        |-- foo_again -> True
        |-- bar_again -> 62 79 74 65 73
        |-- boo_again -> N/A

test_2
  |-- foo
  |     |--> 1
  |     |--> 2.0
  |     |--> 3
  |-- bar
  |     |--> 1.0
  |     |--> 2
  |     |--> 3.0
  |-- boo
        |-- foo_again -> a long long bytes
        |-- bar_again -> 2018-03-08 17:47:35
        |-- boo_again -> -1.0

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.6.5.post3.tar.gz (75.3 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.6.5.post3-py3.7.egg (28.3 kB view details)

Uploaded Egg

dictdumper-0.6.5.post3-py3.6.egg (28.3 kB view details)

Uploaded Egg

dictdumper-0.6.5.post3-py3.5.egg (28.7 kB view details)

Uploaded Egg

dictdumper-0.6.5.post3-py3.4.egg (28.7 kB view details)

Uploaded Egg

dictdumper-0.6.5.post3-py2.py3-none-macosx_10_14_x86_64.whl (25.9 kB view details)

Uploaded Python 2Python 3macOS 10.14+ x86-64

dictdumper-0.6.5.post3-py2.7.egg (26.3 kB view details)

Uploaded Egg

File details

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

File metadata

  • Download URL: dictdumper-0.6.5.post3.tar.gz
  • Upload date:
  • Size: 75.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.1

File hashes

Hashes for dictdumper-0.6.5.post3.tar.gz
Algorithm Hash digest
SHA256 92ab37d6b2051cc883d32a8b0c1fae19a1602e4af31c016d897f2f47cdcef6c6
MD5 5052c18d8bd15ce131106204a5fece64
BLAKE2b-256 e015758e5a09b3f379dee3c83d84df848072d293ae37b142b197aee8b2abeb59

See more details on using hashes here.

File details

Details for the file dictdumper-0.6.5.post3-py3.7.egg.

File metadata

  • Download URL: dictdumper-0.6.5.post3-py3.7.egg
  • Upload date:
  • Size: 28.3 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.1

File hashes

Hashes for dictdumper-0.6.5.post3-py3.7.egg
Algorithm Hash digest
SHA256 e053a1d3ece9b2091e144e33c61e5af444ecd0f0904d9f167f5cd324a39df48d
MD5 2a0d8b3b73b249fd75c69792a682cba2
BLAKE2b-256 9ed5e0b7e7bdddf546054dbe35aabb7d2957a76408084d7f088ebce413f9836b

See more details on using hashes here.

File details

Details for the file dictdumper-0.6.5.post3-py3.6.egg.

File metadata

  • Download URL: dictdumper-0.6.5.post3-py3.6.egg
  • Upload date:
  • Size: 28.3 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.1

File hashes

Hashes for dictdumper-0.6.5.post3-py3.6.egg
Algorithm Hash digest
SHA256 d86a0cfee48366eb77f79a95f732738ac9b2565f13270604923aac1a892436d2
MD5 b062f96393619a0352509db796ba012b
BLAKE2b-256 67282e8102aadc58d224d734023e58ecd538800a347c205c26b14cd9a12c3757

See more details on using hashes here.

File details

Details for the file dictdumper-0.6.5.post3-py3.5.egg.

File metadata

  • Download URL: dictdumper-0.6.5.post3-py3.5.egg
  • Upload date:
  • Size: 28.7 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.1

File hashes

Hashes for dictdumper-0.6.5.post3-py3.5.egg
Algorithm Hash digest
SHA256 dbe0dac7423d060134b1023b94531902697fe2c1d6ea75e651714996e672ba3b
MD5 047cb47a6c8399cdebf6dd40b80c085a
BLAKE2b-256 8e6a0eee8adb96188d562f766274f4fe65e20a63f8de16e6c5168b4d91369b10

See more details on using hashes here.

File details

Details for the file dictdumper-0.6.5.post3-py3.4.egg.

File metadata

  • Download URL: dictdumper-0.6.5.post3-py3.4.egg
  • Upload date:
  • Size: 28.7 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.1

File hashes

Hashes for dictdumper-0.6.5.post3-py3.4.egg
Algorithm Hash digest
SHA256 34a950f79914b4438e2d5760de8ae6bf94ce982bd4798afab01fba0546780355
MD5 df3856d17ea2b7b095a9df556bc420d3
BLAKE2b-256 3d99a469be0bd76ef8e8c3b163f803601330a70003f19b237ef9dbdc9ba1b396

See more details on using hashes here.

File details

Details for the file dictdumper-0.6.5.post3-py2.py3-none-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: dictdumper-0.6.5.post3-py2.py3-none-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 25.9 kB
  • Tags: Python 2, Python 3, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.1

File hashes

Hashes for dictdumper-0.6.5.post3-py2.py3-none-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 f04b655da976d8023fd16016fa398145b681601fcd57d1766de7af59a44241d2
MD5 dcf0aa8e0ea112dec31bac6a4511efe7
BLAKE2b-256 7921b57e11596cf93c46b40e707db0d25e701be2f9f1597d285248a871060599

See more details on using hashes here.

File details

Details for the file dictdumper-0.6.5.post3-py2.7.egg.

File metadata

  • Download URL: dictdumper-0.6.5.post3-py2.7.egg
  • Upload date:
  • Size: 26.3 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.1

File hashes

Hashes for dictdumper-0.6.5.post3-py2.7.egg
Algorithm Hash digest
SHA256 d359be2e372f89ace34d37bffeac79eed6fcd914a14431432d26cbd1348fcc7c
MD5 137a0a5b1dc305bd2b4df008d8055522
BLAKE2b-256 64d4fbc5bb534c87259cee7998cec666fd311694ae05f2ec40bbb1b036756dc2

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