swh.provenance.backend.graph module#

class swh.provenance.backend.graph.GraphProvenance(url, max_edges=10000)[source]#

Bases: object

Provenance instance using a swh-graph GRPC backend

Parameters:
check_config() bool[source]#
whereis(*, swhid: CoreSWHID) QualifiedSWHID | None[source]#

Given a SWHID return a QualifiedSWHID with some provenance info:

  • the release or revision containing that content or directory

  • the url of the origin containing that content or directory

This can also be called for revision, release or snapshot to retrieve origin url information if any. When using a revision, the anchor will be an association release if any.

whereare(*, swhids: List[CoreSWHID]) List[QualifiedSWHID | None][source]#

Given a SWHID list return a list of provenance info:

See whereis documentation for details on the provenance info.