Skip to main content

Python package for serializing tables in portable format with Capnp.

Project description

PortableTab

Python 3.7 Python 3.8 Python 3.9 Python 3.10 Python 3.11 Python 3.12

PortableTab is a Python library that allows for serialization of typed tables into a set of files, as well as deserialization of specific rows extracted from the files.

Features

The serialized files are independent of OS and CPU architecture, so it can be used to create portable table which is useful when working with large datasets that need to be shared between different systems or environments.

It also allows fast deserialization of only specified rows without loading the entire table into memory, so it does not take time to load and deserialize the table on the first access, nor consume memory during execution.

  • Capn' Proto is used for serialization, making the file format portable.
  • Since PortableTab uses mmap for file access, it does not consume much memory even when handling large tables.
  • Indexes on strings are created using Marisa-trie, the output files are also portable and accessible using mmap.

Limitations

The tables are serialized into compact files so they cannot be dynamically modified.

  • Rows can only be retrieved at their specified position. If you want to access by an attribute such as id, you must create an index on that attribute.
  • Updating records in serialized files is possible but very slow.
  • It is not possible to insert rows in the middle of a serialized file. If you want to insert rows in the middle, the only way is to deserialize the entire table and recreate another table.

How to use

Please refer to the documentation at PortableTab Document.

Development status

Unstable alpha version.

License

This package is available according to the MIT license.

Author

Takeshi SAGARA sagara@info-proto.com

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

portabletab-0.3.7.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

portabletab-0.3.7-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file portabletab-0.3.7.tar.gz.

File metadata

  • Download URL: portabletab-0.3.7.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/5.15.0-138-generic

File hashes

Hashes for portabletab-0.3.7.tar.gz
Algorithm Hash digest
SHA256 1ea6ad117603e2366e7b36e824b85a990ff3a638d855ce55495c07159592f1de
MD5 4c8449cb032b76a66ecad8c201340d00
BLAKE2b-256 0d1aa3d5c7056d977b98976179384e3534867e650d3aa9ed5c0eebaf8bdf539b

See more details on using hashes here.

File details

Details for the file portabletab-0.3.7-py3-none-any.whl.

File metadata

  • Download URL: portabletab-0.3.7-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/5.15.0-138-generic

File hashes

Hashes for portabletab-0.3.7-py3-none-any.whl
Algorithm Hash digest
SHA256 9d48bcfda2a2a16ee59a7b694827115c055ee3230b28d14e5c570dd0390e69fe
MD5 7a1fbfafeac9dd5126563432035c90d9
BLAKE2b-256 0975aae8f3320e0e6df1258b38370e0b433503783d52530de84dc352d929da54

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