Package Gnumed :: Package timelinelib :: Package db
[frames] | no frames]

Package db

source code

Submodules

Functions
 
db_open(path, use_wide_date_range=False)
Create timeline database that can read and write timeline data from and to persistent storage identified by path.
source code
 
file_starts_with(path, start) source code
 
read_first_line(path) source code
 
copy_db(from_db, to_db)
Copy all content from one db to another.
source code

Imports: os, MemoryDB, create_in_memory_tutorial_db, TimelineIOError, Category, Event, TimePeriod, ViewProperties


Function Details

db_open(path, use_wide_date_range=False)

source code 

Create timeline database that can read and write timeline data from and to persistent storage identified by path.

Throw a TimelineIOError exception if not able to read from the given path.

Valid values for path:

  • special string ":tutorial:"
  • string with suffix .timeline
  • string with suffix .ics
  • string denoting a directory

copy_db(from_db, to_db)

source code 

Copy all content from one db to another.

to_db is assumed to have no categories (conflicting category names are not handled).