PeepDB -- version 0.1 "Germ"


Latest PeepDB and latest example.

PeepDB v0.1 "Germ" and example for this version.

PeepDB v0.0 "Kelvin" and example for this version.

Description and license

PeepDB is a pre-alpha Python module. The Great Goal is to create interface for working with PalmOS databases (PDB files).

License is GPL. PeepDB was written by me, Alexey Vyskubov.

Pronounce PeepDB as "Pee-PDB"

Disclaimer and so on

This Python module was developed to destroy all the data on your hard disk and to do the thousand of other nasty things. If it does not do it -- it's a pure accident :)

Now, in version 0.1, this module can destroy all the data in your Palm device too :)


For version 0.0 "Kelvin"

In the current state the only thing you can do with this module is to get some information from PDB file. Example program dumps all records from the PDB file to the stdout (please look into the code! -- you have to put filename there).

By the way: if you're loading broken PDB -- it's your problem. There are no internal checks still.

For version 0.1 "Germ"

Now you can use save_to_file() method and shrink PDB's with calculate_offsets method. Also basic create_new_record funcionality was implemented. Example program loads PDB from file, duplicates the last record, saves new PDB, loads it and dumps all records to stdout. Please look into the code! -- you have to put filename there.

By the way: if you're loading PDB saved with save_to_file() into your Palm device -- it's your problem. :)

Internal structure

PeepDB contains four classes: data_header (some internal class), pdb_header (an object which represents PDB file header), record_header (an object represents headers for records in pdb file) and the most important palmdb class. The latter is an object which represents the whole database.

You can load pdb file into palmdb object using

p = peepdb.palmdb('load', filename)

After that you'll get p.records -- the list of all records in PDB. Every element of this list is a list too: [record header, record content].

Look into (look for class record_header) to find what you can do with records' headers. You can also look for pdb_header -- p.main_header is the PDB header and an instance of that class.

Future plans

A lot of. Look for FIXME's in code.

Contact me

Mail me if you have questions, suggestions (or maybe even patches?!). Please send spam, flame and other shit to this mailbox.