diff --git a/.travis.yml b/.travis.yml index 8c633dc1..d67e84b7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,9 +15,7 @@ env: global: - PATH=$HOME/cached-deps:$PATH jobs: - # Most recent releases of the last two minor releases of Pachyderm - - PACHYDERM_VERSION=1.12.5 - - PACHYDERM_VERSION=1.13.0 + - PACHYDERM_VERSION=2.0.0-alpha.12 jobs: include: @@ -25,11 +23,11 @@ jobs: - python: 3.8 env: - TOXENV=lint - - PACHYDERM_VERSION=1.13.0 + - PACHYDERM_VERSION=2.0.0-alpha.12 - python: 3.8 env: - TOXENV=examples - - PACHYDERM_VERSION=1.13.0 + - PACHYDERM_VERSION=2.0.0-alpha.12 install: - make ci-install before_script: diff --git a/Makefile b/Makefile index fdef19f8..849ecc3c 100644 --- a/Makefile +++ b/Makefile @@ -19,15 +19,17 @@ docker-build-proto: src/python_pachyderm/proto: docker-build-proto @echo "Building with pachyderm core v$(PACHYDERM_VERSION)" + rm -rf src/python_pachyderm/proto cd proto/pachyderm && \ git fetch --all && \ git checkout v$(PACHYDERM_VERSION) - find ./proto/pachyderm/src/client -regex ".*\.proto" \ + find ./proto/pachyderm/ -regex ".*\.proto" \ + | grep -v 'internal' \ | xargs tar cf - \ | docker run -i pachyderm_python_proto \ | tar xf - - test -d src/python_pachyderm/proto && rm -rf src/python_pachyderm/proto - mv src/python_pachyderm/client src/python_pachyderm/proto + rm -rf src/python_pachyderm/proto + mv src/python_pachyderm/src src/python_pachyderm/proto find src/python_pachyderm/proto -type d -exec touch {}/__init__.py \; init: @@ -36,23 +38,22 @@ init: ci-install: sudo apt-get update sudo apt-get install jq socat - cd proto/pachyderm && \ - sudo etc/testing/travis_cache.sh && \ - sudo etc/testing/travis_install.sh && \ - curl -o /tmp/pachctl.deb -L https://github.com/pachyderm/pachyderm/releases/download/v$(PACHYDERM_VERSION)/pachctl_$(PACHYDERM_VERSION)_amd64.deb && \ - sudo dpkg -i /tmp/pachctl.deb + sudo etc/testing/travis_cache.sh + sudo etc/testing/travis_install.sh + curl -o /tmp/pachctl.deb -L https://github.com/pachyderm/pachyderm/releases/download/v$(PACHYDERM_VERSION)/pachctl_$(PACHYDERM_VERSION)_amd64.deb + sudo dpkg -i /tmp/pachctl.deb pip install tox tox-travis -ci-setup: +ci-setup: docker version which pachctl - cd proto/pachyderm && make launch-kube - pachctl deploy local - until timeout 1s ./proto/pachyderm/etc/kube/check_ready.sh app=pachd; do sleep 1; done + etc/kube/start-minikube.sh + echo 'y' | pachctl deploy local + until timeout 1s ./etc/kube/check_ready.sh app=pachd; do sleep 1; done pachctl version release: - git checkout master + git checkout v7.x rm -rf build dist python3 setup.py sdist twine upload dist/* @@ -61,4 +62,4 @@ lint: flake8 src/python_pachyderm --exclude=src/python_pachyderm/proto --max-line-length=120 --max-doc-length=80 PYTHONPATH=./src:$(PYTHONPATH) etc/proto_lint/proto_lint.py -.PHONY: docker-build-proto init ci-install ci-setup release lint +.PHONY: docs docker-build-proto init ci-install ci-setup release lint diff --git a/docs/python_pachyderm.html b/docs/python_pachyderm.html index 21e18adb..f9415cb8 100644 --- a/docs/python_pachyderm.html +++ b/docs/python_pachyderm.html @@ -1071,10 +1071,6 @@
class ACLEntry
+class ActivateAuthRequest
A ProtocolMessage
@@ -2536,7 +2445,7 @@var DESCRIPTOR
+var DESCRIPTOR
@@ -2546,27 +2455,7 @@var Extensions
- - - - -var scope
- - - - -var username
+var Extensions
@@ -2579,7 +2468,7 @@class ActivateAuthRequest
+class ActivateAuthResponse
A ProtocolMessage
@@ -2596,7 +2485,7 @@var DESCRIPTOR
+var DESCRIPTOR
@@ -2606,7 +2495,7 @@var Extensions
+var Extensions
@@ -2619,7 +2508,7 @@class ActivateAuthResponse
+class ActivateRequest
A ProtocolMessage
@@ -2636,7 +2525,7 @@var DESCRIPTOR
+var DESCRIPTOR
@@ -2646,7 +2535,27 @@var Extensions
+var Extensions
+ + + + +var activation_code
+ + + + +var expires
@@ -2659,7 +2568,7 @@class ActivateRequest
+class ActivateResponse
A ProtocolMessage
@@ -2676,17 +2585,7 @@var DESCRIPTOR
- - - - -var Extensions
+var DESCRIPTOR
@@ -2696,7 +2595,7 @@var activation_code
+var Extensions
@@ -2706,7 +2605,7 @@var expires
+var info
@@ -2719,7 +2618,7 @@class ActivateResponse
+class AddClusterRequest
A ProtocolMessage
@@ -2736,7 +2635,7 @@var DESCRIPTOR
+var DESCRIPTOR
@@ -2746,7 +2645,7 @@var Extensions
+var Extensions
@@ -2756,7 +2655,27 @@var info
+var address
+ + + + +var id
+ + + + +var secret
@@ -2769,7 +2688,7 @@class Aggregate
+class AddClusterResponse
A ProtocolMessage
@@ -2786,7 +2705,7 @@var DESCRIPTOR
+var DESCRIPTOR
@@ -2796,7 +2715,7 @@var Extensions
+var Extensions
@@ -2806,7 +2725,7 @@var count
+var secret
@@ -2815,8 +2734,28 @@class AddFilesetRequest
+ + +A ProtocolMessage
+var fifth_percentile
+var DESCRIPTOR
@@ -2826,7 +2765,7 @@var mean
+var Extensions
@@ -2836,7 +2775,7 @@var ninety_fifth_percentile
+var commit
@@ -2846,7 +2785,7 @@var stddev
+var fileset_id
@@ -2859,7 +2798,7 @@class AggregateProcessStats
+class Aggregate
A ProtocolMessage
@@ -2876,7 +2815,7 @@var DESCRIPTOR
+var DESCRIPTOR
@@ -2886,7 +2825,7 @@var Extensions
+var Extensions
@@ -2896,7 +2835,7 @@var download_bytes
+var count
@@ -2906,7 +2845,7 @@var download_time
+var fifth_percentile
@@ -2916,7 +2855,7 @@var process_time
+var mean
@@ -2926,7 +2865,7 @@var upload_bytes
+var ninety_fifth_percentile
@@ -2936,7 +2875,7 @@var upload_time
+var stddev
@@ -2949,7 +2888,7 @@class AuthConfig
+class AggregateProcessStats
A ProtocolMessage
@@ -2966,7 +2905,17 @@var DESCRIPTOR
+var DESCRIPTOR
+ + + + +var Extensions
@@ -2976,7 +2925,7 @@var Extensions
+var download_bytes
@@ -2986,7 +2935,7 @@var SAMLServiceOptions
+var download_time
@@ -2996,7 +2945,7 @@var id_providers
+var process_time
@@ -3006,7 +2955,7 @@var live_config_version
+var upload_bytes
@@ -3016,7 +2965,7 @@var saml_svc_options
+var upload_time
@@ -3061,16 +3010,6 @@var github_token
- - - -var one_time_password
- - - -var repo
+var permissions
@@ -3206,7 +3135,7 @@var scope
+var resource
@@ -3261,6 +3190,36 @@var missing
+ + + + +var principal
+ + + + +var satisfied
+ + + +class Block
+class BoolValue
A ProtocolMessage
@@ -3414,7 +3373,7 @@var DESCRIPTOR
+var DESCRIPTOR
@@ -3424,7 +3383,7 @@var Extensions
+var Extensions
@@ -3434,7 +3393,7 @@var hash
+var value
@@ -3447,7 +3406,7 @@class BlockRef
+class Branch
A ProtocolMessage
@@ -3464,7 +3423,7 @@var DESCRIPTOR
+var DESCRIPTOR
@@ -3474,7 +3433,7 @@var Extensions
+var Extensions
@@ -3484,7 +3443,7 @@var block
+var name
@@ -3494,7 +3453,7 @@var range
+var repo
@@ -3507,7 +3466,7 @@class BoolValue
+class BranchInfo
A ProtocolMessage
@@ -3524,7 +3483,7 @@var DESCRIPTOR
+var DESCRIPTOR
@@ -3534,7 +3493,7 @@var Extensions
+var Extensions
@@ -3544,7 +3503,7 @@var value
+var branch
@@ -3553,28 +3512,28 @@class Branch
- +var direct_provenance
+ + + -A ProtocolMessage
-var head
+ -var DESCRIPTOR
+var name
@@ -3584,7 +3543,7 @@var Extensions
+var provenance
@@ -3594,7 +3553,7 @@var name
+var subvenance
@@ -3604,7 +3563,7 @@var repo
+var trigger
@@ -3617,7 +3576,7 @@class BranchInfo
+class BranchInfos
A ProtocolMessage
@@ -3634,7 +3593,7 @@var DESCRIPTOR
+var DESCRIPTOR
@@ -3644,7 +3603,7 @@var Extensions
+var Extensions
@@ -3654,7 +3613,7 @@var branch
+var branch_info
@@ -3663,18 +3622,28 @@var direct_provenance
- - - +class BuildSpec
+ +A ProtocolMessage
+var head
+var DESCRIPTOR
@@ -3684,7 +3653,7 @@var name
+var Extensions
@@ -3694,7 +3663,7 @@var provenance
+var image
@@ -3704,7 +3673,7 @@var subvenance
+var language
@@ -3714,7 +3683,7 @@var trigger
+var path
@@ -3727,7 +3696,7 @@class BranchInfos
+class BytesValue
A ProtocolMessage
@@ -3744,7 +3713,7 @@var DESCRIPTOR
+var DESCRIPTOR
@@ -3754,7 +3723,7 @@var Extensions
+var Extensions
@@ -3764,7 +3733,7 @@var branch_info
+var value
@@ -3777,7 +3746,7 @@class BuildCommitRequest
+class ChunkSpec
A ProtocolMessage
@@ -3794,37 +3763,7 @@var DESCRIPTOR
- - - - -var Extensions
- - - - -var ID
- - - - -var branch
+var DESCRIPTOR
@@ -3834,7 +3773,7 @@var datums
+var Extensions
@@ -3844,7 +3783,7 @@var finished
+var number
@@ -3854,7 +3793,7 @@var origin
+var size_bytes
@@ -3863,38 +3802,28 @@var parent
- - - +class ClearCommitRequest
+ -A ProtocolMessage
var provenance
- - - -var size_bytes
- - - - -var started
+var DESCRIPTOR
@@ -3904,7 +3833,7 @@var tree
+var Extensions
@@ -3914,7 +3843,7 @@var trees
+var commit
@@ -3927,11 +3856,9 @@class BuildSpec
+class Client
-A ProtocolMessage
-var DESCRIPTOR
+def new_from_config(
cls, config_file=None)
+Creates a Pachyderm client from a config file, which can either be +passed in as a file-like object, or if unset, checks the PACH_CONFIG env +var for a path. If that's also unset, it defaults to loading from +'~/.pachyderm/config.json'.
-var Extensions
- +Params:
- - +config_file: An optional file-like object containing the config
+json file. If unspecified, we load the config from the default
+location ('~/.pachyderm/config.json'.)var image
+def new_from_pachd_address(
cls, pachd_address, auth_token=None, root_certs=None, transaction_id=None)
+Creates a Pachyderm client from a given pachd address.
-var language
- +Params:
- - +auth_token: The authentication token; used if authentication is
+enabled on the cluster. Default to None.root_certs: The PEM-encoded root certificates as byte string. If
+unspecified, this will load default certs from certifi.transaction_id: The ID of the transaction to run operations on.var path
+def new_in_cluster(
cls, auth_token=None, transaction_id=None)
+Creates a Pachyderm client that operates within a Pachyderm cluster.
-class ByteRange
- - -A ProtocolMessage
+Params:
+ +auth_token: The authentication token; used if authentication is
+enabled on the cluster. Default to None.transaction_id: The ID of the transaction to run operations on.var DESCRIPTOR
+var address
@@ -4024,7 +3968,7 @@var Extensions
+var auth_token
@@ -4034,7 +3978,7 @@var lower
+var root_certs
@@ -4044,7 +3988,7 @@var upper
+var transaction_id
@@ -4053,350 +3997,283 @@class BytesValue
- - -A ProtocolMessage
-var DESCRIPTOR
+def __init__(
self, host=None, port=None, auth_token=None, root_certs=None, transaction_id=None, tls=None)
+Creates a Pachyderm client.
-var Extensions
- +Params:
- - +host: The pachd host. Default is 'localhost', which is used with
+pachctl port-forward.port: The port to connect to. Default is 30650.auth_token: The authentication token; used if authentication is
+enabled on the cluster. Defaults to None.root_certs: The PEM-encoded root certificates as byte string.transaction_id: The ID of the transaction to run operations on.tls: Specifies whether TLS should be used. If root_certs are
+specified, they are used; otherwise, we use the certs provided by
+certifi.var value
+def activate_auth(
self, root_token=None)
+Activates auth. Returns the root token for the cluster, an +irrevocable superuser credential that should be stored securely.
-class CheckAuthToken
- - -A ProtocolMessage
+Params:
+ +root_token: An optional string. If specified, this string becomes
+the Pachyderm cluster root user's token (otherwise, Pachyderm
+generates a root token, which is generally safer). Currently this is
+only used for testing and Pachyderm internals (migration).var DESCRIPTOR
+def activate_enterprise(
self, license_server, id, secret)
+Activates enterprise by registering with a license server.
+Returns a TokenInfo object.
Params:
+ +license_server: The Pachyderm Enterprise Server to register with.id: The unique ID for this cluster.secret: The secret for registering this cluster.var Extensions
+def activate_license(
self, activation_code, expires=None)
+Activates the license service. Returns a TokenInfo object.
class CheckObjectRequest
- - -A ProtocolMessage
+Params:
+ +activation_code: A string specifying a Pachyderm enterprise
+activation code. New users can obtain trial activation codes.expires: An optional Timestamp object indicating when this
+activation code will expire. This should not generally be set (it's
+primarily used for testing), and is only applied if it's earlier than
+the signed expiration time in activation_code.var DESCRIPTOR
+def add_cluster(
self, id, address, secret=None)
+Register a cluster with the license service.
-var Extensions
- +Params:
- - +id: A unique ID to identify the cluster.address: A GRPC address for the license server to reach the cluster.secret: Optional. A shared secret for the cluster to use
+to authenticate.
+If not specified, a random secret will be generated and returned.var object
+def authenticate_id_token(
self, id_token)
+Authenticates a user to the Pachyderm cluster using an ID token issued +by the OIDC provider. The token must include the Pachyderm client_id +in the set of audiences to be valid. Returns a string that can be used +for making authenticated requests.
-class CheckObjectResponse
- - -A ProtocolMessage
+Params:
+ +id_token: A string of the ID token.var DESCRIPTOR
+def authenticate_oidc(
self, oidc_state)
+Authenticates a user to the Pachyderm cluster via OIDC. Returns a +string that can be used for making authenticated requests.
-var Extensions
- +Params:
- - +oidc_state: A string of the OIDC state token.var exists
+def authorize(
self, resource, permissions=None)
+Authorizes the user to a given resource.
-class ChunkSpec
- - -A ProtocolMessage
+Params:
+ +resource: The resource the user wants access topermissions: A list of permissions the user wants to test.var DESCRIPTOR
+def batch_transaction(
self, requests)
+Executes a batch transaction.
+ +Params:
+ +requests: A list of TransactionRequest objects.var Extensions
+def binary(
self, filter=None)
+Gets the pachd binary. Yields byte arrays.
-var number
- - - - -var size_bytes
- - - - -class ClearCommitRequestV2
- - -A ProtocolMessage
-var DESCRIPTOR
- - - - -var Extensions
- +Params:
- - -filter: An optional Filter object.var commit
- - - -class Client
- +def new_from_config(
cls, config_file=None)
+def commit(
*args, **kwds)
Creates a Pachyderm client from a config file, which can either be -passed in as a file-like object, or if unset, defaults to loading from -'~/.pachyderm/config.json'.
+A context manager for running operations within a commit.
Params:
config_file: An optional file-like object containing the config
-json file. If unspecified, we load the config from the default
-location ('~/.pachyderm/config.json'.)repo_name: A string specifying the name of the repo.branch: A string specifying the branch name. This is a more
+convenient way to build linear chains of commits. When a commit is
+started with a non-empty branch the value of branch becomes an alias
+for the created Commit. This enables a more intuitive access pattern.
+When the commit is started on a branch the previous head of the branch
+is used as the parent of the commit.parent: An optional Commit object specifying the parent commit.
+Upon creation the new commit will appear identical to the parent
+commit, data can safely be added to the new commit without affecting
+the contents of the parent commit.description: An optional string describing the commit.def new_from_pachd_address(
cls, pachd_address, auth_token=None, root_certs=None, transaction_id=None)
+def copy_file(
self, source_commit, source_path, dest_commit, dest_path, append=None, tag=None)
Creates a Pachyderm client from a given pachd address.
+Efficiently copies files already in PFS. Note that the destination +repo cannot be an output repo, or the copy operation will (as of +1.9.0) silently fail.
Params:
auth_token: The authentication token; used if authentication is
-enabled on the cluster. Default to None.root_certs: The PEM-encoded root certificates as byte string. If
-unspecified, this will load default certs from certifi.transaction_id: The ID of the transaction to run operations on.source_commit: A tuple, string, or Commit object representing the
+commit for the source file.source_path: A string specifying the path of the source file.dest_commit: A tuple, string, or Commit object representing the
+commit for the destination file.dest_path: A string specifying the path of the destination file.append: An optional bool, if true the data is appended to the file,
+if it already exists.def new_in_cluster(
cls, auth_token=None, transaction_id=None)
+def create_branch(
self, repo_name, branch_name, commit=None, provenance=None, trigger=None)
Creates a Pachyderm client that operates within a Pachyderm cluster.
+Creates a new branch.
Params:
auth_token: The authentication token; used if authentication is
-enabled on the cluster. Default to None.transaction_id: The ID of the transaction to run operations on.repo_name: A string specifying the name of the repo.branch_name: A string specifying the new branch name.commit: An optional tuple, string, or Commit object representing
+the head commit of the branch.provenance: An optional iterable of Branch objects representing
+the branch provenance.trigger: An optional Trigger object controlling when the head of
+branch_name is moved.var address
+def create_idp_connector(
self, connector)
+Create an IDP connector in the identity server.
var auth_token
- - - -var root_certs
- - - +var transaction_id
+def create_oidc_client(
self, client)
+Create an OIDC client in the identity server.
+def __init__(
self, host=None, port=None, auth_token=None, root_certs=None, transaction_id=None, tls=None)
+def create_pipeline(
self, pipeline_name, transform, parallelism_spec=None, egress=None, reprocess_spec=None, update=None, output_branch=None, resource_requests=None, resource_limits=None, input=None, description=None, cache_size=None, enable_stats=None, reprocess=None, max_queue_size=None, service=None, chunk_spec=None, datum_timeout=None, job_timeout=None, salt=None, standby=None, datum_tries=None, scheduling_spec=None, pod_patch=None, spout=None, spec_commit=None, metadata=None, s3_out=None, sidecar_resource_limits=None)
Creates a Pachyderm client.
+Creates a pipeline. For more info, please refer to the pipeline spec +document: +http://docs.pachyderm.io/en/latest/reference/pipeline_spec.html
Params:
host: The pachd host. Default is 'localhost', which is used with
-pachctl port-forward.port: The port to connect to. Default is 30650.auth_token: The authentication token; used if authentication is
-enabled on the cluster. Defaults to None.root_certs: The PEM-encoded root certificates as byte string.transaction_id: The ID of the transaction to run operations on.tls: Specifies whether TLS should be used. If root_certs are
-specified, they are used; otherwise, we use the certs provided by
-certifi.pipeline_name: A string representing the pipeline name.transform: A Transform object.parallelism_spec: An optional ParallelismSpec object.egress: An optional Egress object.update: An optional bool specifying whether this should behave as
+an upsert.output_branch: An optional string representing the branch to output
+results on.resource_requests: An optional ResourceSpec object.resource_limits: An optional ResourceSpec object.input: An optional Input object.description: An optional string describing the pipeline.cache_size: An optional string.enable_stats: An optional bool.reprocess: An optional bool. If true, pachyderm forces the pipeline
+to reprocess all datums. It only has meaning if update is True.max_queue_size: An optional int.service: An optional Service object.chunk_spec: An optional ChunkSpec object.datum_timeout: An optional Duration object.job_timeout: An optional Duration object.salt: An optional string.standby: An optional bool.datum_tries: An optional int.scheduling_spec: An optional SchedulingSpec object.pod_patch: An optional string.spout: An optional Spout object.spec_commit: An optional Commit object.metadata: An optional Metadata object.s3_out: An optional bool specifying whether the output repo should
+be exposed as an s3 gateway bucket.sidecar_resource_limits: An optional ResourceSpec settingreprocess_spec: An optional string specifying how to handle
+already-processed data
+resource limits for the pipeline sidecar.def activate_auth(
self, subject, github_token=None)
+def create_pipeline_from_request(
self, req)
Activates auth, creating an initial set of admins. Returns a string -that can be used for making authenticated requests.
+Creates a pipeline from a CreatePipelineRequest object. Usually this
+would be used in conjunction with util.parse_json_pipeline_spec or
+util.parse_dict_pipeline_spec. If you're in pure python and not
+working with a pipeline spec file, the sibling method
+create_pipeline is more ergonomic.
Params:
subject: A string.
-req: A CreatePipelineRequest object.def activate_enterprise(
self, activation_code, expires=None)
+def create_repo(
self, repo_name, description=None, update=None)
Activates enterprise. Returns a TokenInfo object.
Creates a new Repo object in PFS with the given name. Repos are the
+top level data object in PFS and should be used to store data of a
+similar type. For example rather than having a single Repo for an
+entire project you might have separate Repos for logs, metrics,
+database dumps etc.
Params:
activation_code: A string specifying a Pachyderm enterprise
-activation code. New users can obtain trial activation codes.expires: An optional Timestamp object indicating when this
-activation code will expire. This should not generally be set (it's
-primarily used for testing), and is only applied if it's earlier than
-the signed expiration time in activation_code.repo_name: Name of the repo.description: An optional string describing the repo.update: Whether to update if the repo already exists.def authenticate_github(
self, github_token)
+def create_secret(
self, secret_name, data, labels=None, annotations=None)
Authenticates a GitHub user to the Pachyderm cluster. Returns a string -that can be used for making authenticated requests.
+Creates a new secret.
Params:
github_token: A string. This is the token returned by GitHub and
-used to authenticate the caller. When Pachyderm is deployed locally,
-setting this value to a given string will automatically authenticate
-the caller as a GitHub user whose username is that string (unless this
-"looks like" a GitHub access code, in which case Pachyderm does
-retrieve the corresponding GitHub username.)secret_name: The name of the secret to create.data: A dict of string keys -> string or bytestring values to
+store in the secret. Each key must consist of alphanumeric characters,
+-, _ or ..labels: A dict of string keys -> string values representing the
+kubernetes labels to attach to the secret.annotations: A dict representing the kubernetes annotations to
+attach to the secret.def authenticate_id_token(
self, id_token)
+def create_tf_job_pipeline(
self, pipeline_name, tf_job, parallelism_spec=None, reprocess_spec=None, egress=None, update=None, output_branch=None, scale_down_threshold=None, resource_requests=None, resource_limits=None, input=None, description=None, cache_size=None, enable_stats=None, reprocess=None, max_queue_size=None, service=None, chunk_spec=None, datum_timeout=None, job_timeout=None, salt=None, standby=None, datum_tries=None, scheduling_spec=None, pod_patch=None, spout=None, spec_commit=None)
Authenticates a user to the Pachyderm cluster using an ID token issued -by the OIDC provider. The token must include the Pachyderm client_id -in the set of audiences to be valid. Returns a string that can be used -for making authenticated requests.
+Creates a pipeline. For more info, please refer to the pipeline spec +document: +http://docs.pachyderm.io/en/latest/reference/pipeline_spec.html
Params:
id_token: A string of the ID token.pipeline_name: A string representing the pipeline name.tf_job: A TFJob object. Pachyderm uses this to create TFJobs
+when running in a Kubernetes cluster on which kubeflow has been
+installed.parallelism_spec: An optional ParallelismSpec object.egress: An optional Egress object.update: An optional bool specifying whether this should behave as
+an upsert.output_branch: An optional string representing the branch to output
+results on.scale_down_threshold: An optional Duration object.resource_requests: An optional ResourceSpec object.resource_limits: An optional ResourceSpec object.input: An optional Input object.description: An optional string describing the pipeline.cache_size: An optional string.enable_stats: An optional bool.reprocess: An optional bool. If true, pachyderm forces the pipeline
+to reprocess all datums. It only has meaning if update is True.max_queue_size: An optional int.service: An optional Service object.chunk_spec: An optional ChunkSpec object.datum_timeout: An optional Duration object.job_timeout: An optional Duration object.salt: An optional string.standby: An optional bool.datum_tries: An optional int.scheduling_spec: An optional SchedulingSpec object.pod_patch: An optional string.spout: An optional Spout object.spec_commit: An optional Commit object.reprocess_spec: An optional string specifying how to handle
+already-processed datadef authenticate_oidc(
self, oidc_state)
+def create_tmp_file_set(
self)
Authenticates a user to the Pachyderm cluster via OIDC. Returns a -string that can be used for making authenticated requests.
+Creates a temporary fileset (used internally). Currently, +temp-fileset-related APIs are only used for Pachyderm internals (job +merging), so we're avoiding support for these functions until we find a +use for them (feel free to file an issue in +github.com/pachyderm/pachyderm)
Params:
oidc_state: A string of the OIDC state token.fileset_id: A string identifying the fileset.def authenticate_one_time_password(
self, one_time_password)
+def deactivate_auth(
self)
Authenticates a user to the Pachyderm cluster using a one-time -password. Returns a string that can be used for making authenticated -requests.
- -Params:
- -one_time_password: A string. This is a short-lived, one-time-use
-password generated by Pachyderm, for the purpose of propagating
-authentication to new clients (e.g. from the dash to pachd.)Deactivates auth, removing all ACLs, tokens, and admins from the +Pachyderm cluster and making all data publicly accessible.
def authorize(
self, repo, scope)
+def deactivate_enterprise(
self)
Authorizes the user to a given repo/scope. Return a bool specifying if
-the caller has at least scope-level access to repo.
Params:
- -repo: A string specifying the repo name that the caller wants
-access to.scope: An int specifying the access level that the caller needs to
-perform an action. See the Scope enum for variants.Deactivates enterprise.
def batch_transaction(
self, requests)
+def delete_all(
self)
Executes a batch transaction.
- -Params:
- -requests: A list of TransactionRequest objects.Deletes everything in pachyderm.
def binary(
self, filter=None)
+def delete_all_identity(
self)
Gets the pachd binary. Yields byte arrays.
+Delete all identity service information.
+Params:
+def delete_all_license(
self)
+filter: An optional Filter object.Remove all clusters and deactivate the license service.
def commit(
*args, **kwds)
+def delete_all_pipelines(
self, force=None)
A context manager for running operations within a commit.
+Deletes all pipelines.
Params:
repo_name: A string specifying the name of the repo.branch: A string specifying the branch name. This is a more
-convenient way to build linear chains of commits. When a commit is
-started with a non-empty branch the value of branch becomes an alias
-for the created Commit. This enables a more intuitive access pattern.
-When the commit is started on a branch the previous head of the branch
-is used as the parent of the commit.parent: An optional Commit object specifying the parent commit.
-Upon creation the new commit will appear identical to the parent
-commit, data can safely be added to the new commit without affecting
-the contents of the parent commit.description: An optional string describing the commit.force: Whether to force delete.def copy_file(
self, source_commit, source_path, dest_commit, dest_path, overwrite=None)
+def delete_all_repos(
self, force=None)
Efficiently copies files already in PFS. Note that the destination -repo cannot be an output repo, or the copy operation will (as of -1.9.0) silently fail.
+Deletes all repos.
Params:
source_commit: A tuple, string, or Commit object representing the
-commit for the source file.source_path: A string specifying the path of the source file.dest_commit: A tuple, string, or Commit object representing the
-commit for the destination file.dest_path: A string specifying the path of the destination file.overwrite: An optional bool specifying whether to overwrite the
-destination file if it already exists.force: If set to true, the repo will be removed regardless of
+errors. This argument should be used with care.def create_branch(
self, repo_name, branch_name, commit=None, provenance=None)
+def delete_all_transactions(
self)
Creates a new branch.
- -Params:
- -repo_name: A string specifying the name of the repo.branch_name: A string specifying the new branch name.commit: An optional tuple, string, or Commit object representing
-the head commit of the branch.provenance: An optional iterable of Branch objects representing
-the branch provenance.Deletes all transactions.
def create_pipeline(
self, pipeline_name, transform, parallelism_spec=None, hashtree_spec=None, egress=None, update=None, output_branch=None, resource_requests=None, resource_limits=None, input=None, description=None, cache_size=None, enable_stats=None, reprocess=None, max_queue_size=None, service=None, chunk_spec=None, datum_timeout=None, job_timeout=None, salt=None, standby=None, datum_tries=None, scheduling_spec=None, pod_patch=None, spout=None, spec_commit=None, metadata=None, s3_out=None, sidecar_resource_limits=None)
+def delete_branch(
self, repo_name, branch_name, force=None)
Creates a pipeline. For more info, please refer to the pipeline spec -document: -http://docs.pachyderm.io/en/latest/reference/pipeline_spec.html
+Deletes a branch, but leaves the commits themselves intact. In other +words, those commits can still be accessed via commit IDs and other +branches they happen to be on.
Params:
pipeline_name: A string representing the pipeline name.transform: A Transform object.parallelism_spec: An optional ParallelismSpec object.hashtree_spec: An optional HashtreeSpec object.egress: An optional Egress object.update: An optional bool specifying whether this should behave as
-an upsert.output_branch: An optional string representing the branch to output
-results on.resource_requests: An optional ResourceSpec object.resource_limits: An optional ResourceSpec object.input: An optional Input object.description: An optional string describing the pipeline.cache_size: An optional string.enable_stats: An optional bool.reprocess: An optional bool. If true, pachyderm forces the pipeline
-to reprocess all datums. It only has meaning if update is True.max_queue_size: An optional int.service: An optional Service object.chunk_spec: An optional ChunkSpec object.datum_timeout: An optional Duration object.job_timeout: An optional Duration object.salt: An optional string.standby: An optional bool.datum_tries: An optional int.scheduling_spec: An optional SchedulingSpec object.pod_patch: An optional string.spout: An optional Spout object.spec_commit: An optional Commit object.metadata: An optional Metadata object.s3_out: An optional bool specifying whether the output repo should
-be exposed as an s3 gateway bucket.sidecar_resource_limits: An optional ResourceSpec setting
-resource limits for the pipeline sidecar.repo_name: A string specifying the repo name.branch_name: A string specifying the name of the branch to delete.force: A bool specifying whether to force the branch deletion.def create_pipeline_from_request(
self, req)
+def delete_cluster(
self, id)
Creates a pipeline from a CreatePipelineRequest object. Usually this
-would be used in conjunction with util.parse_json_pipeline_spec or
-util.parse_dict_pipeline_spec. If you're in pure python and not
-working with a pipeline spec file, the sibling method
-create_pipeline is more ergonomic.
Delete a cluster registered with the license service.
Params:
req: A CreatePipelineRequest object.id: The unique ID to identify the cluster.def create_repo(
self, repo_name, description=None, update=None)
+def delete_file(
self, commit, path)
Creates a new Repo object in PFS with the given name. Repos are the
-top level data object in PFS and should be used to store data of a
-similar type. For example rather than having a single Repo for an
-entire project you might have separate Repos for logs, metrics,
-database dumps etc.
Deletes a file from a Commit. DeleteFile leaves a tombstone in the +Commit, assuming the file isn't written to later attempting to get the +file from the finished commit will result in not found error. The file +will of course remain intact in the Commit's parent.
Params:
repo_name: Name of the repo.description: An optional string describing the repo.update: Whether to update if the repo already exists.commit: A tuple, string, or Commit object representing the
+commit.path: The path to the file.def create_secret(
self, secret_name, data, labels=None, annotations=None)
+def delete_idp_connector(
self, id)
Creates a new secret.
- -Params:
- -secret_name: The name of the secret to create.data: A dict of string keys -> string or bytestring values to
-store in the secret. Each key must consist of alphanumeric characters,
--, _ or ..labels: A dict of string keys -> string values representing the
-kubernetes labels to attach to the secret.annotations: A dict representing the kubernetes annotations to
-attach to the secret.Delete an IDP connector in the identity server.
def create_tf_job_pipeline(
self, pipeline_name, tf_job, parallelism_spec=None, hashtree_spec=None, egress=None, update=None, output_branch=None, scale_down_threshold=None, resource_requests=None, resource_limits=None, input=None, description=None, cache_size=None, enable_stats=None, reprocess=None, max_queue_size=None, service=None, chunk_spec=None, datum_timeout=None, job_timeout=None, salt=None, standby=None, datum_tries=None, scheduling_spec=None, pod_patch=None, spout=None, spec_commit=None)
+def delete_job(
self, job_id)
Creates a pipeline. For more info, please refer to the pipeline spec -document: -http://docs.pachyderm.io/en/latest/reference/pipeline_spec.html
+Deletes a job by its ID.
Params:
pipeline_name: A string representing the pipeline name.tf_job: A TFJob object. Pachyderm uses this to create TFJobs
-when running in a Kubernetes cluster on which kubeflow has been
-installed.parallelism_spec: An optional ParallelismSpec object.hashtree_spec: An optional HashtreeSpec object.egress: An optional Egress object.update: An optional bool specifying whether this should behave as
-an upsert.output_branch: An optional string representing the branch to output
-results on.scale_down_threshold: An optional Duration object.resource_requests: An optional ResourceSpec object.resource_limits: An optional ResourceSpec object.input: An optional Input object.description: An optional string describing the pipeline.cache_size: An optional string.enable_stats: An optional bool.reprocess: An optional bool. If true, pachyderm forces the pipeline
-to reprocess all datums. It only has meaning if update is True.max_queue_size: An optional int.service: An optional Service object.chunk_spec: An optional ChunkSpec object.datum_timeout: An optional Duration object.job_timeout: An optional Duration object.salt: An optional string.standby: An optional bool.datum_tries: An optional int.scheduling_spec: An optional SchedulingSpec object.pod_patch: An optional string.spout: An optional Spout object.spec_commit: An optional Commit object.job_id: The ID of the job to delete.def deactivate_auth(
self)
+def delete_oidc_client(
self, id)
Deactivates auth, removing all ACLs, tokens, and admins from the -Pachyderm cluster and making all data publicly accessible.
+Delete an OIDC client in the identity server.
def deactivate_enterprise(
self)
+def delete_pipeline(
self, pipeline_name, force=None, keep_repo=None)
Deactivates enterprise.
+Deletes a pipeline.
+ +Params:
+ +pipeline_name: A string representing the pipeline name.force: Whether to force delete.keep_repo: Whether to keep the repo.def delete_all(
self)
+def delete_repo(
self, repo_name, force=None)
Deletes everything in pachyderm.
+Deletes a repo and reclaims the storage space it was using.
+ +Params:
+ +repo_name: The name of the repo.force: If set to true, the repo will be removed regardless of
+errors. This argument should be used with care.def delete_all_pipelines(
self, force=None)
+def delete_secret(
self, secret_name)
Deletes all pipelines.
+Deletes a new secret.
Params:
force: Whether to force delete.secret_name: The name of the secret to delete.def delete_all_repos(
self, force=None)
+def delete_transaction(
self, transaction)
Deletes all repos.
+Deletes a given transaction.
Params:
force: If set to true, the repo will be removed regardless of
-errors. This argument should be used with care.transaction: A string or Transaction object.def delete_all_transactions(
self)
+def diff_file(
self, new_commit, new_path, old_commit=None, old_path=None, shallow=None)
Deletes all transactions.
+Diffs two files. If old_commit or old_path are not specified, the
+same path in the parent of the file specified by new_commit and
+new_path will be used.
Params:
+ +new_commit: A tuple, string, or Commit object representing the
+commit for the new file.new_path: A string specifying the path of the new file.old_commit: A tuple, string, or Commit object representing the
+commit for the old file.old_path: A string specifying the path of the old file.shallow: An optional bool specifying whether to do a shallow diff.def delete_branch(
self, repo_name, branch_name, force=None)
+def dump(
self, filter=None, limit=None)
Deletes a branch, but leaves the commits themselves intact. In other -words, those commits can still be accessed via commit IDs and other -branches they happen to be on.
+Gets a debug dump. Yields byte arrays.
Params:
repo_name: A string specifying the repo name.branch_name: A string specifying the name of the branch to delete.force: A bool specifying whether to force the branch deletion.recursed: An optional bool.filter: An optional Filter object.limit: An optional int, limiting the number of commits/jobs returned
+for each repo/pipeline in the dumpdef delete_commit(
self, commit)
+def extract_auth_tokens(
self)
Deletes a commit.
- -Params:
- -commit: A tuple, string, or Commit object representing the
-commit.This maps to an internal function that is only used for migration.
+Pachyderm's extract and restore functionality calls
+extract_auth_tokens and restore_auth_tokens to move Pachyderm tokens
+between clusters during migration. Currently this function is only used
+for Pachyderm internals, so we're avoiding support for this function in
+python-pachyderm client until we find a use for it (feel free to file an
+issue in github.com/pachyderm/pachyderm).
def delete_file(
self, commit, path)
+def finish_commit(
self, commit, description=None, size_bytes=None, empty=None)
Deletes a file from a Commit. DeleteFile leaves a tombstone in the -Commit, assuming the file isn't written to later attempting to get the -file from the finished commit will result in not found error. The file -will of course remain intact in the Commit's parent.
+Ends the process of committing data to a Repo and persists the +Commit. Once a Commit is finished the data becomes immutable and +future attempts to write to it with ModifyFile will error.
Params:
commit: A tuple, string, or Commit object representing the
commit.path: The path to the file.description: An optional string describing this commit.size_bytes: An optional int.empty: An optional bool. If set, the commit will be closed (its
+finished field will be set to the current time) but its tree will
+be left nil.def delete_job(
self, job_id)
+def finish_transaction(
self, transaction)
Deletes a job by its ID.
+Finishes a given transaction.
Params:
job_id: The ID of the job to delete.transaction: A string or Transaction object.def delete_pipeline(
self, pipeline_name, force=None, keep_repo=None)
+def flush_commit(
self, commits, repos=None)
Deletes a pipeline.
+Blocks until all of the commits which have a set of commits as +provenance have finished. For commits to be considered they must have +all of the specified commits as provenance. This in effect waits for +all of the jobs that are triggered by a set of commits to complete. +It returns an error if any of the commits it's waiting on are +cancelled due to one of the jobs encountering an error during runtime. +Note that it's never necessary to call FlushCommit to run jobs, +they'll run no matter what, FlushCommit just allows you to wait for +them to complete and see their output once they do. This returns an +iterator of CommitInfo objects.
+ +Yields CommitInfo objects.
Params:
pipeline_name: A string representing the pipeline name.force: Whether to force delete.keep_repo: Whether to keep the repo.commits: A list of tuples, strings, or Commit objects
+representing the commits to flush.repos: An optional list of strings specifying repo names. If
+specified, only commits within these repos will be flushed.def delete_repo(
self, repo_name, force=None)
+def flush_job(
self, commits, pipeline_names=None)
Deletes a repo and reclaims the storage space it was using.
+Blocks until all of the jobs which have a set of commits as
+provenance have finished. Yields JobInfo objects.
Params:
repo_name: The name of the repo.force: If set to true, the repo will be removed regardless of
-errors. This argument should be used with care.commits: A list of tuples, strings, or Commit objects
+representing the commits to flush.pipeline_names: An optional list of strings specifying pipeline
+names. If specified, only jobs within these pipelines will be flushed.def delete_secret(
self, secret_name)
+def fsck(
self, fix=None)
Deletes a new secret.
- -Params:
- -secret_name: The name of the secret to delete.Performs a file system consistency check for PFS.
def delete_transaction(
self, transaction)
+def get_activation_code(
self)
Deletes a given transaction.
- -Params:
- -transaction: A string or Transaction object.Returns the enterprise code used to activate Pachdyerm Enterprise in +this cluster.
def diff_file(
self, new_commit, new_path, old_commit=None, old_path=None, shallow=None)
+def get_auth_configuration(
self)
Diffs two files. If old_commit or old_path are not specified, the
-same path in the parent of the file specified by new_commit and
-new_path will be used.
Params:
- -new_commit: A tuple, string, or Commit object representing the
-commit for the new file.new_path: A string specifying the path of the new file.old_commit: A tuple, string, or Commit object representing the
-commit for the old file.old_path: A string specifying the path of the old file.shallow: An optional bool specifying whether to do a shallow diff.Gets the auth configuration. Returns an AuthConfig object.
def dump(
self, filter=None)
+def get_enterprise_state(
self)
Gets a debug dump. Yields byte arrays.
- -Params:
- -recursed: An optional bool.filter: An optional Filter object.Gets the current enterprise state of the cluster. Returns a
+GetEnterpriseResponse object.
def extend_auth_token(
self, token, ttl)
+def get_file(
self, commit, path, URL=None)
Extends an existing auth token.
+Returns a PFSFile object, containing the contents of a file stored
+in PFS.
Params:
token: A string that indicates the Pachyderm token whose TTL is
-being extended.ttl: An int that indicates the approximate remaining lifetime of
-this token, in seconds.commit: A tuple, string, or Commit object representing the
+commit.path: A string specifying the path of the file.def extract(
self, url=None, no_objects=None, no_repos=None, no_pipelines=None)
+def get_groups(
self, username=None)
Extracts cluster data for backup. Yields Op objects.
Gets which groups the given username belongs to. Returns a list of
+strings.
Params:
-url: An optional string specifying an object storage URL. If set,
-data will be extracted to this URL rather than returned.no_objects: An optional bool. If true, will cause extract to omit
-objects (and tags.)no_repos: An optional bool. If true, will cause extract to omit
-repos, commits and branches.no_pipelines: An optional bool. If true, will cause extract to
-omit pipelines.username: A string.
def extract_pipeline(
self, pipeline_name)
+def get_identity_server_config(
self)
Extracts a pipeline for backup. Returns an Op object.
Params:
- -pipeline_name: A string representing a pipeline name to extract.Get the embedded identity server configuration
def finish_commit(
self, commit, description=None, input_tree_object_hash=None, tree_object_hashes=None, datum_object_hash=None, size_bytes=None, empty=None)
+def get_idp_connector(
self, id)
Ends the process of committing data to a Repo and persists the -Commit. Once a Commit is finished the data becomes immutable and -future attempts to write to it with PutFile will error.
- -Params:
- -commit: A tuple, string, or Commit object representing the
-commit.description: An optional string describing this commit.input_tree_object_hash: An optional string specifying an input tree
-object hash.tree_object_hashes: A list of zero or more strings specifying
-object hashes for the output trees.datum_object_hash: An optional string specifying an object hash.size_bytes: An optional int.empty: An optional bool. If set, the commit will be closed (its
-finished field will be set to the current time) but its tree will
-be left nil.Get an IDP connector in the identity server.
def finish_transaction(
self, transaction)
+def get_job_logs(
self, job_id, data_filters=None, datum=None, follow=None, tail=None, use_loki_backend=None, since=None)
Finishes a given transaction.
+Gets logs for a job. Yields LogMessage objects.
Params:
transaction: A string or Transaction object.job_id: A string representing a job to get logs of.data_filters: An optional iterable of strings specifying the names
+of input files from which we want processing logs. This may contain
+multiple files, to query pipelines that contain multiple inputs. Each
+filter may be an absolute path of a file within a pps repo, or it may
+be a hash for that file (to search for files at specific versions.)datum: An optional Datum object.follow: An optional bool specifying whether logs should continue to
+stream forever.tail: An optional int. If nonzero, the number of lines from the end
+of the logs to return. Note: tail applies per container, so you will
+get tail * use_loki_backend: Whether to use loki as a backend for fetching
+logs. Requires a loki-enabled cluster.since: An optional Duration object specifying the start time for
+returned logsdef flush_commit(
self, commits, repos=None)
+def get_oidc_client(
self, id)
Blocks until all of the commits which have a set of commits as -provenance have finished. For commits to be considered they must have -all of the specified commits as provenance. This in effect waits for -all of the jobs that are triggered by a set of commits to complete. -It returns an error if any of the commits it's waiting on are -cancelled due to one of the jobs encountering an error during runtime. -Note that it's never necessary to call FlushCommit to run jobs, -they'll run no matter what, FlushCommit just allows you to wait for -them to complete and see their output once they do. This returns an -iterator of CommitInfo objects.
- -Yields CommitInfo objects.
Params:
- -commits: A list of tuples, strings, or Commit objects
-representing the commits to flush.repos: An optional list of strings specifying repo names. If
-specified, only commits within these repos will be flushed.Get an OIDC client in the identity server.
def flush_job(
self, commits, pipeline_names=None)
+def get_oidc_login(
self)
Blocks until all of the jobs which have a set of commits as
-provenance have finished. Yields JobInfo objects.
Params:
- -commits: A list of tuples, strings, or Commit objects
-representing the commits to flush.pipeline_names: An optional list of strings specifying pipeline
-names. If specified, only jobs within these pipelines will be flushed.Returns the OIDC login configuration.
def fsck(
self, fix=None)
+def get_pipeline_logs(
self, pipeline_name, data_filters=None, master=None, datum=None, follow=None, tail=None, use_loki_backend=None, since=None)
Performs a file system consistency check for PFS.
+Gets logs for a pipeline. Yields LogMessage objects.
Params:
+ +pipeline_name: A string representing a pipeline to get
+logs of.data_filters: An optional iterable of strings specifying the names
+of input files from which we want processing logs. This may contain
+multiple files, to query pipelines that contain multiple inputs. Each
+filter may be an absolute path of a file within a pps repo, or it may
+be a hash for that file (to search for files at specific versions.)master: An optional bool.datum: An optional Datum object.follow: An optional bool specifying whether logs should continue to
+stream forever.tail: An optional int. If nonzero, the number of lines from the end
+of the logs to return. Note: tail applies per container, so you will
+get tail * use_loki_backend: Whether to use loki as a backend for fetching
+logs. Requires a loki-enabled cluster.since: An optional Duration object specifying the start time for
+returned logsdef garbage_collect(
self, memory_bytes=None)
+def get_remote_version(
self)
Runs garbage collection.
- -Params:
- -memory_bytes: An optional int specifying how much memory to use in
-computing which objects are alive. A larger number will result in more
-precise garbage collection (at the cost of more memory usage).def get_acl(
self, repo)
+def get_robot_token(
self, robot, ttl=None)
Gets the ACL of a repo. Returns a GetACLResponse object.
Params:
+Gets a new auth token for a robot user.
-repo: A string specifying the repo to get an ACL for.Params:
+* robot: The name of the robot user.
+* ttl: Optional. The expiration for the token.
+If empty, the token does not expire.
def get_admins(
self)
+def get_role_binding(
self, resource)
Returns a list of strings specifying the cluster admins.
+Returns the current set of cluster role bindings.
def get_auth_configuration(
self)
+def get_users(
self, group)
Gets the auth configuration. Returns an AuthConfig object.
Gets which users below to the given. Returns a list of strings.
Params:
+ +group: A string.
def get_auth_token(
self, subject, ttl=None)
+def glob_file(
self, commit, pattern)
Gets an auth token for a subject. Returns an GetAuthTokenResponse
-object.
Lists files that match a glob pattern. Yields FileInfo objects.
Params:
subject: An optional string. The returned token will allow the
-caller to access resources as this subject.ttl: An optional int that indicates the approximate remaining
-lifetime of this token, in seconds.commit: A tuple, string, or Commit object representing the
+commit.pattern: A string representing a glob pattern.def get_cluster_role_bindings(
self)
+def health(
self)
Returns the current set of cluster role bindings.
-def get_enterprise_state(
self)
+def inspect_branch(
self, repo_name, branch_name)
Gets the current enterprise state of the cluster. Returns a
-GetEnterpriseResponse object.
Inspects a branch. Returns a BranchInfo object.
def get_file(
self, commit, path, offset_bytes=None, size_bytes=None)
+def inspect_cluster(
self)
Returns a PFSFile object, containing the contents of a file stored
-in PFS.
Params:
- -commit: A tuple, string, or Commit object representing the
-commit.path: A string specifying the path of the file.offset_bytes: An optional int. Specifies a number of bytes that
-should be skipped in the beginning of the file.size_bytes: An optional int. limits the total amount of data
-returned, note you will get fewer bytes than size if you pass a value
-larger than the size of the file. If size is set to 0 then all of the
-data will be returned.Inspects a cluster. Returns a ClusterInfo object.
def get_groups(
self, username=None)
+def inspect_commit(
self, commit, block_state=None)
Gets which groups the given username belongs to. Returns a list of
-strings.
Inspects a commit. Returns a CommitInfo object.
Params:
-username: A string.
commit: A tuple, string, or Commit object representing the
+commit.CommitState enum.def get_job_logs(
self, job_id, data_filters=None, datum=None, follow=None, tail=None, use_loki_backend=None)
+def inspect_datum(
self, job_id, datum_id)
Gets logs for a job. Yields LogMessage objects.
Inspects a datum. Returns a DatumInfo object.
Params:
job_id: A string representing a job to get logs of.data_filters: An optional iterable of strings specifying the names
-of input files from which we want processing logs. This may contain
-multiple files, to query pipelines that contain multiple inputs. Each
-filter may be an absolute path of a file within a pps repo, or it may
-be a hash for that file (to search for files at specific versions.)datum: An optional Datum object.follow: An optional bool specifying whether logs should continue to
-stream forever.tail: An optional int. If nonzero, the number of lines from the end
-of the logs to return. Note: tail applies per container, so you will
-get tail * use_loki_backend: Whether to use loki as a backend for fetching
-logs. Requires a loki-enabled cluster.job_id: The ID of the job.datum_id: The ID of the datum.def get_oidc_login(
self)
+def inspect_file(
self, commit, path)
Returns the OIDC login configuration.
+Inspects a file. Returns a FileInfo object.
Params:
+ +commit: A tuple, string, or Commit object representing the
+commit.path: A string specifying the path to the file.def get_one_time_password(
self, subject=None, ttl=None)
+def inspect_job(
self, job_id, block_state=None, output_commit=None, full=None)
If this Client is authenticated as an admin, you can generate a
-one-time password for any given subject. If the caller is not an
-admin or the subject is not set, a one-time password will be
-returned for logged-in subject. Returns a string.
Inspects a job with a given ID. Returns a JobInfo.
Params:
-subject: A string.
-* ttl: An optional int that indicates the approximate remaining
-lifetime of this token, in seconds.
job_id: The ID of the job to inspect.block_state: If true, block until the job completes.output_commit: An optional tuple, string, or Commit object
+representing an output commit to filter on.full: If true, include worker status.def get_pipeline_logs(
self, pipeline_name, data_filters=None, master=None, datum=None, follow=None, tail=None, use_loki_backend=None)
+def inspect_pipeline(
self, pipeline_name, history=None)
Gets logs for a pipeline. Yields LogMessage objects.
Inspects a pipeline. Returns a PipelineInfo object.
Params:
pipeline_name: A string representing a pipeline to get
-logs of.data_filters: An optional iterable of strings specifying the names
-of input files from which we want processing logs. This may contain
-multiple files, to query pipelines that contain multiple inputs. Each
-filter may be an absolute path of a file within a pps repo, or it may
-be a hash for that file (to search for files at specific versions.)master: An optional bool.datum: An optional Datum object.follow: An optional bool specifying whether logs should continue to
-stream forever.tail: An optional int. If nonzero, the number of lines from the end
-of the logs to return. Note: tail applies per container, so you will
-get tail * use_loki_backend: Whether to use loki as a backend for fetching
-logs. Requires a loki-enabled cluster.pipeline_name: A string representing the pipeline name.history: An optional int that indicates to return jobs from
+historical versions of pipelines. Semantics are:
+def get_remote_version(
self)
+def inspect_repo(
self, repo_name)
Returns info about a specific repo. Returns a RepoInfo object.
Params:
+ +repo_name: Name of the repo.def get_scope(
self, username, repos)
+def inspect_secret(
self, secret_name)
Gets the auth scope. Returns a list of Scope objects.
Inspects a secret.
Params:
username: A string specifying the principal (some of which belong
-to robots rather than users, but the name is preserved for now to
-provide compatibility with the pachyderm dash) whose access level is
-queried. To query the access level of a robot user, the caller must
-prefix username with "robot:". If 'username' has no prefix (i.e.
-no ":"), then it's assumed to be a github user's principal.repos: A list of strings specifying the objects to which
-usernames access level is being querieddef get_users(
self, group)
-Gets which users below to the given. Returns a list of strings.
Params:
- -group: A string.
def glob_file(
self, commit, pattern)
-Lists files that match a glob pattern. Yields FileInfo objects.
Params:
- -commit: A tuple, string, or Commit object representing the
-commit.pattern: A string representing a glob pattern.def health(
self)
-def inspect_branch(
self, repo_name, branch_name)
-Inspects a branch. Returns a BranchInfo object.
def inspect_cluster(
self)
-Inspects a cluster. Returns a ClusterInfo object.
def inspect_commit(
self, commit, block_state=None)
-Inspects a commit. Returns a CommitInfo object.
Params:
- -commit: A tuple, string, or Commit object representing the
-commit.CommitState enum.def inspect_datum(
self, job_id, datum_id)
-Inspects a datum. Returns a DatumInfo object.
Params:
- -job_id: The ID of the job.datum_id: The ID of the datum.def inspect_file(
self, commit, path)
-Inspects a file. Returns a FileInfo object.
Params:
- -commit: A tuple, string, or Commit object representing the
-commit.path: A string specifying the path to the file.def inspect_job(
self, job_id, block_state=None, output_commit=None, full=None)
-Inspects a job with a given ID. Returns a JobInfo.
Params:
- -job_id: The ID of the job to inspect.block_state: If true, block until the job completes.output_commit: An optional tuple, string, or Commit object
-representing an output commit to filter on.full: If true, include worker status.def inspect_pipeline(
self, pipeline_name, history=None)
-Inspects a pipeline. Returns a PipelineInfo object.
Params:
- -pipeline_name: A string representing the pipeline name.history: An optional int that indicates to return jobs from
-historical versions of pipelines. Semantics are:
-def inspect_repo(
self, repo_name)
-Returns info about a specific repo. Returns a RepoInfo object.
Params:
- -repo_name: Name of the repo.secret_name: The name of the secret to inspect.def inspect_secret(
self, secret_name)
+def inspect_transaction(
self, transaction)
Inspects a secret.
- -Params:
- -secret_name: The name of the secret to inspect.def inspect_transaction(
self, transaction)
-Inspects a given transaction.
- -Params:
- -transaction: A string or Transaction object.def list_branch(
self, repo_name, reverse=None)
-Lists the active branch objects on a repo. Returns a list of
-BranchInfo objects.
Params:
- -repo_name: A string specifying the repo name.def list_commit(
self, repo_name, to_commit=None, from_commit=None, number=None, reverse=None)
-Lists commits. Yields CommitInfo objects.
Params:
- -repo_name: If only repo_name is given, all commits in the repo
-are returned.to_commit: Optional. Only the ancestors of to, including to
-itself, are considered.from_commit: Optional. Only the descendants of from, including
-from itself, are considered.number: Optional. Determines how many commits are returned. If
-number is 0, all commits that match the aforementioned criteria are
-returned.def list_datum(
self, job_id, page_size=None, page=None)
-Lists datums. Yields ListDatumStreamResponse objects.
Params:
- -job_id: The ID of the job.page_size: An optional int specifying the size of the page.page: An optional int specifying the page number.def list_file(
self, commit, path, history=None, include_contents=None)
-Lists the files in a directory.
- -Params:
- -commit: A tuple, string, or Commit object representing the
-commit.path: The path to the directory.history: An optional int that indicates to return jobs from
-historical versions of pipelines. Semantics are:
-0: Return jobs from the current version of the pipeline or pipelines.
-1: Return the above and jobs from the next most recent version
-2: etc.
--1: Return jobs from all historical versions.include_contents: An optional bool. If True, file contents are
-included.def list_job(
self, pipeline_name=None, input_commit=None, output_commit=None, history=None, full=None)
-Lists jobs. Yields JobInfo objects.
Params:
- -pipeline_name: An optional string representing a pipeline name to
-filter on.input_commit: An optional list of tuples, strings, or Commit
-objects representing input commits to filter on.output_commit: An optional tuple, string, or Commit object
-representing an output commit to filter on.history: An optional int that indicates to return jobs from
-historical versions of pipelines. Semantics are:
-full: An optional bool indicating whether the result should
-include all pipeline details in each JobInfo, or limited information
-including name and status, but excluding information in the pipeline
-spec. Leaving this None (or False) can make the call significantly
-faster in clusters with a large number of pipelines and jobs. Note
-that if input_commit is set, this field is coerced to True.def list_pipeline(
self, history=None)
-Lists pipelines. Returns a PipelineInfos object.
Params:
- -pipeline_name: A string representing the pipeline name.history: An optional int that indicates to return jobs from
-historical versions of pipelines. Semantics are:
-def list_repo(
self)
-Returns info about all repos, as a list of RepoInfo objects.
def list_secret(
self)
-Lists secrets. Returns a list of SecretInfo objects.
def list_transaction(
self)
-Lists transactions.
-def modify_admins(
self, add=None, remove=None)
-Adds and/or removes admins.
-Params:
-* add: An optional list of strings specifying admins to add.
-* remove: An optional list of strings specifying admins to remove.
def modify_cluster_role_binding(
self, principal, roles=None)
-Sets the list of admin roles for a principal.
- -Params:
- -principal: A string specifying the principal.roles: An optional ClusterRoles object specifying cluster-wide
-permissions the principal has. If unspecified, all roles are revoked
-for the principal.def modify_members(
self, group, add=None, remove=None)
-Adds and/or removes members of a group.
- -Params:
- -group: A string.add: An optional list of strings specifying members to add.remove: An optional list of strings specifying members to remove.def profile_cpu(
self, duration, filter=None)
-Gets a CPU profile. Yields byte arrays.
- -Params:
- -duration: A Duration object specifying how long to run the CPU
-profiler.filter: An optional Filter object.def put_file_bytes(
self, commit, path, value, delimiter=None, target_file_datums=None, target_file_bytes=None, overwrite_index=None, header_records=None)
-Uploads a PFS file from a file-like object, bytestring, or iterator -of bytestrings.
- -Params:
- -commit: A tuple, string, or Commit object representing the
-commit.path: A string specifying the path in the repo the file(s) will be
-written to.value: The file contents as bytes, represented as a file-like
-object, bytestring, or iterator of bytestrings.delimiter: An optional int. causes data to be broken up into
-separate files by the delimiter. e.g. if you used
-Delimiter.CSV.value, a separate PFS file will be created for each
-row in the input CSV file, rather than one large CSV file.target_file_datums: An optional int. Specifies the target number of
-datums in each written file. It may be lower if data does not split
-evenly, but will never be higher, unless the value is 0.target_file_bytes: An optional int. Specifies the target number of
-bytes in each written file, files may have more or fewer bytes than
-the target.overwrite_index: An optional int. This is the object index where
-the write starts from. All existing objects starting from the index
-are deleted.header_records: An optional int for splitting data whendelimiter
-is notNONE(orSQL`). It specifies the number of records that are
-converted to a header and applied to all file shards.def put_file_client(
*args, **kwds)
-A context manager that gives a PutFileClient. When the context
-manager exits, any operations enqueued from the PutFileClient are
-executed in a single, atomic PutFile call.
def put_file_url(
self, commit, path, url, delimiter=None, recursive=None, target_file_datums=None, target_file_bytes=None, overwrite_index=None, header_records=None)
-Puts a file using the content found at a URL. The URL is sent to the -server which performs the request.
- -Params:
- -commit: A tuple, string, or Commit object representing the
-commit.path: A string specifying the path to the file.url: A string specifying the url of the file to put.delimiter: An optional int. causes data to be broken up into
-separate files by the delimiter. e.g. if you used
-Delimiter.CSV.value, a separate PFS file will be created for each
-row in the input CSV file, rather than one large CSV file.recursive: allow for recursive scraping of some types URLs, for
-example on s3:// URLs.target_file_datums: An optional int. Specifies the target number of
-datums in each written file. It may be lower if data does not split
-evenly, but will never be higher, unless the value is 0.target_file_bytes: An optional int. Specifies the target number of
-bytes in each written file, files may have more or fewer bytes than
-the target.overwrite_index: An optional int. This is the object index where
-the write starts from. All existing objects starting from the index
-are deleted.header_records: An optional int for splitting data whendelimiter
-is notNONE(orSQL`). It specifies the number of records that are
-converted to a header and applied to all file shards.def restart_datum(
self, job_id, data_filters=None)
-Restarts a datum.
- -Params:
- -job_id: The ID of the job.data_filters: An optional iterable of strings.def restore(
self, requests)
-Restores a cluster.
- -Params:
- -requests: A generator of RestoreRequest objects.def revoke_auth_token(
self, token)
-Revokes an auth token.
- -Params:
- -token: A string that indicates the Pachyderm token that is being
-revoked.def run_cron(
self, pipeline_name)
-Explicitly triggers a pipeline with one or more cron inputs to run -now.
- -Params:
- -pipeline_name: A string representing the pipeline name.def run_pipeline(
self, pipeline_name, provenance=None, job_id=None)
-Runs a pipeline.
- -Params:
- -pipeline_name: A string representing the pipeline name.provenance: An optional iterable of CommitProvenance objects
-representing the pipeline execution provenance.job_id: An optional string specifying a specific job ID to run.def set_acl(
self, repo, entries)
-Sets the ACL of a repo.
- -Params:
- -repo: A string specifying the repo to set an ACL on.entries: A list of ACLEntry objects.def set_auth_configuration(
self, configuration)
-Set the auth configuration.
- -Params:
- -config: An AuthConfig object.def set_groups_for_user(
self, username, groups)
-Sets the group membership for a user.
- -Params:
- -username: A string.groups: A list of strings.def set_scope(
self, username, repo, scope)
-Set the auth scope.
- -Params:
- -username: A string specifying the principal (some of which belong
-to robots rather than users, but the name is preserved for now to
-provide compatibility with the pachyderm dash) whose access level is
-queried. To query the access level of a robot user, the caller must
-prefix username with "robot:". If 'username' has no prefix (i.e.
-no ":"), then it's assumed to be a github user's principal.repo: A string specifying the object to which usernames access
-level is being granted/revoked.scope: An int specifying the access level that username will now
-have. See the Scope enum for variants.def start_commit(
self, repo_name, branch=None, parent=None, description=None, provenance=None)
-Begins the process of committing data to a Repo. Once started you can -write to the Commit with PutFile and when all the data has been -written you must finish the Commit with FinishCommit. NOTE, data is -not persisted until FinishCommit is called. A Commit object is -returned.
- -Params:
- -repo_name: A string specifying the name of the repo.branch: A string specifying the branch name. This is a more
-convenient way to build linear chains of commits. When a commit is
-started with a non-empty branch the value of branch becomes an alias
-for the created Commit. This enables a more intuitive access pattern.
-When the commit is started on a branch the previous head of the branch
-is used as the parent of the commit.parent: An optional Commit object specifying the parent commit.
-Upon creation the new commit will appear identical to the parent
-commit, data can safely be added to the new commit without affecting
-the contents of the parent commit.description: An optional string describing the commit.provenance: An optional iterable of CommitProvenance objects
-specifying the commit provenance.def start_pipeline(
self, pipeline_name)
-Starts a pipeline.
- -Params:
- -pipeline_name: A string representing the pipeline name.def start_transaction(
self)
-Starts a transaction.
-def stop_job(
self, job_id)
-Stops a job by its ID.
- -Params:
- -job_id: The ID of the job to stop.def stop_pipeline(
self, pipeline_name)
-Stops a pipeline.
- -Params:
- -pipeline_name: A string representing the pipeline name.def subscribe_commit(
self, repo_name, branch, from_commit_id=None, state=None, prov=None)
-Yields CommitInfo objects as commits occur.
Params:
- -repo_name: A string specifying the name of the repo.branch: A string specifying branch to subscribe to.from_commit_id: An optional string specifying the commit ID. Only
-commits created since this commit are returned.state: The commit state to filter on.prov: An optional CommitProvenance object.def transaction(
*args, **kwds)
-A context manager for running operations within a transaction. When -the context manager completes, the transaction will be deleted if an -error occurred, or otherwise finished.
-def walk_file(
self, commit, path)
-Walks over all descendant files in a directory. Returns a generator of
-FileInfo objects.
Params:
- -commit: A tuple, string, or Commit object representing the
-commit.path: The path to the directory.def who_am_i(
self)
-Returns info about the user tied to this Client.
class ClusterInfo
- - -A ProtocolMessage
-var DESCRIPTOR
- - - - -var Extensions
- - - - -var deployment_id
- - - - -var id
- - - - -class ClusterRole
- - -An enumeration.
-var FS
- - - - -var SUPER
- - - - -var UNDEFINED
- - - - -var name
- - - - -var value
- - - - -class ClusterRoles
- - -A ProtocolMessage
-var DESCRIPTOR
- - - - -var Extensions
- - - - -var roles
- - - - -class Commit
- - -A ProtocolMessage
-var DESCRIPTOR
- - - - -var Extensions
- - - - -var id
- - - - -var repo
- - - - -class CommitInfo
- - -A ProtocolMessage
-var DESCRIPTOR
- - - - -var Extensions
- - - - -var branch
- - - - -var child_commits
- - - - -var commit
- - - - -var datums
- - - - -var description
- - - - -var finished
- - - - -var origin
- - - - -var parent_commit
- - - - -var provenance
- - - - -var ready_provenance
- - - - -var size_bytes
- - - - -var started
- - - - -var subvenance
- - - - -var subvenant_commits_failure
- - - - -var subvenant_commits_success
- - - - -var subvenant_commits_total
- - - - -var tree
- - - - -var trees
- - - - -class CommitInfos
- - -A ProtocolMessage
-var DESCRIPTOR
- - - - -var Extensions
- - - - -var commit_info
- - - - -class CommitOrigin
- - -A ProtocolMessage
-var DESCRIPTOR
- - - - -var Extensions
- - - - -var kind
- - - - -class CommitProvenance
- - -A ProtocolMessage
-var DESCRIPTOR
- - - - -var Extensions
- - - - -var branch
- - - - -var commit
- - - - -class CommitRange
- - -A ProtocolMessage
-var DESCRIPTOR
- - - - +Inspects a given transaction.
+ +Params:
+ +transaction: A string or Transaction object.var Extensions
+def list_branch(
self, repo_name, reverse=None)
+Lists the active branch objects on a repo. Returns a list of
+BranchInfo objects.
Params:
+ +repo_name: A string specifying the repo name.var lower
+def list_clusters(
self)
+List clusters registered with the license service.
+var upper
+def list_commit(
self, repo_name, to_commit=None, from_commit=None, number=None, reverse=None)
+Lists commits. Yields CommitInfo objects.
class CommitState
- - -An enumeration.
+Params:
+ +repo_name: If only repo_name is given, all commits in the repo
+are returned.to_commit: Optional. Only the ancestors of to, including to
+itself, are considered.from_commit: Optional. Only the descendants of from, including
+from itself, are considered.number: Optional. Determines how many commits are returned. If
+number is 0, all commits that match the aforementioned criteria are
+returned.var FINISHED
+def list_datum(
self, job_id=None)
+Lists datums. Yields DatumInfo objects.
var READY
- +Params:
- - +job_id: An optional int specifying the ID of a job. Exactly one of
+job_id (real) or input (hypothetical) must be set.var STARTED
+def list_file(
self, commit, path, include_contents=None)
+Lists the files in a directory.
+ +Params:
+ +commit: A tuple, string, or Commit object representing the
+commit.path: The path to the directory.include_contents: An optional bool. If True, file contents are
+included.var name
+def list_idp_connectors(
self)
+List IDP connectors in the identity server.
+var value
+def list_job(
self, pipeline_name=None, input_commit=None, output_commit=None, history=None, full=None, jqFilter=None)
+Lists jobs. Yields JobInfo objects.
class Compaction
- - -A ProtocolMessage
+Params:
+ +pipeline_name: An optional string representing a pipeline name to
+filter on.input_commit: An optional list of tuples, strings, or Commit
+objects representing input commits to filter on.output_commit: An optional tuple, string, or Commit object
+representing an output commit to filter on.history: An optional int that indicates to return jobs from
+historical versions of pipelines. Semantics are:
+full: An optional bool indicating whether the result should
+include all pipeline details in each JobInfo, or limited information
+including name and status, but excluding information in the pipeline
+spec. Leaving this None (or False) can make the call significantly
+faster in clusters with a large number of pipelines and jobs. Note
+that if input_commit is set, this field is coerced to True.jqFilter: An optional string containing a jq filter that can
+restrict the list of jobs returned, for conveniencevar DESCRIPTOR
+def list_oidc_clients(
self)
+List OIDC clients in the identity server.
+var Extensions
+def list_pipeline(
self, history=None, allow_incomplete=None, jqFilter=None)
+Lists pipelines. Returns a PipelineInfos object.
Params:
+ +pipeline_name: A string representing the pipeline name.history: An optional int that indicates to return jobs from
+historical versions of pipelines. Semantics are:
+allow_incomplete: An optional boolean that, if set to True, causes
+list_pipeline to return PipelineInfos with incomplete data where the
+pipeline spec cannot beretrieved. Incomplete PipelineInfos will have a
+nil Transform field, but will have the fields present in
+EtcdPipelineInfo.jqFilter: An optional string containing a jq filter that can
+restrict the list of jobs returned, for conveniencevar input_prefixes
+def list_repo(
self)
+Returns info about all repos, as a list of RepoInfo objects.
class ConfigError
- +def list_secret(
self)
+Error for issues related to the pachyderm config file
+Lists secrets. Returns a list of SecretInfo objects.
var args
+def list_transaction(
self)
+Lists transactions.
+def __init__(
self, message)
+def modify_file_client(
*args, **kwds)
Initialize self. See help(type(self)) for accurate signature.
+A context manager that gives a ModifyFileClient. When the context
+manager exits, any operations enqueued from the ModifyFileClient are
+executed in a single, atomic ModifyFile call.
class CopyFileRequest
- + +def modify_members(
self, group, add=None, remove=None)
+A ProtocolMessage
+Adds and/or removes members of a group.
+ +Params:
+ +group: A string.add: An optional list of strings specifying members to add.remove: An optional list of strings specifying members to remove.var DESCRIPTOR
+def modify_role_binding(
self, resource, principal, roles=None)
+Sets the roles for a given principal on a resource.
+ +Params:
+ +resource: The resource to grant the roles on.principal: A string specifying the principal.roles: A list of roles to grant. If empty, all roles are revoked.var Extensions
+def profile_cpu(
self, duration, filter=None)
+Gets a CPU profile. Yields byte arrays.
+ +Params:
+ +duration: A Duration object specifying how long to run the CPU
+profiler.filter: An optional Filter object.var dst
+def put_file_bytes(
self, commit, path, value, delimiter=None, target_file_datums=None, target_file_bytes=None, append=None, header_records=None)
+Uploads a PFS file from a file-like object, bytestring, or iterator +of bytestrings.
+ +Params:
+ +commit: A tuple, string, or Commit object representing the
+commit.path: A string specifying the path in the repo the file(s) will be
+written to.value: The file contents as bytes, represented as a file-like
+object, bytestring, or iterator of bytestrings.delimiter: An optional int. causes data to be broken up into
+separate files by the delimiter. e.g. if you used
+Delimiter.CSV.value, a separate PFS file will be created for each
+row in the input CSV file, rather than one large CSV file.target_file_datums: An optional int. Specifies the target number of
+datums in each written file. It may be lower if data does not split
+evenly, but will never be higher, unless the value is 0.target_file_bytes: An optional int. Specifies the target number of
+bytes in each written file, files may have more or fewer bytes than
+the target.append: An optional bool, if true the data is appended to the file,
+if it already exists.header_records: An optional int for splitting data whendelimiter
+is notNONE(orSQL`). It specifies the number of records that are
+converted to a header and applied to all file shards.var overwrite
+def put_file_url(
self, commit, path, url, delimiter=None, recursive=None, target_file_datums=None, target_file_bytes=None, append=None, header_records=None)
+Puts a file using the content found at a URL. The URL is sent to the +server which performs the request.
+ +Params:
+ +commit: A tuple, string, or Commit object representing the
+commit.path: A string specifying the path to the file.url: A string specifying the url of the file to put.delimiter: An optional int. causes data to be broken up into
+separate files by the delimiter. e.g. if you used
+Delimiter.CSV.value, a separate PFS file will be created for each
+row in the input CSV file, rather than one large CSV file.recursive: allow for recursive scraping of some types URLs, for
+example on s3:// URLs.target_file_datums: An optional int. Specifies the target number of
+datums in each written file. It may be lower if data does not split
+evenly, but will never be higher, unless the value is 0.target_file_bytes: An optional int. Specifies the target number of
+bytes in each written file, files may have more or fewer bytes than
+the target.append: An optional bool, if true the data is appended to the file,
+if it already exists.header_records: An optional int for splitting data whendelimiter
+is notNONE(orSQL`). It specifies the number of records that are
+converted to a header and applied to all file shards.var src
+def renew_tmp_file_set(
self, fileset_id, ttl_seconds)
+Renews a temporary fileset (used internally). Currently, +temp-fileset-related APIs are only used for Pachyderm internals (job +merging), so we're avoiding support for these functions until we find a +use for them (feel free to file an issue in +github.com/pachyderm/pachyderm)
+ +Params:
+ +fileset_id: A string identifying the fileset.ttl_seconds: A int determining the number of seconds to keep alive
+the temporary filesetclass CreateBranchRequest
- +A ProtocolMessage
+ +def restart_datum(
self, job_id, data_filters=None)
+Restarts a datum.
+ +Params:
+ +job_id: The ID of the job.data_filters: An optional iterable of strings.var DESCRIPTOR
+def restore_auth_token(
self, token=None)
+This maps to an internal function that is only used for migration.
+Pachyderm's extract and restore functionality calls
+extract_auth_tokens and restore_auth_tokens to move Pachyderm tokens
+between clusters during migration. Currently this function is only used
+for Pachyderm internals, so we're avoiding support for this function in
+python-pachyderm client until we find a use for it (feel free to file an
+issue in github.com/pachyderm/pachyderm).
var Extensions
+def revoke_auth_token(
self, token)
+Revokes an auth token.
+ +Params:
+ +token: A string that indicates the Pachyderm token that is being
+revoked.var branch
+def run_cron(
self, pipeline_name)
+Explicitly triggers a pipeline with one or more cron inputs to run +now.
-var head
- +Params:
- - +pipeline_name: A string representing the pipeline name.var provenance
+def run_pipeline(
self, pipeline_name, provenance=None, job_id=None)
+Runs a pipeline.
+ +Params:
+ +pipeline_name: A string representing the pipeline name.provenance: An optional iterable of CommitProvenance objects
+representing the pipeline execution provenance.job_id: An optional string specifying a specific job ID to run.var s_branch
+def set_auth_configuration(
self, configuration)
+Set the auth configuration.
+ +Params:
+ +config: An AuthConfig object.var trigger
+def set_groups_for_user(
self, username, groups)
+Sets the group membership for a user.
-class CreateJobRequest
- - -A ProtocolMessage
+Params:
+ +username: A string.groups: A list of strings.var DESCRIPTOR
+def set_identity_server_config(
self, config)
+Configure the embedded identity server.
+ +Params:
+ +issuer: The issuer for the identity server.var Extensions
+def start_commit(
self, repo_name, branch=None, parent=None, description=None, provenance=None)
+Begins the process of committing data to a Repo. Once started you can +write to the Commit with ModifyFile and when all the data has been +written you must finish the Commit with FinishCommit. NOTE, data is +not persisted until FinishCommit is called. A Commit object is +returned.
+ +Params:
+ +repo_name: A string specifying the name of the repo.branch: A string specifying the branch name. This is a more
+convenient way to build linear chains of commits. When a commit is
+started with a non-empty branch the value of branch becomes an alias
+for the created Commit. This enables a more intuitive access pattern.
+When the commit is started on a branch the previous head of the branch
+is used as the parent of the commit.parent: An optional Commit object specifying the parent commit.
+Upon creation the new commit will appear identical to the parent
+commit, data can safely be added to the new commit without affecting
+the contents of the parent commit.description: An optional string describing the commit.provenance: An optional iterable of CommitProvenance objects
+specifying the commit provenance.var data_failed
+def start_pipeline(
self, pipeline_name)
+Starts a pipeline.
+ +Params:
+ +pipeline_name: A string representing the pipeline name.var data_processed
+def start_transaction(
self)
+Starts a transaction.
+var data_recovered
+def stop_job(
self, job_id, output_commit=None)
+Stops a job by its ID.
+ +Params:
+ +job_id: The ID of the job to stop.var data_skipped
+def stop_pipeline(
self, pipeline_name)
+Stops a pipeline.
+ +Params:
+ +pipeline_name: A string representing the pipeline name.var data_total
+def subscribe_commit(
self, repo_name, branch, from_commit_id=None, state=None, prov=None)
+Yields CommitInfo objects as commits occur.
Params:
+ +repo_name: A string specifying the name of the repo.branch: A string specifying branch to subscribe to.from_commit_id: An optional string specifying the commit ID. Only
+commits created since this commit are returned.state: The commit state to filter on.prov: An optional CommitProvenance object.var finished
- - - -var output_commit
+def transaction(
*args, **kwds)
+A context manager for running operations within a transaction. When +the context manager completes, the transaction will be deleted if an +error occurred, or otherwise finished.
+var pipeline
+def update_cluster(
self, id, address)
+Update a cluster registered with the license service.
-var reason
- +Params:
- - +id: The unique ID to identify the cluster.address: A GRPC address for the license server to reach the cluster.var restart
+def update_idp_connector(
self, connector)
+Update an IDP connector in the identity server.
+var started
+def update_oidc_client(
self, client)
+Update an OIDC client in the identity server.
+var state
+def walk_file(
self, commit, path)
+Walks over all descendant files in a directory. Returns a generator of
+FileInfo objects.
var stats
- +Params:
- - +commit: A tuple, string, or Commit object representing the
+commit.path: The path to the directory.var stats_commit
+def who_am_i(
self)
+Returns info about the user tied to this Client.
class CreateObjectRequest
+class ClusterInfo
A ProtocolMessage
@@ -8300,7 +6688,7 @@var DESCRIPTOR
+var DESCRIPTOR
@@ -8310,7 +6698,7 @@var Extensions
+var Extensions
@@ -8320,7 +6708,7 @@var block_ref
+var deployment_id
@@ -8330,7 +6718,7 @@var object
+var id
@@ -8343,7 +6731,7 @@class CreatePipelineRequest
+class ClusterStatus
A ProtocolMessage
@@ -8360,7 +6748,7 @@var DESCRIPTOR
+var DESCRIPTOR
@@ -8370,7 +6758,7 @@var Extensions
+var Extensions
@@ -8380,7 +6768,7 @@var cache_size
+var address
@@ -8390,7 +6778,7 @@var chunk_spec
+var auth_enabled
@@ -8400,7 +6788,7 @@var datum_timeout
+var created_at
@@ -8410,7 +6798,7 @@var datum_tries
+var id
@@ -8420,7 +6808,7 @@var description
+var last_heartbeat
@@ -8430,7 +6818,7 @@var egress
+var version
@@ -8439,38 +6827,28 @@var enable_stats
- - - +class Commit
+ -A ProtocolMessage
var hashtree_spec
- - - -var input
- - - - -var job_timeout
+var DESCRIPTOR
@@ -8480,7 +6858,7 @@var max_queue_size
+var Extensions
@@ -8490,7 +6868,7 @@var metadata
+var id
@@ -8500,7 +6878,7 @@var output_branch
+var repo
@@ -8509,18 +6887,28 @@var parallelism_spec
- - - +class CommitInfo
+ +A ProtocolMessage
+var pipeline
+var DESCRIPTOR
@@ -8530,7 +6918,7 @@var pod_patch
+var Extensions
@@ -8540,7 +6928,7 @@var pod_spec
+var branch
@@ -8550,7 +6938,7 @@var reprocess
+var child_commits
@@ -8560,7 +6948,7 @@var resource_limits
+var commit
@@ -8570,7 +6958,7 @@var resource_requests
+var description
@@ -8580,7 +6968,7 @@var s3_out
+var finished
@@ -8590,7 +6978,7 @@var salt
+var origin
@@ -8600,7 +6988,7 @@var scheduling_spec
+var parent_commit
@@ -8610,7 +6998,7 @@var service
+var provenance
@@ -8620,7 +7008,7 @@var sidecar_resource_limits
+var ready_provenance
@@ -8630,7 +7018,7 @@var spec_commit
+var size_bytes
@@ -8640,7 +7028,7 @@var spout
+var started
@@ -8650,7 +7038,7 @@var standby
+var subvenance
@@ -8660,7 +7048,7 @@var tf_job
+var subvenant_commits_failure
@@ -8670,7 +7058,7 @@var transform
+var subvenant_commits_success
@@ -8680,7 +7068,7 @@var update
+var subvenant_commits_total
@@ -8693,7 +7081,7 @@class CreateRepoRequest
+class CommitInfos
A ProtocolMessage
@@ -8710,7 +7098,7 @@var DESCRIPTOR
+var DESCRIPTOR
@@ -8720,7 +7108,17 @@var Extensions
+var Extensions
+ + + + +var commit_info
@@ -8728,9 +7126,29 @@class CommitOrigin
+ + +A ProtocolMessage
+var description
+var DESCRIPTOR
@@ -8740,7 +7158,7 @@var repo
+var Extensions
@@ -8750,7 +7168,7 @@var update
+var kind
@@ -8763,7 +7181,7 @@class CreateSecretRequest
+class CommitProvenance
A ProtocolMessage
@@ -8780,7 +7198,7 @@var DESCRIPTOR
+var DESCRIPTOR
@@ -8790,7 +7208,7 @@var Extensions
+var Extensions
@@ -8800,7 +7218,17 @@var file
+var branch
+ + + + +var commit
@@ -8813,7 +7241,7 @@class CreateTmpFileSetResponse
+class CommitRange
A ProtocolMessage
@@ -8830,7 +7258,17 @@var