Database class

class lensfunpy.Database(paths=None, xml=None, load_common=True, load_bundled=True)

The main entry point to use lensfunpy’s functionality.

Database.__init__(paths=None, xml=None, load_common=True, load_bundled=True)

Parameters:
  • paths (iterable of str) – XML files to load

  • xml (str) – load data from XML string

  • load_common (bool) – whether to load the system/user database files

  • load_bundled (bool) – whether to load the bundled database files

find_cameras(self, maker=None, model=None, loose_search=False)
Parameters:
  • maker (str) – return cameras from the given manufacturer

  • model (str) – return cameras matching the given model

  • loose_search (bool) –

Return type:

list of lensfunpy.Camera instances

find_lenses(self, Camera camera, maker=None, lens=None, loose_search=False)
Parameters:
  • camera (lensfunpy.Camera) –

  • maker (str) –

  • lens (str) –

  • loose_search (bool) –

Return type:

list of lensfunpy.Lens instances

find_mount(self, name)
Parameters:

name (str) –

Return type:

lensfunpy.Mount instance

cameras

All loaded cameras.

Return type:

list of lensfunpy.Camera instances

lenses

All loaded lenses.

Return type:

list of lensfunpy.Lens instances

mounts

All loaded mounts.

Return type:

list of lensfunpy.Mount instances