The gramps.gen.proxy Module¶
Proxy Base¶
Proxy class for the Gramps databases. Filter out all data marked private.
- class gramps.gen.proxy.proxybase.ProxyCursor(get_raw, get_handles)[source]¶
Bases:
objectA cursor for moving through proxied data.
- class gramps.gen.proxy.proxybase.ProxyDbBase(db)[source]¶
Bases:
DbReadBaseProxyDbBase is a base class for building a proxy to a Gramps database. This class attempts to implement functions that are likely to be common among proxy classes. Functions that are not likely to be common raise a NotImplementedError to remind the developer to implement those functions.
Real database proxy classes can inherit from this class to make sure the database interface is properly implemented.
- get_child_reference_types()[source]¶
returns a list of all child reference types associated with Family instances in the database
- get_citation_cursor()[source]¶
Return a reference to a cursor over Citation objects. Example use:
with get_citation_cursor() as cursor: for handle, citation in cursor: # process citation object pointed to by the handle
- get_citation_from_gramps_id(val)[source]¶
Finds a Citation in the database from the passed gramps’ ID. If no such Citation exists, None is returned.
- get_citation_from_handle(handle)[source]¶
Finds a Citation in the database from the passed gramps handle. If no such Citation exists, None is returned.
- get_citation_handles(sort_handles=False, locale=<gramps.gen.utils.grampslocale.GrampsLocale object>)[source]¶
Return a list of database handles, one handle for each Citation in the database.
- get_event_attribute_types()[source]¶
returns a list of all Attribute types associated with Event instances in the database
- get_event_cursor()[source]¶
Return a reference to a cursor over Family objects. Example use:
with get_event_cursor() as cursor: for handle, event in cursor: # process event object pointed to by the handle
- get_event_from_gramps_id(val)[source]¶
Finds an Event in the database from the passed Gramps ID. If no such Event exists, None is returned.
- get_event_from_handle(handle)[source]¶
Finds a Event in the database from the passed gramps handle. If no such Event exists, None is returned.
- get_event_handles()[source]¶
Return a list of database handles, one handle for each Event in the database.
- get_event_roles()[source]¶
returns a list of all custom event role names associated with Event instances in the database
- get_family_attribute_types()[source]¶
returns a list of all Attribute types associated with Family instances in the database
- get_family_cursor()[source]¶
Return a reference to a cursor over Family objects. Example use:
with get_family_cursor() as cursor: for handle, family in cursor: # process family object pointed to by the handle
- get_family_from_gramps_id(val)[source]¶
Finds a Family in the database from the passed Gramps ID. If no such Family exists, None is returned.
- get_family_from_handle(handle)[source]¶
Finds a Family in the database from the passed gramps handle. If no such Family exists, None is returned.
- get_family_handles(sort_handles=False, locale=<gramps.gen.utils.grampslocale.GrampsLocale object>)[source]¶
Return a list of database handles, one handle for each Family in the database. If sort_handles is True, the list is sorted by surnames
- get_family_relation_types()[source]¶
returns a list of all relationship types associated with Family instances in the database
- get_media_attribute_types()[source]¶
returns a list of all Attribute types associated with Media and MediaRef instances in the database
- get_media_cursor()[source]¶
Return a reference to a cursor over Media objects. Example use:
with get_media_cursor() as cursor: for handle, media in cursor: # process media object pointed to by the handle
- get_media_from_gramps_id(val)[source]¶
Finds a Media in the database from the passed gramps’ ID. If no such Media exists, None is returned.
- get_media_from_handle(handle)[source]¶
Finds an Object in the database from the passed gramps handle. If no such Object exists, None is returned.
- get_media_handles(sort_handles=False, locale=<gramps.gen.utils.grampslocale.GrampsLocale object>)[source]¶
Return a list of database handles, one handle for each Media in the database.
- get_name_group_keys()[source]¶
Return the defined names that have been assigned to a default grouping
- get_name_types()[source]¶
returns a list of all custom names types associated with Person instances in the database
- get_note_cursor()[source]¶
Return a reference to a cursor over Note objects. Example use:
with get_note_cursor() as cursor: for handle, note in cursor: # process note object pointed to by the handle
- get_note_from_gramps_id(val)[source]¶
Finds a Note in the database from the passed gramps’ ID. If no such Note exists, None is returned.
- get_note_from_handle(handle)[source]¶
Finds a Note in the database from the passed gramps handle. If no such Note exists, None is returned.
- get_note_handles()[source]¶
Return a list of database handles, one handle for each Note in the database.
- get_note_types()[source]¶
returns a list of all custom note types associated with Note instances in the database
- get_number_of_repositories()[source]¶
Return the number of source repositories currently in the database.
- get_origin_types()[source]¶
returns a list of all custom origin types associated with Person/Surname instances in the database
- get_person_attribute_types()[source]¶
returns a list of all Attribute types associated with Person instances in the database
- get_person_cursor()[source]¶
Return a reference to a cursor over Person objects. Example use:
with get_person_cursor() as cursor: for handle, person in cursor: # process person object pointed to by the handle
- get_person_from_gramps_id(val)[source]¶
Finds a Person in the database from the passed Gramps ID. If no such Person exists, None is returned.
- get_person_from_handle(handle)[source]¶
Finds a Person in the database from the passed gramps handle. If no such Person exists, None is returned.
- get_person_handles(sort_handles=False, locale=<gramps.gen.utils.grampslocale.GrampsLocale object>)[source]¶
Return a list of database handles, one handle for each Person in the database. If sort_handles is True, the list is sorted by surnames
- get_place_cursor()[source]¶
Return a reference to a cursor over Place objects. Example use:
with get_place_cursor() as cursor: for handle, place in cursor: # process place object pointed to by the handle
- get_place_from_gramps_id(val)[source]¶
Finds a Place in the database from the passed gramps’ ID. If no such Place exists, None is returned.
- get_place_from_handle(handle)[source]¶
Finds a Place in the database from the passed gramps handle. If no such Place exists, None is returned.
- get_place_handles(sort_handles=False, locale=<gramps.gen.utils.grampslocale.GrampsLocale object>)[source]¶
Return a list of database handles, one handle for each Place in the database.
- get_raw_citation_data(handle)[source]¶
Return raw (serialized and pickled) Citation object from handle
- get_raw_repository_data(handle)[source]¶
Return raw (serialized and pickled) Repository object from handle
- get_repository_cursor()[source]¶
Return a reference to a cursor over Repository objects. Example use:
with get_repository_cursor() as cursor: for handle, repository in cursor: # process repository object pointed to by the handle
- get_repository_from_gramps_id(val)[source]¶
Finds a Repository in the database from the passed gramps’ ID. If no such Repository exists, None is returned.
- get_repository_from_handle(handle)[source]¶
Finds a Repository in the database from the passed gramps handle. If no such Repository exists, None is returned.
- get_repository_handles()[source]¶
Return a list of database handles, one handle for each Repository in the database.
- get_repository_types()[source]¶
returns a list of all custom repository types associated with Repository instances in the database
- get_researcher()[source]¶
returns the Researcher instance, providing information about the owner of the database
- get_source_attribute_types()[source]¶
returns a list of all Attribute types associated with Source/Citation instances in the database
- get_source_cursor()[source]¶
Return a reference to a cursor over Source objects. Example use:
with get_source_cursor() as cursor: for handle, source in cursor: # process source object pointed to by the handle
- get_source_from_gramps_id(val)[source]¶
Finds a Source in the database from the passed gramps’ ID. If no such Source exists, None is returned.
- get_source_from_handle(handle)[source]¶
Finds a Source in the database from the passed gramps handle. If no such Source exists, None is returned.
- get_source_handles(sort_handles=False, locale=<gramps.gen.utils.grampslocale.GrampsLocale object>)[source]¶
Return a list of database handles, one handle for each Source in the database.
- get_source_media_types()[source]¶
returns a list of all custom source media types associated with Source instances in the database
- get_tag_cursor()[source]¶
Return a reference to a cursor over Tag objects. Example use:
with get_tag_cursor() as cursor: for handle, tag in cursor: # process tag object pointed to by the handle
- get_tag_from_handle(handle)[source]¶
Finds a Tag in the database from the passed gramps handle. If no such Tag exists, None is returned.
- get_tag_from_name(val)[source]¶
Finds a Tag in the database from the passed tag name. If no such Tag exists, None is returned.
- get_tag_handles(sort_handles=False, locale=<gramps.gen.utils.grampslocale.GrampsLocale object>)[source]¶
Return a list of database handles, one handle for each Tag in the database.
- get_url_types()[source]¶
returns a list of all custom names types associated with Url instances in the database
- static gfilter(predicate, obj)[source]¶
Returns obj if predicate is True or not callable, else returns None
- has_citation_handle(handle)[source]¶
returns True if the handle exists in the current Citation database.
- has_family_handle(handle)[source]¶
Returns True if the handle exists in the current Family database.
- has_person_handle(handle)[source]¶
Returns True if the handle exists in the current Person database.
- has_repository_handle(handle)[source]¶
returns True if the handle exists in the current Repository database.
- has_source_handle(handle)[source]¶
returns True if the handle exists in the current Source database.
- include_citation = None¶
- include_event = None¶
- include_family = None¶
- include_media = None¶
- include_note = None¶
- include_person = None¶
- include_place = None¶
- include_repository = None¶
- include_something(handle, obj=None)[source]¶
Model predicate. Returns True if object referred to by handle is to be included, otherwise returns False.
- include_source = None¶
- include_tag = None¶
- iter_citation_handles()[source]¶
Return an iterator over database handles, one handle for each Citation in the database.
- iter_event_handles()[source]¶
Return an iterator over database handles, one handle for each Event in the database.
- iter_family_handles()[source]¶
Return an iterator over database handles, one handle for each Family in the database.
- iter_media_handles()[source]¶
Return an iterator over database handles, one handle for each Media Object in the database.
- iter_note_handles()[source]¶
Return an iterator over database handles, one handle for each Note in the database.
- iter_person_handles()[source]¶
Return an iterator over database handles, one handle for each Person in the database.
- iter_place_handles()[source]¶
Return an iterator over database handles, one handle for each Place in the database.
- iter_repository_handles()[source]¶
Return an iterator over database handles, one handle for each Repository in the database.
- iter_source_handles()[source]¶
Return an iterator over database handles, one handle for each Source in the database.
Filter¶
Proxy class for the Gramps databases. Apply filter
- class gramps.gen.proxy.filter.FilterProxyDb(db, person_filter=None, event_filter=None, note_filter=None, user=None)[source]¶
Bases:
ProxyDbBaseA proxy to a Gramps database. This proxy will act like a Gramps database, but all data that does not match the provided filters will be hidden from the user.
- find_backlink_handles(handle, include_classes=None)[source]¶
Find all objects that hold a reference to the object handle. Returns an iterator over a list of (class_name, handle) tuples.
- Parameters:
handle (database handle) – handle of the object to search for.
include_classes (list of class names) – list of class names to include in the results. Default: None means include all classes.
This default implementation does a sequential scan through all the primary object databases and is very slow. Backends can override this method to provide much faster implementations that make use of additional capabilities of the backend.
Note that this is a generator function, it returns a iterator for use in loops. If you want a list of the results use:
> result_list = list(find_backlink_handles(handle))
- get_citation_from_gramps_id(val)[source]¶
Finds a Citation in the database from the passed Gramps ID. If no such Citation exists, None is returned.
- get_citation_from_handle(handle)[source]¶
Finds a Citation in the database from the passed Gramps ID. If no such Citation exists, None is returned.
- get_event_from_gramps_id(val)[source]¶
Finds an Event in the database from the passed Gramps ID. If no such Event exists, None is returned.
- get_event_from_handle(handle)[source]¶
Finds a Event in the database from the passed Gramps ID. If no such Event exists, None is returned.
- get_event_handles()[source]¶
Return a list of database handles, one handle for each Event in the database.
- get_family_from_gramps_id(val)[source]¶
Finds a Family in the database from the passed Gramps ID. If no such Family exists, None is returned.
- get_family_from_handle(handle)[source]¶
Finds a Family in the database from the passed Gramps ID. If no such Family exists, None is returned.
- get_family_handles(sort_handles=False, locale=<gramps.gen.utils.grampslocale.GrampsLocale object>)[source]¶
Return a list of database handles, one handle for each Family in the database.
- Parameters:
sort_handles (bool) – If True, the list is sorted by surnames.
locale (A GrampsLocale object.) – The locale to use for collation.
- get_media_from_gramps_id(val)[source]¶
Finds a Media in the database from the passed Gramps ID. If no such Media exists, None is returned.
- get_media_from_handle(handle)[source]¶
Finds a Media in the database from the passed Gramps handle. If no such Object exists, None is returned.
- get_note_from_gramps_id(val)[source]¶
Finds a Note in the database from the passed Gramps ID. If no such Note exists, None is returned.
- get_note_from_handle(handle)[source]¶
Finds a Note in the database from the passed Gramps ID. If no such Note exists, None is returned.
- get_note_handles()[source]¶
Return a list of database handles, one handle for each Note in the database.
- get_person_from_gramps_id(val)[source]¶
Finds a Person in the database from the passed Gramps ID. If no such Person exists, None is returned.
- get_person_from_handle(handle)[source]¶
Finds a Person in the database from the passed Gramps ID. If no such Person exists, None is returned.
- get_person_handles(sort_handles=False, locale=<gramps.gen.utils.grampslocale.GrampsLocale object>)[source]¶
Return a list of database handles, one handle for each Person in the database.
- Parameters:
sort_handles (bool) – If True, the list is sorted by surnames.
locale (A GrampsLocale object.) – The locale to use for collation.
- get_place_from_gramps_id(val)[source]¶
Finds a Place in the database from the passed Gramps ID. If no such Place exists, None is returned.
- get_place_from_handle(handle)[source]¶
Finds a Place in the database from the passed Gramps handle. If no such Place exists, None is returned.
- get_repository_from_gramps_id(val)[source]¶
Finds a Repository in the database from the passed Gramps ID. If no such Repository exists, None is returned.
- get_repository_from_handle(handle)[source]¶
Finds a Repository in the database from the passed Gramps ID. If no such Repository exists, None is returned.
- get_source_from_gramps_id(val)[source]¶
Finds a Source in the database from the passed Gramps ID. If no such Source exists, None is returned.
- get_source_from_handle(handle)[source]¶
Finds a Source in the database from the passed Gramps ID. If no such Source exists, None is returned.
- has_family_handle(handle)[source]¶
returns True if the handle exists in the current Family database.
- has_person_handle(handle)[source]¶
returns True if the handle exists in the current Person database.
- iter_event_handles()[source]¶
Return an iterator over database handles, one handle for each Event in the database.
- iter_family_handles()[source]¶
Return an iterator over database handles, one handle for each Family in the database.
- iter_note_handles()[source]¶
Return an iterator over database handles, one handle for each Note in the database.
- iter_person_handles()[source]¶
Return an iterator over database handles, one handle for each Person in the database.
Living¶
Proxy class for the Gramps databases. Filter out all living people.
- class gramps.gen.proxy.living.LivingProxyDb(dbase, mode, current_year=None, years_after_death=0, llocale=<gramps.gen.utils.grampslocale.GrampsLocale object>)[source]¶
Bases:
ProxyDbBaseA proxy to a Gramps database. This proxy will act like a Gramps database, but all living people will be hidden from the user.
- MODE_EXCLUDE_ALL = 0¶
- MODE_INCLUDE_ALL = 99¶
- MODE_INCLUDE_FULL_NAME_ONLY = 2¶
- MODE_INCLUDE_LAST_NAME_ONLY = 1¶
- MODE_REPLACE_COMPLETE_NAME = 3¶
- find_backlink_handles(handle, include_classes=None)[source]¶
Find all objects that hold a reference to the object handle. Returns an iterator over a list of (class_name, handle) tuples.
- Parameters:
handle (database handle) – handle of the object to search for.
include_classes (list of class names) – list of class names to include in the results. Default: None means include all classes.
This default implementation does a sequential scan through all the primary object databases and is very slow. Backends can override this method to provide much faster implementations that make use of additional capabilities of the backend.
Note that this is a generator function, it returns a iterator for use in loops. If you want a list of the results use:
> result_list = list(find_backlink_handles(handle))
- get_family_from_gramps_id(val)[source]¶
Finds a Family in the database from the passed Gramps ID. If no such Family exists, None is returned.
- get_family_from_handle(handle)[source]¶
Finds a Family in the database from the passed handle. If no such Family exists, None is returned.
- get_person_from_gramps_id(val)[source]¶
Finds a Person in the database from the passed Gramps ID. If no such Person exists, None is returned.
- get_person_from_handle(handle)[source]¶
Finds a Person in the database from the passed Gramps ID. If no such Person exists, None is returned.
Private¶
Proxy class for the Gramps databases. Filter out all data marked private.
- class gramps.gen.proxy.private.PrivateProxyDb(db)[source]¶
Bases:
ProxyDbBaseA proxy to a Gramps database. This proxy will act like a Gramps database, but all data marked private will be hidden from the user.
- find_backlink_handles(handle, include_classes=None)[source]¶
Find all objects that hold a reference to the object handle. Returns an iterator over a list of (class_name, handle) tuples.
- Parameters:
handle (database handle) – handle of the object to search for.
include_classes (list of class names) – list of class names to include in the results. Default: None means include all classes.
This default implementation does a sequential scan through all the primary object databases and is very slow. Backends can override this method to provide much faster implementations that make use of additional capabilities of the backend.
Note that this is a generator function, it returns a iterator for use in loops. If you want a list of the results use:
> result_list = list(find_backlink_handles(handle))
- get_citation_from_gramps_id(val)[source]¶
Finds a Citation in the database from the passed Gramps ID. If no such Citation exists, None is returned.
- get_citation_from_handle(handle)[source]¶
Finds a Citation in the database from the passed Gramps ID. If no such Citation exists, None is returned.
- get_event_from_gramps_id(val)[source]¶
Finds an Event in the database from the passed Gramps ID. If no such Event exists, None is returned.
- get_event_from_handle(handle)[source]¶
Finds a Event in the database from the passed Gramps ID. If no such Event exists, None is returned.
- get_family_from_gramps_id(val)[source]¶
Finds a Family in the database from the passed Gramps ID. If no such Family exists, None is returned.
- get_family_from_handle(handle)[source]¶
Finds a Family in the database from the passed Gramps ID. If no such Family exists, None is returned.
- get_media_from_gramps_id(val)[source]¶
Finds a Media in the database from the passed Gramps ID. If no such Media exists, None is returned.
- get_media_from_handle(handle)[source]¶
Finds an Object in the database from the passed Gramps ID. If no such Object exists, None is returned.
- get_note_from_gramps_id(val)[source]¶
Finds a Note in the database from the passed Gramps ID. If no such Note exists, None is returned.
- get_note_from_handle(handle)[source]¶
Finds a Note in the database from the passed Gramps ID. If no such Note exists, None is returned.
- get_person_from_gramps_id(val)[source]¶
Finds a Person in the database from the passed Gramps ID. If no such Person exists, None is returned.
- get_person_from_handle(handle)[source]¶
Finds a Person in the database from the passed Gramps ID. If no such Person exists, None is returned.
- get_place_from_gramps_id(val)[source]¶
Finds a Place in the database from the passed Gramps ID. If no such Place exists, None is returned.
- get_place_from_handle(handle)[source]¶
Finds a Place in the database from the passed Gramps ID. If no such Place exists, None is returned.
- get_repository_from_gramps_id(val)[source]¶
Finds a Repository in the database from the passed Gramps ID. If no such Repository exists, None is returned.
- get_repository_from_handle(handle)[source]¶
Finds a Repository in the database from the passed Gramps ID. If no such Repository exists, None is returned.
- get_source_from_gramps_id(val)[source]¶
Finds a Source in the database from the passed Gramps ID. If no such Source exists, None is returned.
- get_source_from_handle(handle)[source]¶
Finds a Source in the database from the passed Gramps ID. If no such Source exists, None is returned.
- has_citation_handle(handle)[source]¶
returns True if the handle exists in the current Citation database.
- has_person_handle(handle)[source]¶
returns True if the handle exists in the current Person database.
- has_repository_handle(handle)[source]¶
Return True if the handle exists in the current Repository database.
- has_source_handle(handle)[source]¶
returns True if the handle exists in the current Source database.
- gramps.gen.proxy.private.copy_addresses(db, original_obj, clean_obj)[source]¶
Copies addresses from one object to another - excluding references to private addresses.
- Parameters:
db (DbBase) – Gramps database to which the references belongs
original_obj (AddressBase) – Object that may have addresses
clean_obj – Object that will have only non-private addresses
- Returns:
Nothing
- gramps.gen.proxy.private.copy_associations(db, original_obj, clean_obj)[source]¶
Copies associations from one object to another - excluding references to private notes.
- Parameters:
db (DbBase) – Gramps database to which the references belongs
original_obj (Base) – Object that may have private references
clean_obj – Object that will have only non-private references
- Returns:
Nothing
- gramps.gen.proxy.private.copy_attributes(db, original_obj, clean_obj)[source]¶
Copies attributes from one object to another - excluding references to private attributes.
- Parameters:
db (DbBase) – Gramps database to which the references belongs
original_obj (AttributeBase) – Object that may have private references
clean_obj – Object that will have only non-private references
- Returns:
Nothing
- gramps.gen.proxy.private.copy_citation_ref_list(db, original_obj, clean_obj)[source]¶
Copies citation references from one object to another - excluding references to private citations, and references to citations that refer to private sources.
- Parameters:
db (DbBase) – Gramps database to which the references belongs
original_obj (CitationBase) – Object that may have private references
clean_obj – Object that will have only non-private references
- Returns:
Nothing
- gramps.gen.proxy.private.copy_lds_ords(db, original_obj, clean_obj)[source]¶
Copies LDS ORDs from one object to another - excluding references to private LDS ORDs.
- Parameters:
db (DbBase) – Gramps database to which the references belongs
original_obj (LdsOrdBase) – Object that may have LDS ORDs
clean_obj – Object that will have only non-private LDS ORDs
- Returns:
Nothing
- gramps.gen.proxy.private.copy_media_ref_list(db, original_obj, clean_obj)[source]¶
Copies media references from one object to another - excluding private references and references to private objects.
- Parameters:
db (DbBase) – Gramps database to which the references belongs
original_obj (MediaBase) – Object that may have private references
clean_obj – Object that will have only non-private references
- Returns:
Nothing
- gramps.gen.proxy.private.copy_notes(db, original_obj, clean_obj)[source]¶
Copies notes from one object to another - excluding references to private notes.
- Parameters:
db (DbBase) – Gramps database to which the references belongs
original_obj (NoteBase) – Object that may have private references
clean_obj – Object that will have only non-private references
- Returns:
Nothing
- gramps.gen.proxy.private.copy_srcattributes(db, original_obj, clean_obj)[source]¶
Copies srcattributes from one object to another - excluding references to private srcattributes.
- Parameters:
db (DbBase) – Gramps database to which the references belongs
original_obj (SrcAttributeBase) – Object that may have private references
clean_obj – Object that will have only non-private references
- Returns:
Nothing
- gramps.gen.proxy.private.copy_urls(db, original_obj, clean_obj)[source]¶
Copies urls from one object to another - excluding references to private urls.
- Parameters:
db (DbBase) – Gramps database to which the references belongs
original_obj (UrlBase) – Object that may have urls
clean_obj – Object that will have only non-private urls
- Returns:
Nothing
- gramps.gen.proxy.private.sanitize_address(db, address)[source]¶
Create a new Address instance based off the passed Address instance. The returned instance has all private records removed from it.
- gramps.gen.proxy.private.sanitize_citation(db, citation)[source]¶
Create a new Citation instance based off the passed Citation instance. The returned instance has all private records removed from it.
- gramps.gen.proxy.private.sanitize_event(db, event)[source]¶
Create a new Event instance based off the passed Event instance. The returned instance has all private records removed from it.
- gramps.gen.proxy.private.sanitize_event_ref(db, event_ref)[source]¶
Create a new EventRef instance based off the passed EventRef instance. The returned instance has all private records removed from it.
- gramps.gen.proxy.private.sanitize_family(db, family)[source]¶
Create a new Family instance based off the passed Family instance. The returned instance has all private records removed from it.
- gramps.gen.proxy.private.sanitize_lds_ord(db, lds_ord)[source]¶
Create a new LdsOrd instance based off the passed LdsOrd instance. The returned instance has all private records removed from it.
- gramps.gen.proxy.private.sanitize_media(db, media)[source]¶
Create a new Media instance based off the passed Media instance. The returned instance has all private records removed from it.
- gramps.gen.proxy.private.sanitize_media_ref(db, media_ref)[source]¶
Create a new MediaRef instance based off the passed MediaRef instance. The returned instance has all private records removed from it.
- gramps.gen.proxy.private.sanitize_name(db, name)[source]¶
Create a new Name instance based off the passed Name instance. The returned instance has all private records removed from it.
- gramps.gen.proxy.private.sanitize_person(db, person)[source]¶
Create a new Person instance based off the passed Person instance. The returned instance has all private records removed from it.
- gramps.gen.proxy.private.sanitize_place(db, place)[source]¶
Create a new Place instance based off the passed Place instance. The returned instance has all private records removed from it.
- gramps.gen.proxy.private.sanitize_repository(db, repository)[source]¶
Create a new Repository instance based off the passed Repository instance. The returned instance has all private records removed from it.
- Parameters:
db (DbBase) – Gramps database to which the Person object belongs
repository (Repository) – source Repository object that will be copied with privacy records removed
- Returns:
‘cleansed’ Repository object
- Return type:
References¶
Proxy class for the Gramps databases. Returns objects which are referenced by a person, or through a chain of references starting with a person.
- class gramps.gen.proxy.referencedbyselection.ReferencedBySelectionProxyDb(dbase, all_people=False)[source]¶
Bases:
ProxyDbBaseA proxy to a Gramps database. This proxy will act like a Gramps database, but returning all objects which are referenced by a selection, or by an object that is referenced by an object which is eventually referenced by one of the selected objects.
- find_backlink_handles(handle, include_classes=None)[source]¶
Return appropriate backlink handles for this proxy.
- process_citation(citation)[source]¶
Follow the citation object and find all of the primary objects that it references.
- process_event(event)[source]¶
Follow the event object and find all of the primary objects that it references.
- process_family(family)[source]¶
Follow the family object and find all of the primary objects that it references.
- process_media(media)[source]¶
Follow the media object and find all of the primary objects that it references.
- process_note(note)[source]¶
Follow the note object and find all of the primary objects that it references.
- process_person(person, reference=True)[source]¶
Follow the person object and find all of the primary objects that it references.
- process_place(place)[source]¶
Follow the place object and find all of the primary objects that it references.
- process_repository(repository)[source]¶
Follow the repository object and find all of the primary objects that it references.