Skip to main content

Python package for serializing tables in portable format with Capnp.

Project description

PortableTab

Python 3.8 Python 3.9 Python 3.10 Python 3.11 Python 3.12 Python 3.13

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.post1.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.post1-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: portabletab-0.3.7.post1.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-140-generic

File hashes

Hashes for portabletab-0.3.7.post1.tar.gz
Algorithm Hash digest
SHA256 d3ca9744d882a38ceb7fdd782df66def68108a2a7ead6e401e8bad1758b211e8
MD5 3bf6cbcea48c38a4aeef64bcc2756e68
BLAKE2b-256 968ff0c07ad037d47839a39fbe4d09f7e13e07b9f4f17ddef6ca785cbba8f707

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for portabletab-0.3.7.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 f8f3b02b01f8d31a3753cf433af972d65b1827a27d933262333c6ebebbfbaf42
MD5 0b6e20969333fb4fdb67210d2fe3c683
BLAKE2b-256 34622708293c44453f3e3f979114638be47e3fd38790227b1bd30399ab06d487

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