index.rst 3.57 KB
Newer Older
Dan Gass's avatar
Dan Gass committed
1 2 3
####################
[plum] API Reference
####################
4 5 6

.. include:: ../alias.txt

Dan Gass's avatar
Dan Gass committed
7 8
.. currentmodule:: plum

9

Dan Gass's avatar
Dan Gass committed
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
**********
Plum Types
**********

    ==============================  ================================================
    Module                          Description
    ==============================  ================================================
    :mod:`plum.array`               list of uniformly typed
    :mod:`plum.bytearray`           array of bytes
    :mod:`plum.float`               floating point
    :mod:`plum.int`                 integer
    :mod:`plum.int.bitfields`       integer with bitfield accessors
    :mod:`plum.int.enum`            integer enumerated constants
    :mod:`plum.int.flag`            integer with bit flags
    :mod:`plum.nil`                 no bytes
    :mod:`plum.str`                 string
    :mod:`plum.structure`           structure of uniquely typed
    ==============================  ================================================

.. toctree::
    :hidden:

    array <types/array.rst>
    bytearray <types/bytearray.rst>
    float <types/float.rst>
    float.big <types/float_big.rst>
    float.little <types/float_little.rst>
    float.native <types/float_native.rst>
    int <types/int.rst>
    int.big <types/int_big.rst>
    int.little <types/int_little.rst>
    int.native <types/int_native.rst>
    int.bitfields <types/int_bitfields.rst>
    int.enum <types/int_enum.rst>
    int.flag <types/int_flag.rst>
    nil <types/nil.rst>
    str <types/str.rst>
    structure <types/structure.rst>


50 51 52 53
*****************
Utility Functions
*****************

Dan Gass's avatar
Dan Gass committed
54
    ===============================  ===========================================================================
55
    Function                         Description
Dan Gass's avatar
Dan Gass committed
56 57 58 59 60 61 62 63 64 65 66
    ===============================  ===========================================================================
    :func:`getbytes`                 Get bytes from bytes buffer.
    :func:`pack`                     Pack items as bytes.
    :func:`pack_and_dump`            Pack items as bytes and produce packed bytes summary.
    :func:`pack_into`                Pack items as bytes into a bytes buffer.
    :func:`pack_into_and_dump`       Pack items as bytes into a bytes buffer and produce bytes summary.
    :func:`unpack`                   Unpack item(s) from bytes.
    :func:`unpack_and_dump`          Unpack item(s) from bytes and produce packed bytes summary.
    :func:`unpack_from`              Unpack item(s) from within a bytes buffer.
    :func:`unpack_from_and_dump`     Unpack item(s) from within a bytes buffer and produce packed bytes summary.
    ===============================  ===========================================================================
67 68 69 70

.. toctree::
    :hidden:

71
    getbytes() <utilities/getbytes.rst>
Dan Gass's avatar
Dan Gass committed
72
    pack() <utilities/pack.rst>
Dan Gass's avatar
Dan Gass committed
73
    pack_and_dump() <utilities/pack_and_dump.rst>
74
    pack_into() <utilities/pack_into.rst>
Dan Gass's avatar
Dan Gass committed
75
    pack_into_and_dump() <utilities/pack_into_and_dump.rst>
Dan Gass's avatar
Dan Gass committed
76
    unpack() <utilities/unpack.rst>
77
    unpack_from() <utilities/unpack_from.rst>
Dan Gass's avatar
Dan Gass committed
78 79
    unpack_and_dump() <utilities/unpack_and_dump.rst>
    unpack_from_and_dump() <utilities/unpack_from_and_dump.rst>
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95


**********
Exceptions
**********

    - |ExcessMemoryError|
    - |InsufficientMemoryError|
    - |PackError|
    - |SizeError|
    - |UnpackError|


.. toctree::
    :hidden:

Dan Gass's avatar
Dan Gass committed
96 97 98 99 100
    ExcessMemoryError <exceptions/ExcessMemoryError.rst>
    InsufficientMemoryError <exceptions/InsufficientMemoryError.rst>
    PackError <exceptions/PackError.rst>
    SizeError <exceptions/SizeError.rst>
    UnpackError <exceptions/UnpackError.rst>