Skip to main content
S3NS
Documentation Technology areas
  • Application development
  • Application hosting
  • Compute
  • Data analytics and pipelines
  • Databases
  • Networking
  • Observability and monitoring
  • Security
  • Storage
Cross-product tools
  • Access and resources management
  • Google Cloud SDK, languages, frameworks, and tools
  • Infrastructure as code
/
Sign in
  • Python
Overview Guides Reference Samples
S3NS
  • Documentation
    • Overview
    • Guides
    • Reference
    • Samples
  • Technology areas
    • More
  • Cross-product tools
    • More
  • Overview
  • Library reference docs
  • google-cloud-asset
  • google-cloud-chronicle
  • google-cloud-documentai
    • Overview
    • documentai APIs
      • Overview
      • Classes
      • Methods
      • Properties and Attributes
    • Changelog
    • Multiprocessing
    • Documentai V1
      • document_processor_service
        • Overview
        • pagers
          • Overview
          • ListEvaluationsAsyncPager
          • ListEvaluationsPager
          • ListProcessorTypesAsyncPager
          • ListProcessorTypesPager
          • ListProcessorVersionsAsyncPager
          • ListProcessorVersionsPager
          • ListProcessorsAsyncPager
          • ListProcessorsPager
        • DocumentProcessorServiceAsyncClient
        • DocumentProcessorServiceClient
      • types
        • Overview
        • Barcode
        • BatchDocumentsInputConfig
        • BatchProcessMetadata
          • Overview
          • IndividualProcessStatus
          • State
        • BatchProcessRequest
          • Overview
          • LabelsEntry
        • BatchProcessResponse
        • BoundingPoly
        • CommonOperationMetadata
          • Overview
          • State
        • CreateProcessorRequest
        • DeleteProcessorMetadata
        • DeleteProcessorRequest
        • DeleteProcessorVersionMetadata
        • DeleteProcessorVersionRequest
        • DeployProcessorVersionMetadata
        • DeployProcessorVersionRequest
        • DeployProcessorVersionResponse
        • DisableProcessorMetadata
        • DisableProcessorRequest
        • DisableProcessorResponse
        • Document
          • Overview
          • ChunkedDocument
            • Overview
            • Chunk
              • Overview
              • ChunkPageFooter
              • ChunkPageHeader
              • ChunkPageSpan
          • DocumentLayout
            • Overview
            • DocumentLayoutBlock
              • Overview
              • LayoutListBlock
              • LayoutListEntry
              • LayoutPageSpan
              • LayoutTableBlock
              • LayoutTableCell
              • LayoutTableRow
              • LayoutTextBlock
          • Entity
            • Overview
            • NormalizedValue
          • EntityRelation
          • Page
            • Overview
            • Block
            • DetectedBarcode
            • DetectedLanguage
            • Dimension
            • FormField
            • Image
            • ImageQualityScores
              • Overview
              • DetectedDefect
            • Layout
              • Overview
              • Orientation
            • Line
            • Matrix
            • Paragraph
            • Symbol
            • Table
              • Overview
              • TableCell
              • TableRow
            • Token
              • Overview
              • DetectedBreak
                • Overview
                • Type
              • StyleInfo
            • VisualElement
          • PageAnchor
            • Overview
            • PageRef
              • Overview
              • LayoutType
          • Provenance
            • Overview
            • OperationType
            • Parent
          • Revision
            • Overview
            • HumanReview
          • ShardInfo
          • Style
            • Overview
            • FontSize
          • TextAnchor
            • Overview
            • TextSegment
          • TextChange
        • DocumentOutputConfig
          • Overview
          • GcsOutputConfig
            • Overview
            • ShardingConfig
        • DocumentSchema
          • Overview
          • EntityType
            • Overview
            • EnumValues
            • Property
              • Overview
              • OccurrenceType
          • Metadata
        • EnableProcessorMetadata
        • EnableProcessorRequest
        • EnableProcessorResponse
        • EvaluateProcessorVersionMetadata
        • EvaluateProcessorVersionRequest
        • EvaluateProcessorVersionResponse
        • Evaluation
          • Overview
          • ConfidenceLevelMetrics
          • Counters
          • EntityMetricsEntry
          • Metrics
          • MultiConfidenceMetrics
            • Overview
            • MetricsType
        • EvaluationReference
        • FetchProcessorTypesRequest
        • FetchProcessorTypesResponse
        • GcsDocument
        • GcsDocuments
        • GcsPrefix
        • GetEvaluationRequest
        • GetProcessorRequest
        • GetProcessorTypeRequest
        • GetProcessorVersionRequest
        • HumanReviewStatus
          • Overview
          • State
        • ListEvaluationsRequest
        • ListEvaluationsResponse
        • ListProcessorTypesRequest
        • ListProcessorTypesResponse
        • ListProcessorVersionsRequest
        • ListProcessorVersionsResponse
        • ListProcessorsRequest
        • ListProcessorsResponse
        • NormalizedVertex
        • OcrConfig
          • Overview
          • Hints
          • PremiumFeatures
        • ProcessOptions
          • Overview
          • IndividualPageSelector
          • LayoutConfig
            • Overview
            • ChunkingConfig
        • ProcessRequest
          • Overview
          • LabelsEntry
        • ProcessResponse
        • Processor
          • Overview
          • State
        • ProcessorType
          • Overview
          • LocationInfo
        • ProcessorVersion
          • Overview
          • DeprecationInfo
          • GenAiModelInfo
            • Overview
            • CustomGenAiModelInfo
              • Overview
              • CustomModelType
            • FoundationGenAiModelInfo
          • ModelType
          • State
        • ProcessorVersionAlias
        • RawDocument
        • ReviewDocumentOperationMetadata
        • ReviewDocumentRequest
          • Overview
          • Priority
        • ReviewDocumentResponse
          • Overview
          • State
        • SetDefaultProcessorVersionMetadata
        • SetDefaultProcessorVersionRequest
        • SetDefaultProcessorVersionResponse
        • TrainProcessorVersionMetadata
          • Overview
          • DatasetValidation
        • TrainProcessorVersionRequest
          • Overview
          • CustomDocumentExtractionOptions
            • Overview
            • TrainingMethod
          • FoundationModelTuningOptions
          • InputData
        • TrainProcessorVersionResponse
        • UndeployProcessorVersionMetadata
        • UndeployProcessorVersionRequest
        • UndeployProcessorVersionResponse
        • Vertex
    • Documentai V1beta3
      • document_processor_service
        • Overview
        • pagers
          • Overview
          • ListEvaluationsAsyncPager
          • ListEvaluationsPager
          • ListProcessorTypesAsyncPager
          • ListProcessorTypesPager
          • ListProcessorVersionsAsyncPager
          • ListProcessorVersionsPager
          • ListProcessorsAsyncPager
          • ListProcessorsPager
        • DocumentProcessorServiceAsyncClient
        • DocumentProcessorServiceClient
      • document_service
        • Overview
        • pagers
          • Overview
          • ListDocumentsAsyncPager
          • ListDocumentsPager
        • DocumentServiceAsyncClient
        • DocumentServiceClient
      • types
        • Overview
        • Barcode
        • BatchDatasetDocuments
          • Overview
          • IndividualDocumentIds
        • BatchDeleteDocumentsMetadata
          • Overview
          • IndividualBatchDeleteStatus
        • BatchDeleteDocumentsRequest
        • BatchDeleteDocumentsResponse
        • BatchDocumentsInputConfig
        • BatchProcessMetadata
          • Overview
          • IndividualProcessStatus
          • State
        • BatchProcessRequest
          • Overview
          • BatchInputConfig
          • BatchOutputConfig
          • LabelsEntry
        • BatchProcessResponse
        • BoundingPoly
        • CommonOperationMetadata
          • Overview
          • State
        • CreateProcessorRequest
        • Dataset
          • Overview
          • DocumentWarehouseConfig
          • GCSManagedConfig
          • SpannerIndexingConfig
          • State
          • UnmanagedDatasetConfig
        • DatasetSchema
        • DatasetSplitType
        • DeleteProcessorMetadata
        • DeleteProcessorRequest
        • DeleteProcessorVersionMetadata
        • DeleteProcessorVersionRequest
        • DeployProcessorVersionMetadata
        • DeployProcessorVersionRequest
        • DeployProcessorVersionResponse
        • DisableProcessorMetadata
        • DisableProcessorRequest
        • DisableProcessorResponse
        • Document
          • Overview
          • ChunkedDocument
            • Overview
            • Chunk
              • Overview
              • ChunkPageFooter
              • ChunkPageHeader
              • ChunkPageSpan
          • DocumentLayout
            • Overview
            • DocumentLayoutBlock
              • Overview
              • LayoutListBlock
              • LayoutListEntry
              • LayoutPageSpan
              • LayoutTableBlock
              • LayoutTableCell
              • LayoutTableRow
              • LayoutTextBlock
          • Entity
            • Overview
            • NormalizedValue
          • EntityRelation
          • Page
            • Overview
            • Block
            • DetectedBarcode
            • DetectedLanguage
            • Dimension
            • FormField
            • Image
            • ImageQualityScores
              • Overview
              • DetectedDefect
            • Layout
              • Overview
              • Orientation
            • Line
            • Matrix
            • Paragraph
            • Symbol
            • Table
              • Overview
              • TableCell
              • TableRow
            • Token
              • Overview
              • DetectedBreak
                • Overview
                • Type
              • StyleInfo
            • VisualElement
          • PageAnchor
            • Overview
            • PageRef
              • Overview
              • LayoutType
          • Provenance
            • Overview
            • OperationType
            • Parent
          • Revision
            • Overview
            • HumanReview
          • ShardInfo
          • Style
            • Overview
            • FontSize
          • TextAnchor
            • Overview
            • TextSegment
          • TextChange
        • DocumentId
          • Overview
          • GCSManagedDocumentId
          • UnmanagedDocumentId
        • DocumentLabelingState
        • DocumentMetadata
        • DocumentOutputConfig
          • Overview
          • GcsOutputConfig
            • Overview
            • ShardingConfig
        • DocumentPageRange
        • DocumentSchema
          • Overview
          • EntityType
            • Overview
            • EnumValues
            • Property
              • Overview
              • OccurrenceType
          • Metadata
        • EnableProcessorMetadata
        • EnableProcessorRequest
        • EnableProcessorResponse
        • EntityTypeMetadata
        • EvaluateProcessorVersionMetadata
        • EvaluateProcessorVersionRequest
        • EvaluateProcessorVersionResponse
        • Evaluation
          • Overview
          • ConfidenceLevelMetrics
          • Counters
          • EntityMetricsEntry
          • Metrics
          • MultiConfidenceMetrics
            • Overview
            • MetricsType
        • EvaluationReference
        • FetchProcessorTypesRequest
        • FetchProcessorTypesResponse
        • FieldExtractionMetadata
        • GcsDocument
        • GcsDocuments
        • GcsPrefix
        • GetDatasetSchemaRequest
        • GetDocumentRequest
        • GetDocumentResponse
        • GetEvaluationRequest
        • GetProcessorRequest
        • GetProcessorTypeRequest
        • GetProcessorVersionRequest
        • HumanReviewStatus
          • Overview
          • State
        • ImportDocumentsMetadata
          • Overview
          • ImportConfigValidationResult
          • IndividualImportStatus
        • ImportDocumentsRequest
          • Overview
          • BatchDocumentsImportConfig
            • Overview
            • AutoSplitConfig
        • ImportDocumentsResponse
        • ImportProcessorVersionMetadata
        • ImportProcessorVersionRequest
          • Overview
          • ExternalProcessorVersionSource
        • ImportProcessorVersionResponse
        • ListDocumentsRequest
        • ListDocumentsResponse
        • ListEvaluationsRequest
        • ListEvaluationsResponse
        • ListProcessorTypesRequest
        • ListProcessorTypesResponse
        • ListProcessorVersionsRequest
        • ListProcessorVersionsResponse
        • ListProcessorsRequest
        • ListProcessorsResponse
        • NormalizedVertex
        • OcrConfig
          • Overview
          • Hints
          • PremiumFeatures
        • ProcessOptions
          • Overview
          • IndividualPageSelector
          • LayoutConfig
            • Overview
            • ChunkingConfig
        • ProcessRequest
          • Overview
          • LabelsEntry
        • ProcessResponse
        • Processor
          • Overview
          • State
        • ProcessorType
          • Overview
          • LocationInfo
        • ProcessorVersion
          • Overview
          • DeprecationInfo
          • GenAiModelInfo
            • Overview
            • CustomGenAiModelInfo
              • Overview
              • CustomModelType
            • FoundationGenAiModelInfo
          • ModelType
          • State
        • ProcessorVersionAlias
        • PropertyMetadata
        • RawDocument
        • ReviewDocumentOperationMetadata
          • Overview
          • State
        • ReviewDocumentRequest
          • Overview
          • Priority
        • ReviewDocumentResponse
          • Overview
          • State
        • RevisionRef
          • Overview
          • RevisionCase
        • SetDefaultProcessorVersionMetadata
        • SetDefaultProcessorVersionRequest
        • SetDefaultProcessorVersionResponse
        • SummaryOptions
          • Overview
          • Format
          • Length
        • TrainProcessorVersionMetadata
          • Overview
          • DatasetValidation
        • TrainProcessorVersionRequest
          • Overview
          • CustomDocumentExtractionOptions
            • Overview
            • TrainingMethod
          • FoundationModelTuningOptions
          • InputData
        • TrainProcessorVersionResponse
        • UndeployProcessorVersionMetadata
        • UndeployProcessorVersionRequest
        • UndeployProcessorVersionResponse
        • UpdateDatasetOperationMetadata
        • UpdateDatasetRequest
        • UpdateDatasetSchemaRequest
        • Vertex
  • google-cloud-retail
  • google-cloud-storagebatchoperations
  • Application development
  • Application hosting
  • Compute
  • Data analytics and pipelines
  • Databases
  • Networking
  • Observability and monitoring
  • Security
  • Storage
  • Access and resources management
  • Google Cloud SDK, languages, frameworks, and tools
  • Infrastructure as code
Some or all of the information on this page might not apply to Trusted Cloud by S3NS.
  • Home
  • Python
  • Documentation
  • Reference
Note: Some or all of the information on this page might not apply to Trusted Cloud. For a list of services that are available in Trusted Cloud, see Services available for Trusted Cloud.
  • 3.5.0 (latest)
  • 3.4.0
  • 3.3.0
  • 3.2.0
  • 3.1.0
  • 3.0.1
  • 2.35.0
  • 2.34.0
  • 2.33.0
  • 2.32.0
  • 2.30.0
  • 2.29.3
  • 2.28.0
  • 2.27.1
  • 2.26.0
  • 2.25.0
  • 2.24.2
  • 2.23.0
  • 2.22.0
  • 2.21.1
  • 2.20.2
  • 2.19.0
  • 2.18.0
  • 2.17.0
  • 2.16.1
  • 2.15.0
  • 2.14.0
  • 2.13.0
  • 2.12.0
  • 2.11.0
  • 2.10.0
  • 2.9.1
  • 2.8.0
  • 2.7.0
  • 2.6.0
  • 2.5.0
  • 2.4.1
  • 2.3.0
  • 2.2.0
  • 2.1.0
  • 2.0.3
  • 1.5.1
  • 1.4.2
  • 1.3.0
  • 1.2.1
  • 1.1.0
  • 1.0.0
  • 0.5.2
  • 0.4.0
  • 0.3.0
  • 0.2.0
  • 0.1.0

Multiprocessing

NOTE: Because this client uses grpc library, it is safe to share instances across threads. In multiprocessing scenarios, the best practice is to create client instances after the invocation of os.fork() by multiprocessing.pool.Pool or multiprocessing.Process.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-02 UTC.

  • Terms
  • Privacy
  • Manage cookies