Skip to main content

tpcollections

Python Transactional Persistent Collections, backed by sqlite.

Descripton

This is a package that gives you a set of Python collections (Mappings, Lists, Sequence, and Deques) that are backed by SQLite. This allows you to

  • Share collections between threads or processes safely.
  • Maintain transactional safety across one or more collections.
  • Persist collections efficiently, safely, and easily to disk, across one or more file.
  • Manage collections that have expiring elements.

And do it all in any combination you wish without needing to worry about specific details.

Supported collection types

  • Mapping, ordered by key.
  • OrderedMapping, remembering insertion order.
  • Set, ordered by key.
  • OrderedSet, remembering insertion order.
  • ExpiringMapping, with key entries that automatically time out and remove themselves.
  • ExpiringOrderedMapping.
  • ExpiringSet.
  • ExpiringOrderedSet.
  • Sequence.
  • Deque.

There may be more in the future, if needed.

Features

  • Supports transactions, nestable through savepoints.
  • Supports intelligent WAL mode, making decisions automatically that achieve the maximum performance while preserving durability even in the face of power failure.
    • When not forced one way or the other, this means enabling WAL mode when no databases are attached, and disabling it upon attaching databases.
  • Supports many collections in one database file, ensuring all the used tables are the right type and that there are no collisions.
  • Supports multiple attached database files, maintaining transactions, consistency, and durability across the entire set.
  • Supports
  • Supported and tested on every reasonable version of Python and SQLite.
    • Tests are run all supported versions of Python, and on all in-support versions of RHEL, CentOS, Fedora, Debian, Ubuntu, and Alpine Linux.
      • This includes versions of Python or SQLite otherwise considered out of support by upstream. At the time of this writing, this includes CentOS 7 and therefore Python 3.6.8 and SQLite 3.7.17.
      • This does not include extended support (i.e. Centos 6 and Debian Jessie), because I haven't found a free and easy way to automate testing for them. I would be happy to accept contributions to add this support.
  • SQLite features are version-tested, selecting the most appropriate features available on the platform. This does mean that database files might not be able to be moved from a newer version of SQLite to an older one, particularly if you move from a version that supports STRICT and WITHOUT ROWID to one that doesn't

Prior art

TBC.

Feature comparison to other libraries

Metadata

Release files for tpcollections 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tpcollections 0.1.1
File Size Uploaded Provenance Actions
tpcollections-0.1.1.tar.gz 30.5 kB Without provenance Details for tpcollections-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tpcollections 0.1.1
File Interpreter ABI Platform Actions
tpcollections-0.1.1-py3-none-any.whl Python 3 none any Details for tpcollections-0.1.1-py3-none-any.whl

Total release size: 57.7 kB

Release files / tpcollections-0.1.1.tar.gz

Download URL tpcollections-0.1.1.tar.gz
Size 30.5 kB
Tags Source
SHA-256 checksum
How to use checksums
931023cfb6f08f49c5bac645387aef95fb4f90d99c7b8611bc9dc2dca530bac2
BLAKE2b-256 checksum
How to use checksums
0c30b0bc846a3eed8b6fa145f4ce43e54b0efe454886e0e070fa8fbd66ce37db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.28.2

Release files / tpcollections-0.1.1-py3-none-any.whl

Download URL tpcollections-0.1.1-py3-none-any.whl
Size 27.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c1dda12a3b5df3577ff175be8f671ce2542643e3ebf7e67ac20fffe1d370f225
BLAKE2b-256 checksum
How to use checksums
dd2d7f3a026a4c211a1eddc6f4a5cc2a23949d3040cf5f278dde8bd50c62d973
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.28.2

Security for tpcollections 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page