swh.web.common.typing module¶
-
class
swh.web.common.typing.
OriginMetadataInfo
(**kwargs)[source]¶ Bases:
dict
-
url
: str¶ URL of the origin
-
metadata
: Dict[str, Any]¶ Origin metadata associated to the origin
-
-
class
swh.web.common.typing.
OriginVisitInfo
(**kwargs)[source]¶ Bases:
dict
-
date
: str¶ date of the visit in iso format
-
formatted_date
: str¶ formatted date of the visit
-
metadata
: Dict[str, Any]¶ metadata associated to the visit
-
origin
: str¶ visited origin URL
-
snapshot
: str¶ snapshot identifier computed during the visit
-
status
: str¶ status of the visit (“ongoing”, “full” or “partial”)
-
type
: str¶ visit type (git, hg, debian, …)
-
url
: str¶ URL to browse the snapshot
-
visit
: int¶ visit identifier
-
-
class
swh.web.common.typing.
SnapshotBranchInfo
(**kwargs)[source]¶ Bases:
dict
-
date
: Optional[str]¶ “author date of branch heading revision
-
directory
: Optional[str]¶ directory associated to branch heading revision
-
message
: Optional[str]¶ message of branch heading revision
-
name
: str¶ branch name
-
alias
: bool¶ define if the branch is an alias
-
revision
: str¶ branch heading revision
-
url
: Optional[str]¶ optional browse URL (content, directory, …) scoped to branch
-
-
class
swh.web.common.typing.
SnapshotReleaseInfo
(**kwargs)[source]¶ Bases:
dict
-
branch_name
: str¶ branch name associated to release in snapshot
-
date
: str¶ release date
-
directory
: Optional[str]¶ optional directory associatd to the release
-
id
: str¶ release identifier
-
message
: str¶ release message
-
name
: str¶ release name
-
alias
: bool¶ define if the branch is an alias
-
target
: str¶ release target
-
target_type
: str¶ release target_type
-
url
: Optional[str]¶ optional browse URL (content, directory, …) scoped to release
-
-
class
swh.web.common.typing.
SnapshotContext
(**kwargs)[source]¶ Bases:
dict
-
branch
: Optional[str]¶ optional branch name set when browsing snapshot in that scope
-
branch_alias
: bool¶ indicates if the focused branch is an alias
-
branches
: List[swh.web.common.typing.SnapshotBranchInfo]¶ list of snapshot branches (possibly truncated)
-
branches_url
: str¶ snapshot branches list browse URL
-
is_empty
: bool¶ indicates if the snapshot is empty
-
origin_info
: Optional[swh.web.common.typing.OriginInfo]¶ optional origin info associated to the snapshot
-
origin_visits_url
: Optional[str]¶ optional origin visits URL
-
query_params
: Union[Dict[str, Any], django.http.request.QueryDict]¶ common query parameters when browsing snapshot content
-
release
: Optional[str]¶ optional release name set when browsing snapshot in that scope
-
release_alias
: bool¶ indicates if the focused release is an alias
-
release_id
: Optional[str]¶ optional release identifier set when browsing snapshot in that scope
-
releases
: List[swh.web.common.typing.SnapshotReleaseInfo]¶ list of snapshot releases (possibly truncated)
-
releases_url
: str¶ snapshot releases list browse URL
-
revision_id
: Optional[str]¶ optional revision identifier set when browsing snapshot in that scope
-
revision_info
: Optional[Dict[str, Any]]¶ optional revision info set when browsing snapshot in that scope
-
root_directory
: Optional[str]¶ optional root directory identifier set when browsing snapshot content
-
snapshot_id
: str¶ snapshot identifier
-
snapshot_sizes
: Dict[str, int]¶ snapshot sizes grouped by branch target type
-
snapshot_swhid
: str¶ snapshot SWHID
-
url_args
: Dict[str, Any]¶ common URL arguments when browsing snapshot content
-
visit_info
: Optional[swh.web.common.typing.OriginVisitInfo]¶ optional origin visit info associated to the snapshot
-
-
class
swh.web.common.typing.
SWHObjectInfo
(**kwargs)[source]¶ Bases:
dict
-
object_type
: str¶
-
object_id
: str¶
-
-
class
swh.web.common.typing.
SWHIDContext
(**kwargs)[source]¶ Bases:
dict
-
origin
: str¶
-
anchor
: str¶
-
visit
: str¶
-
path
: str¶
-
lines
: str¶
-
-
class
swh.web.common.typing.
SWHIDInfo
(**kwargs)[source]¶ Bases:
dict
-
swhid
: str¶
-
swhid_url
: str¶
-
context
: swh.web.common.typing.SWHIDContext¶
-
swhid_with_context
: Optional[str]¶
-
swhid_with_context_url
: Optional[str]¶
-
object_type
: str¶
-
object_id
: str¶
-
-
class
swh.web.common.typing.
SWHObjectInfoMetadata
(**kwargs)[source]¶ Bases:
dict
-
origin_url
: Optional[str]¶
-
visit_date
: Optional[str]¶
-
visit_type
: Optional[str]¶
-
-
class
swh.web.common.typing.
ContentMetadata
(**kwargs)[source]¶ Bases:
dict
-
sha1
: str¶
-
sha1_git
: str¶
-
sha256
: str¶
-
blake2s256
: str¶
-
object_type
: str¶
-
object_id
: str¶
-
origin_url
: Optional[str]¶
-
visit_date
: Optional[str]¶
-
visit_type
: Optional[str]¶
-
content_url
: str¶
-
mimetype
: str¶
-
encoding
: str¶
-
size
: str¶
-
language
: str¶
-
path
: Optional[str]¶
-
filename
: Optional[str]¶
-
directory
: Optional[str]¶
-
root_directory
: Optional[str]¶
-
revision
: Optional[str]¶
-
release
: Optional[str]¶
-
snapshot
: Optional[str]¶
-
-
class
swh.web.common.typing.
DirectoryMetadata
(**kwargs)[source]¶ Bases:
dict
-
object_type
: str¶
-
object_id
: str¶
-
origin_url
: Optional[str]¶
-
visit_date
: Optional[str]¶
-
visit_type
: Optional[str]¶
-
directory
: str¶
-
nb_files
: int¶
-
nb_dirs
: int¶
-
sum_file_sizes
: str¶
-
root_directory
: Optional[str]¶
-
path
: str¶
-
revision
: Optional[str]¶
-
revision_found
: Optional[bool]¶
-
release
: Optional[str]¶
-
snapshot
: Optional[str]¶
-
-
class
swh.web.common.typing.
ReleaseMetadata
(**kwargs)[source]¶ Bases:
dict
-
object_type
: str¶
-
object_id
: str¶
-
origin_url
: Optional[str]¶
-
visit_date
: Optional[str]¶
-
visit_type
: Optional[str]¶
-
release
: str¶
-
date
: str¶
-
name
: str¶
-
synthetic
: bool¶
-
target
: str¶
-
target_type
: str¶
-
snapshot
: Optional[str]¶
-
-
class
swh.web.common.typing.
RevisionMetadata
(**kwargs)[source]¶ Bases:
dict
-
object_type
: str¶
-
object_id
: str¶
-
origin_url
: Optional[str]¶
-
visit_date
: Optional[str]¶
-
visit_type
: Optional[str]¶
-
revision
: str¶
-
committer
: str¶
-
committer_url
: str¶
-
date
: str¶
-
committer_date
: str¶
-
directory
: str¶
-
merge
: bool¶
-
metadata
: str¶
-
parents
: List[str]¶
-
synthetic
: bool¶
-
type
: str¶
-
snapshot
: Optional[str]¶
-