Package couchdbkit :: Package designer :: Module fs :: Class FSDoc
[hide private]
[frames] | no frames]

Class FSDoc

source code

object --+
         |
        FSDoc

Instance Methods [hide private]
 
__init__(self, path, create=False, docid=None, is_ddoc=True)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
get_id(self)
if there is an _id file, docid is extracted from it, else we take the current folder name.
source code
 
__repr__(self)
repr(x)
source code
 
__str__(self)
str(x)
source code
 
create(self) source code
 
push(self, dbs, atomic=True, force=False)
Push a doc to a list of database `dburls`.
source code
 
attachment_stub(self, name, filepath) source code
 
doc(self, db=None, with_attachments=True, force=False)
Function to reetrieve document object from document directory.
source code
 
check_ignore(self, item) source code
 
dir_to_fields(self, current_dir='', depth=0, manifest=[])
process a directory and get all members
source code
 
_process_attachments(self, path, vendor=None)
the function processing directory to yeld attachments.
source code
 
attachments(self)
This function yield a tuple (name, filepath) corresponding to each attachment (vendor included) in the couchapp.
source code
 
index(self, dburl, index) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, path, create=False, docid=None, is_ddoc=True)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

push(self, dbs, atomic=True, force=False)

source code 

Push a doc to a list of database `dburls`. If noatomic is true each attachments will be sent one by one.

doc(self, db=None, with_attachments=True, force=False)

source code 

Function to reetrieve document object from document directory. If `with_attachments` is True attachments will be included and encoded

attachments(self)

source code 

This function yield a tuple (name, filepath) corresponding to each attachment (vendor included) in the couchapp. `name` is the name of attachment in `_attachments` member and `filepath` the path to the attachment on the disk.

attachments are processed later to allow us to send attachments inline or one by one.