Mixins
- Information
- python_pachyderm.mixin.admin
- python_pachyderm.mixin.auth
- python_pachyderm.mixin.debug
- python_pachyderm.mixin.enterprise
- python_pachyderm.mixin.health
- python_pachyderm.mixin.identity
- python_pachyderm.mixin.license
- python_pachyderm.mixin.pfs
- python_pachyderm.mixin.pps
- python_pachyderm.mixin.transaction
- python_pachyderm.mixin.version
Client
PFS Helper
- class Commit(repo, branch=None, id=None, repo_type='user', project='default')[source]
Bases:
tuple
A namedtuple subclass to specify a Commit.
- Attributes
Methods
count
(value, /)Return number of occurrences of value.
from_pb
(commit)Converts a
pfs_pb2.Commit
object into aCommit
object.index
(value[, start, stop])Return first index of value.
to_pb
()Converts itself into a
pfs_pb2.Commit
.- property branch
Alias for field number 1
- property id
Alias for field number 2
- property project
Alias for field number 4
- property repo
Alias for field number 0
- property repo_type
Alias for field number 3
- SubcommitType
Composite type for a subcommit, a commit at the repo-level.
Examples
Tuple:
>>> sc = ("foo", "master") >>> sc2 = ("foo", "467c580611234cdb8cc9758c7aa96087")
Dict:
>>> sc = {repo: "foo", branch: "master", repo_type: "spec"}
Commit:
>>> from python_pachyderm.pfs import Commit >>> sc = Commit(repo="foo", branch="master")
pfs_pb2.Commit:
>>> from python_pachyderm.service import pfs_proto >>> sc = pfs_pb2.Commit( ... branch=pfs_pb2.Branch( ... repo=pfs_pb2.Repo(name="foo", type="user"), ... name="master", ... ) ... )
alias of
Union
[tuple
,dict
,python_pachyderm.pfs.Commit
,python_pachyderm.proto.v2.pfs.pfs_pb2.Commit
]
- commit_from(commit=None)[source]
A commit can be identified by (repo, branch, commit_id, repo_type)
Helper function to convert objects that represent a Commit query into a protobuf Commit object.
- Parameters
- commitSubcommitType, optional
The commit representation to convert to a protobuf commit object.
- Returns
- pfs_pb2.Commit
A protobuf object that represents a commit.