Module pachyderm_sdk.api.cdr

Expand source code
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# sources: api/cdr/cdr.proto
# plugin: python-betterproto
# This file has been @generated
from dataclasses import dataclass
from typing import (
    TYPE_CHECKING,
    Dict,
    List,
)

import betterproto
import betterproto.lib.google.protobuf as betterproto_lib_google_protobuf


if TYPE_CHECKING:
    import grpc


class HashAlgo(betterproto.Enum):
    UNKNOWN_HASH = 0
    BLAKE2b_256 = 1


class CipherAlgo(betterproto.Enum):
    UNKNOWN_CIPHER = 0
    CHACHA20 = 1


class CompressAlgo(betterproto.Enum):
    UNKNOWN_COMPRESS = 0
    GZIP = 1


@dataclass(eq=False, repr=False)
class Ref(betterproto.Message):
    http: "Http" = betterproto.message_field(1, group="body")
    """Sources"""

    content_hash: "ContentHash" = betterproto.message_field(2, group="body")
    """Constraints"""

    size_limits: "SizeLimits" = betterproto.message_field(3, group="body")
    cipher: "Cipher" = betterproto.message_field(4, group="body")
    """1:1 Transforms"""

    compress: "Compress" = betterproto.message_field(5, group="body")
    slice: "Slice" = betterproto.message_field(6, group="body")
    concat: "Concat" = betterproto.message_field(7, group="body")
    """Many:1 Transforms"""


@dataclass(eq=False, repr=False)
class Http(betterproto.Message):
    url: str = betterproto.string_field(1)
    headers: Dict[str, str] = betterproto.map_field(
        2, betterproto.TYPE_STRING, betterproto.TYPE_STRING
    )


@dataclass(eq=False, repr=False)
class ContentHash(betterproto.Message):
    """Contraints"""

    inner: "Ref" = betterproto.message_field(1)
    algo: "HashAlgo" = betterproto.enum_field(2)
    hash: bytes = betterproto.bytes_field(3)


@dataclass(eq=False, repr=False)
class SizeLimits(betterproto.Message):
    inner: "Ref" = betterproto.message_field(1)
    min: int = betterproto.int64_field(2)
    max: int = betterproto.int64_field(3)


@dataclass(eq=False, repr=False)
class Cipher(betterproto.Message):
    """1:1 Transforms"""

    inner: "Ref" = betterproto.message_field(1)
    algo: "CipherAlgo" = betterproto.enum_field(2)
    key: bytes = betterproto.bytes_field(3)
    nonce: bytes = betterproto.bytes_field(4)


@dataclass(eq=False, repr=False)
class Compress(betterproto.Message):
    inner: "Ref" = betterproto.message_field(1)
    algo: "CompressAlgo" = betterproto.enum_field(2)


@dataclass(eq=False, repr=False)
class Slice(betterproto.Message):
    """1:1 Transforms"""

    inner: "Ref" = betterproto.message_field(1)
    start: int = betterproto.uint64_field(2)
    end: int = betterproto.uint64_field(3)


@dataclass(eq=False, repr=False)
class Concat(betterproto.Message):
    """Many:1 Transforms"""

    refs: List["Ref"] = betterproto.message_field(1)

Sub-modules

pachyderm_sdk.api.cdr.resolver

Handwritten classes/methods that augment the existing CDR API.

Classes

class HashAlgo (*args, **kwds)

The base class for protobuf enumerations, all generated enumerations will inherit from this. Bases :class:enum.IntEnum.

Expand source code
class HashAlgo(betterproto.Enum):
    UNKNOWN_HASH = 0
    BLAKE2b_256 = 1

Ancestors

  • betterproto.Enum
  • enum.IntEnum
  • builtins.int
  • enum.ReprEnum
  • enum.Enum

Class variables

var UNKNOWN_HASH
var BLAKE2b_256
class CipherAlgo (*args, **kwds)

The base class for protobuf enumerations, all generated enumerations will inherit from this. Bases :class:enum.IntEnum.

Expand source code
class CipherAlgo(betterproto.Enum):
    UNKNOWN_CIPHER = 0
    CHACHA20 = 1

Ancestors

  • betterproto.Enum
  • enum.IntEnum
  • builtins.int
  • enum.ReprEnum
  • enum.Enum

Class variables

var UNKNOWN_CIPHER
var CHACHA20
class CompressAlgo (*args, **kwds)

The base class for protobuf enumerations, all generated enumerations will inherit from this. Bases :class:enum.IntEnum.

Expand source code
class CompressAlgo(betterproto.Enum):
    UNKNOWN_COMPRESS = 0
    GZIP = 1

Ancestors

  • betterproto.Enum
  • enum.IntEnum
  • builtins.int
  • enum.ReprEnum
  • enum.Enum

Class variables

var UNKNOWN_COMPRESS
var GZIP
class Ref (http: Http = None, content_hash: ContentHash = None, size_limits: SizeLimits = None, cipher: Cipher = None, compress: Compress = None, slice: Slice = None, concat: Concat = None)

Ref(http: 'Http' = None, content_hash: 'ContentHash' = None, size_limits: 'SizeLimits' = None, cipher: 'Cipher' = None, compress: 'Compress' = None, slice: 'Slice' = None, concat: 'Concat' = None)

Expand source code
@dataclass(eq=False, repr=False)
class Ref(betterproto.Message):
    http: "Http" = betterproto.message_field(1, group="body")
    """Sources"""

    content_hash: "ContentHash" = betterproto.message_field(2, group="body")
    """Constraints"""

    size_limits: "SizeLimits" = betterproto.message_field(3, group="body")
    cipher: "Cipher" = betterproto.message_field(4, group="body")
    """1:1 Transforms"""

    compress: "Compress" = betterproto.message_field(5, group="body")
    slice: "Slice" = betterproto.message_field(6, group="body")
    concat: "Concat" = betterproto.message_field(7, group="body")
    """Many:1 Transforms"""

Ancestors

  • betterproto.Message
  • abc.ABC

Class variables

var httpHttp

Sources

var content_hashContentHash

Constraints

var size_limitsSizeLimits
var cipherCipher

1:1 Transforms

var compressCompress
var sliceSlice
var concatConcat

Many:1 Transforms

class Http (url: str = None, headers: Dict[str, str] = None)

Http(url: str = None, headers: Dict[str, str] = None)

Expand source code
@dataclass(eq=False, repr=False)
class Http(betterproto.Message):
    url: str = betterproto.string_field(1)
    headers: Dict[str, str] = betterproto.map_field(
        2, betterproto.TYPE_STRING, betterproto.TYPE_STRING
    )

Ancestors

  • betterproto.Message
  • abc.ABC

Class variables

var url : str
var headers : Dict[str, str]
class ContentHash (inner: Ref = None, algo: HashAlgo = None, hash: bytes = None)

Contraints

Expand source code
@dataclass(eq=False, repr=False)
class ContentHash(betterproto.Message):
    """Contraints"""

    inner: "Ref" = betterproto.message_field(1)
    algo: "HashAlgo" = betterproto.enum_field(2)
    hash: bytes = betterproto.bytes_field(3)

Ancestors

  • betterproto.Message
  • abc.ABC

Class variables

var innerRef
var algoHashAlgo
var hash : bytes
class SizeLimits (inner: Ref = None, min: int = None, max: int = None)

SizeLimits(inner: 'Ref' = None, min: int = None, max: int = None)

Expand source code
@dataclass(eq=False, repr=False)
class SizeLimits(betterproto.Message):
    inner: "Ref" = betterproto.message_field(1)
    min: int = betterproto.int64_field(2)
    max: int = betterproto.int64_field(3)

Ancestors

  • betterproto.Message
  • abc.ABC

Class variables

var innerRef
var min : int
var max : int
class Cipher (inner: Ref = None, algo: CipherAlgo = None, key: bytes = None, nonce: bytes = None)

1:1 Transforms

Expand source code
@dataclass(eq=False, repr=False)
class Cipher(betterproto.Message):
    """1:1 Transforms"""

    inner: "Ref" = betterproto.message_field(1)
    algo: "CipherAlgo" = betterproto.enum_field(2)
    key: bytes = betterproto.bytes_field(3)
    nonce: bytes = betterproto.bytes_field(4)

Ancestors

  • betterproto.Message
  • abc.ABC

Class variables

var innerRef
var algoCipherAlgo
var key : bytes
var nonce : bytes
class Compress (inner: Ref = None, algo: CompressAlgo = None)

Compress(inner: 'Ref' = None, algo: 'CompressAlgo' = None)

Expand source code
@dataclass(eq=False, repr=False)
class Compress(betterproto.Message):
    inner: "Ref" = betterproto.message_field(1)
    algo: "CompressAlgo" = betterproto.enum_field(2)

Ancestors

  • betterproto.Message
  • abc.ABC

Class variables

var innerRef
var algoCompressAlgo
class Slice (inner: Ref = None, start: int = None, end: int = None)

1:1 Transforms

Expand source code
@dataclass(eq=False, repr=False)
class Slice(betterproto.Message):
    """1:1 Transforms"""

    inner: "Ref" = betterproto.message_field(1)
    start: int = betterproto.uint64_field(2)
    end: int = betterproto.uint64_field(3)

Ancestors

  • betterproto.Message
  • abc.ABC

Class variables

var innerRef
var start : int
var end : int
class Concat (refs: List[ForwardRef('Ref')] = None)

Many:1 Transforms

Expand source code
@dataclass(eq=False, repr=False)
class Concat(betterproto.Message):
    """Many:1 Transforms"""

    refs: List["Ref"] = betterproto.message_field(1)

Ancestors

  • betterproto.Message
  • abc.ABC

Class variables

var refs : List[Ref]