Skip to content

PickleDB use pickle file as database similiar as DBM to save state of complex objects

License

Notifications You must be signed in to change notification settings

valdergallo/pickle_db

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License PyPI Downloads

PickleDB

Save attributes of one Object in one pickle file to reload object state after python program was closed.

You can use to save singletons of settings or progress state of one program.

This project was basead in DBM :D

Features

  • auto manager file
  • save pickle in differents protocol
  • reload object with same state before panic problem
  • share setings/state bettween multiple aplications
  • delete/create/update attribute from object auto will be saved in file

To install

    pip install pickle-db

Usage

    # create cache
    $ python
    >> from pickle_db import PickleDB
    >> db = PickleDB("cache.pcl")
    >> db.name = "Wayne"
    >> exit()

    # list file created by pickle_db
    $ ls
    cache.pcl

    # reload file create by pickle_db
    $ python
    >> from pickle_db import PickleDB
    >> db = PickleDB("cache.pcl")
    >> db.name
    "Wayne"

About

PickleDB use pickle file as database similiar as DBM to save state of complex objects

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages