Skip to main content

Pickled Data Object: Python data persistence for apps with simple needs.

Project description

Description

Pickled Data Object (pkldo) is method #470 for saving Python data to a file. It provides functionality for create, retrieve, update, and delete operations and uses Python’s built-in Pickle routines. It also performs operations atomically and offers file integrity. Its best fit is for applications with basic data persistence needs.

Development Status

  • Tested on BSD and Linux.

  • Windows compatibility will be next.

  • Documentation in progress.

Quick Example

Here’s a brief example of how to use a Pickled Data Object:

>>> import pkldo
>>> class Test(pkldo.Pdo):
...     pass
...
>>> a = Test()
>>> a.some_data = "howdy"
>>> a.create_pdo('/tmp/some_file')
>>> b = Test()
>>> b.load_pdo('/tmp/some_file')
>>> b.some_data
'howdy'
>>> b.some_data = "hmmmm"
>>> b.save_pdo()
>>> c = Test()
>>> c.load_pdo('/tmp/some_file')
>>> c.some_data
'hmmmm'
>>> c.delete_pdo()
>>>

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

pkldo-0.3.1.tar.gz (8.5 kB view details)

Uploaded Source

File details

Details for the file pkldo-0.3.1.tar.gz.

File metadata

  • Download URL: pkldo-0.3.1.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pkldo-0.3.1.tar.gz
Algorithm Hash digest
SHA256 fa8ad3a82d66394100e311615ff9a2e9a7af311e646816f93417d0ec80a9e378
MD5 1dd76d9efec590d62d463110a3207c85
BLAKE2b-256 4658ae39604968a2d28f313eca36c6fa13e71def7dbdca0d18eddcaed40a49b6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page