This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Dumpy

Dumpy is a binary parser with a declarative syntax. All you need to do is telling the framework what your data look like, and let Dumpy do the rest.

Dumpy supports python versions >= 3.0.

Installing

Just use pip or tools alike:

pip install dumpy

Usage

To parse a pre-defined binary structure, you need to define a class for that structure. For example, a class for pascal strings :

import dumpy.types as dt

class PString(dict, metaclass=dt.DumpyMeta):
    __field_specs__ = (
        dt.field('len', dt.UInt8, default=dt.count_of('data')),
        dt.field('data', dt.UInt8, count=dt.counted_by('len')),
    )

s = PString()
s['data'] = b'\x01\x02\x03\x04'

# The length field is calculated automatically.
assert s['len'] == 4

assert s.pack() == b'\x04\x01\x02\x03\x04'

s2 = s.unpack(s.pack())
assert s2['len'] == 4
assert bytes(s2['data']) == b'\x01\x02\x03\x04'

See demo/png_packer.py for a real-world format parser.

Known Issues

  1. The type checking and conversion code in Dumpy is kind of naive, It does not check element types in a sequence.
  2. Dumpy is very slow at current stage. You may not want to use it to parse network messages or huge data structures.
Release History

Release History

0.1.2

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
dumpy-0.1.2.tar.gz (7.5 kB) Copy SHA256 Checksum SHA256 Source Aug 14, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting