pack data and retrieval in easy way
Project description
cute_format
=========
pack random data and fast retrieval in python
Quick Install
-------------
Quick install for debian/ubuntu like linux distributions.
.. code-block:: bash
$ pip install cute_format
Quick Usage Guide
-----------------
.. code-block:: pycon
from cute.cute_reader import CuteReader
from cute.cute_writer import CuteWriter
cw = CuteWriter('tmp')
a = 1000
b = 2000
cute_writer.write(bytes(a))
cute_writer.write(bytes(b))
cute_writer.close()
cr = CuteReader('tmp')
# get the object by index
assert cr.num_data == 2
byte_object = cr.get(1)
assert int(byte_object) == a
byte_object = cr.get(2)
assert int(byte_object) == b
=========
pack random data and fast retrieval in python
Quick Install
-------------
Quick install for debian/ubuntu like linux distributions.
.. code-block:: bash
$ pip install cute_format
Quick Usage Guide
-----------------
.. code-block:: pycon
from cute.cute_reader import CuteReader
from cute.cute_writer import CuteWriter
cw = CuteWriter('tmp')
a = 1000
b = 2000
cute_writer.write(bytes(a))
cute_writer.write(bytes(b))
cute_writer.close()
cr = CuteReader('tmp')
# get the object by index
assert cr.num_data == 2
byte_object = cr.get(1)
assert int(byte_object) == a
byte_object = cr.get(2)
assert int(byte_object) == b
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
cute_format-0.1.0.tar.gz
(2.3 kB
view details)
File details
Details for the file cute_format-0.1.0.tar.gz.
File metadata
- Download URL: cute_format-0.1.0.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16bd994195d5cdff7cb9a61d764fc6a338b9080e9c6932df26d6a1edc32e7cae
|
|
| MD5 |
4bec2b841a25247d4126bbf665a7dcb0
|
|
| BLAKE2b-256 |
5ec2d59ee5264b30bd911c4fa99c301ce0fd76f2d0b66544d37316db4fb1ea45
|