Find License#

metacatalog.api.find_license(return_iterator: typing_extensions.Literal[False] = False) List['License']#
metacatalog.api.find_license(return_iterator: typing_extensions.Literal[True] = False) Query

Return one or many license entries from the database on exact matches. You can use ‘%’ and ‘*’ as wildcards and prepend a str with ! to invert the filter.

Changed in version 0.1.8: string matches now allow ‘%’ and ‘*’ wildcards and can be inverted by prepending !

Parameters:
  • session (sqlalchemy.Session) – SQLAlchemy session connected to the database.

  • id (integer) – Database unique ID of the requested record. Will return only one record.

  • title (str) –

    New in version 0.1.8.

    Full title attribute of the requested license(s). Multiple record return is possible.

  • short_title (str) – short_title attribute of the requested license(s). Multiple record return is possible.

  • by_attribution (bool) – by_attribution attribute of the requested license(s). Multiple record return is possible.

  • share_alike (bool) – by_attribution attribute of the requested license(s). Multiple record return is possible.

  • commercial_use (bool) – by_attribution attribute of the requested license(s). Multiple record return is possible.

  • return_iterator (bool) – If True, an iterator returning the requested objects instead of the objects themselves is returned.

Returns:

records – List of matched License instance.

Return type:

list of metacatalog.License