semvec/pypi-packages huggingface dataset:
binario 0.0.4
Package that lets an application read/write primitive data types from an underlying input/output stream as binary data.
License: MIT
Keywords: io input output file binary binario data

binario
=======
Simple work with binary data.

What is the binario?
--------------------
**binario** is the Python package that lets an application read/write primitive data types from an underlying input/output stream as binary data.

And which primitive data types it can process?
----------------------------------------------
It can work with booleans, integers, shorts, long integers, floats, doubles, strings and any byte buffers.

How to write data?
------------------
It's simple. Just create instance of `Writer` and then do your work:

>>> import binario
>>> w = binario.Writer("file.dat")
>>> w.write_short(2014)
>>> w.write_bool(True)
>>> w.write_float(3.1415)
>>> w.write_string("Hello, world!")
>>> w.write(bytes([128, 20, 10, 255, 0]))

And how to read data?
---------------------
It's simple too. Like outputting, create `Reader` and then do your work:

>>> import binario
>>> r = binario.Reader("file.dat")
>>> r.read_short()
2014
>>> r.read_bool()
True
>>> r.read_float()
3.1415
>>> r.read_string()
"Hello, world!"
>>> r.read(5)
b'\x80\x14\n\xff\x00'

Which byte order specified by default?
--------------------------------------
By default it is `network` order (or `big-endian`).

Okay, it is good, but if I want to change byte order for `Reader` or `Writer`?
------------------------------------------------------------------------------
Not a problem! Just specify it:

>>> import binario
>>> r = binario.Reader("file.dat", binario.LITTLE_ENDIAN)
>>> w = binario.Writer("another_file.dat", binario.BIG_ENDIAN)


What about append new data to existing file?
--------------------------------------------
Yeah, it is also very simple:

>>> import binario
>>> w = binario.Writer("incomplete_file.dat", append=True)


How to install this package?
----------------------------
Just type in your terminal

>>> pip install binario

Where to find documentation?
----------------------------
Look here: http://binarios-docs.readthedocs.org/en/latest/

Contribution
------------
If you do have a contribution for the package feel free to put up a Pull Request or open Issue on GitHub repo: http://github.com/asaskevich/binario.
tarantool-queue 0.1.4
Python bindings for Tarantool queue script (http://github.com/tarantool/queue)
License: MIT

======================
tarantool-queue-python
======================

Python Bindings for `Tarantool Queue <https://github.com/tarantool/queue/>`_.

Library depends on:

* msgpack-python 
* tarantool

Basic usage can be found in tests. Description on every command is in source code.

Big thanks to Dmitriy Shveenkov and `Alexandr (FZambia) Emelin <https://github.com/FZambia>`_.

For install of latest "stable" version type:

.. code-block:: bash

    # using pip
    $ sudo pip install tarantool-queue
    # or using easy_install
    $ sudo easy_install tarantool-queue
    # or using python
    $ wget http://bit.ly/tarantool_queue -O tarantool_queue.tar.gz
    $ tar xzf tarantool_queue.tar.gz
    $ cd tarantool-queue-{version}
    $ sudo python setup.py install

For install bleeding edge type:

.. code-block:: bash

    $ sudo pip install git+https://github.com/bigbes92/tarantool-queue-python.git

For configuring Queue in `Tarantool <http://tarantool.org>`_ read manual `Here <https://github.com/tarantool/queue>`_.

Then just **import** it, create **Queue**, create **Tube**, **put** and **take** some elements:
    
.. code-block:: python

    >>> from tarantool_queue import Queue 
    >>> queue = Queue("localhost", 33013, 0)
    >>> tube = queue.tube("name_of_tube")
    >>> tube.put([1, 2, 3])
    Not taken task instance
    >>> task = tube.take()
    >>> task.data # take task and read data from it
    [1, 2, 3]
    >>> task.ack() # move this task into state DONE
    True

That's all, folks!

See Also
========
* `Documentation <http://tarantool-queue-python.readthedocs.org/en/latest/>`_
* `Quick Start   <http://tarantool-queue-python.readthedocs.org/en/latest/quick-start.en.html>`_
* `Queue API     <http://tarantool-queue-python.readthedocs.org/en/latest/code.html>`_
structprop 0.0.9
Parser for structured property config file format
License: MIT

Configuration file parser for a somewhat structures properties file
format.  (The syntax borrows a lot from [1])

The parser is designed to be as small and simple as possible.

The syntax of the config files should resemble standard properties
(prop = value) with the additional functionality for structuring the
data.  A "structprop" file is an UTF-8 file.

Comments start with '#' and continue until the end of the line.

Line feeds, spaces and tabs are all treated as white space. There are
three special characters; '=', '{' and '}'.  '=' is used to assign a
value to a property.  '{' and '}' are used to encapsulate structured
data.

Arrays are made up out of simple values enclosed inside a {}-pair.
For example (array with values 1, 2 and "abc").

  key = { 1 2 abc }

Since linefeed is like any other whitespace character, the value can
be broken up onto several lines:

  key = {
    1
    2
    abc
  }

The data can be structued into objects (think of it as a hash-map) by
adding a {}-pair after the key.  The content of the object is key-value
pairs or other objects.

  name {
    key = value
    what = foo
  }

Keys and values are regular strings that can contain any characters
except the ones mentioned earlier (linefeed, space, tab, #, {, }, =)
provided that the string is not double-quoted.

  key = "a value with a space in it"

The python module contains two functions: loads and dumps.  "loads"
parses a string into a python dictionary.  "dumps" writes a structprop
representation of a python dictionary as a string.

"loads" will try to parse values as regular JSON values (the string
"1" will become an integer with value 1).  If it fails, it will leave
the value as a string.

Example:

  # This is a simple example config file
  database {
    hostname = localhost
    username = dbuser
    password = secret
    port = 12361
    database = TheDatabase
  }

  tables = { Table1 Table2 }


[1] https://github.com/matjam/StructuredProperties