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
  • BigQuery DataFrames
  • google-cloud-aiplatform
  • google-cloud-asset
  • google-cloud-bigquery-storage
  • google-cloud-chronicle
  • google-cloud-compute
  • google-cloud-datacatalog
  • google-cloud-dataplex
  • google-cloud-documentai
  • google-cloud-financialservices
  • google-cloud-gdchardwaremanagement
  • google-cloud-gke-backup
  • google-cloud-logging
  • google-cloud-lustre
  • google-cloud-modelarmor
  • google-cloud-netapp
  • google-cloud-org-policy
  • google-cloud-retail
  • google-cloud-secret-manager
  • google-cloud-spanner
    • Overview
    • Advanced Session Pool Topics
    • API Reference
    • Batch API
    • Batching Modifications
    • Changelog
    • Spanner Client
    • Spanner Client
    • Database API
    • Database Admin
    • Instance API
    • Instance Admin
    • Keyset API
    • Multiprocessing
    • Tracing with OpenTelemetry
    • Session API
    • Snapshot API
    • Read-only Transactions via Snapshots
    • StreamedResultSet API
    • Table API
    • Table Admin
    • Transaction API
    • Read-write Transactions
    • Spanner Admin Database V1
      • database_admin
        • Overview
        • pagers
          • Overview
          • ListBackupOperationsAsyncPager
          • ListBackupOperationsPager
          • ListBackupsAsyncPager
          • ListBackupsPager
          • ListDatabaseOperationsAsyncPager
          • ListDatabaseOperationsPager
          • ListDatabaseRolesAsyncPager
          • ListDatabaseRolesPager
          • ListDatabasesAsyncPager
          • ListDatabasesPager
        • DatabaseAdminAsyncClient
        • DatabaseAdminClient
      • types
        • Overview
        • Backup
          • Overview
          • State
        • BackupInfo
        • CopyBackupEncryptionConfig
          • Overview
          • EncryptionType
        • CopyBackupMetadata
        • CopyBackupRequest
        • CreateBackupEncryptionConfig
          • Overview
          • EncryptionType
        • CreateBackupMetadata
        • CreateBackupRequest
        • CreateDatabaseMetadata
        • CreateDatabaseRequest
        • Database
          • Overview
          • State
        • DatabaseDialect
        • DatabaseRole
        • DeleteBackupRequest
        • DropDatabaseRequest
        • EncryptionConfig
        • EncryptionInfo
          • Overview
          • Type
        • GetBackupRequest
        • GetDatabaseDdlRequest
        • GetDatabaseDdlResponse
        • GetDatabaseRequest
        • ListBackupOperationsRequest
        • ListBackupOperationsResponse
        • ListBackupsRequest
        • ListBackupsResponse
        • ListDatabaseOperationsRequest
        • ListDatabaseOperationsResponse
        • ListDatabaseRolesRequest
        • ListDatabaseRolesResponse
        • ListDatabasesRequest
        • ListDatabasesResponse
        • OperationProgress
        • OptimizeRestoredDatabaseMetadata
        • RestoreDatabaseEncryptionConfig
          • Overview
          • EncryptionType
        • RestoreDatabaseMetadata
        • RestoreDatabaseRequest
        • RestoreInfo
        • RestoreSourceType
        • UpdateBackupRequest
        • UpdateDatabaseDdlMetadata
        • UpdateDatabaseDdlRequest
    • Spanner Admin Instance V1
      • instance_admin
        • Overview
        • pagers
          • Overview
          • ListInstanceConfigOperationsAsyncPager
          • ListInstanceConfigOperationsPager
          • ListInstanceConfigsAsyncPager
          • ListInstanceConfigsPager
          • ListInstancesAsyncPager
          • ListInstancesPager
        • InstanceAdminAsyncClient
        • InstanceAdminClient
      • types
        • Overview
        • CreateInstanceConfigMetadata
        • CreateInstanceConfigRequest
        • CreateInstanceMetadata
        • CreateInstanceRequest
        • DeleteInstanceConfigRequest
        • DeleteInstanceRequest
        • GetInstanceConfigRequest
        • GetInstanceRequest
        • Instance
          • Overview
          • LabelsEntry
          • State
        • InstanceConfig
          • Overview
          • LabelsEntry
          • State
          • Type
        • ListInstanceConfigOperationsRequest
        • ListInstanceConfigOperationsResponse
        • ListInstanceConfigsRequest
        • ListInstanceConfigsResponse
        • ListInstancesRequest
        • ListInstancesResponse
        • OperationProgress
        • ReplicaInfo
          • Overview
          • ReplicaType
        • UpdateInstanceConfigMetadata
        • UpdateInstanceConfigRequest
        • UpdateInstanceMetadata
        • UpdateInstanceRequest
    • Spanner V1
      • batch
        • Overview
        • Batch
      • client
        • Overview
        • Client
      • database
        • Overview
        • BatchCheckout
        • BatchSnapshot
        • Database
        • SnapshotCheckout
      • instance
        • Overview
        • Instance
      • keyset
        • Overview
        • KeyRange
        • KeySet
      • pool
        • Overview
        • AbstractSessionPool
        • BurstyPool
        • FixedSizePool
        • PingingPool
        • SessionCheckout
        • TransactionPingingPool
      • spanner
        • Overview
        • pagers
          • Overview
          • ListSessionsAsyncPager
          • ListSessionsPager
        • SpannerAsyncClient
        • SpannerClient
      • session
        • Overview
        • Session
      • snapshot
        • Overview
        • Snapshot
      • streamed
        • Overview
        • StreamedResultSet
        • Unmergeable
      • table
        • Overview
        • Table
      • transaction
        • Overview
        • Transaction
      • types
        • Overview
        • BatchCreateSessionsRequest
        • BatchCreateSessionsResponse
        • BeginTransactionRequest
        • CommitRequest
        • CommitResponse
          • Overview
          • CommitStats
        • CreateSessionRequest
        • DeleteSessionRequest
        • ExecuteBatchDmlRequest
          • Overview
          • Statement
            • Overview
            • ParamTypesEntry
        • ExecuteBatchDmlResponse
        • ExecuteSqlRequest
          • Overview
          • ParamTypesEntry
          • QueryMode
          • QueryOptions
        • GetSessionRequest
        • KeyRange
        • KeySet
        • ListSessionsRequest
        • ListSessionsResponse
        • Mutation
          • Overview
          • Delete
          • Write
        • PartialResultSet
        • Partition
        • PartitionOptions
        • PartitionQueryRequest
          • Overview
          • ParamTypesEntry
        • PartitionReadRequest
        • PartitionResponse
        • PlanNode
          • Overview
          • ChildLink
          • Kind
          • ShortRepresentation
            • Overview
            • SubqueriesEntry
        • QueryPlan
        • ReadRequest
        • RequestOptions
          • Overview
          • Priority
        • ResultSet
        • ResultSetMetadata
        • ResultSetStats
        • RollbackRequest
        • Session
          • Overview
          • LabelsEntry
        • StructType
          • Overview
          • Field
        • Transaction
        • TransactionOptions
          • Overview
          • PartitionedDml
          • ReadOnly
          • ReadWrite
        • TransactionSelector
        • Type
        • TypeAnnotationCode
        • TypeCode
  • 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.55.0 (latest)
  • 3.54.0
  • 3.53.0
  • 3.52.0
  • 3.51.0
  • 3.50.1
  • 3.46.0
  • 3.45.0
  • 3.44.0
  • 3.43.0
  • 3.42.0
  • 3.41.0
  • 3.40.1
  • 3.39.0
  • 3.38.0
  • 3.37.0
  • 3.36.0
  • 3.35.1
  • 3.34.0
  • 3.33.0
  • 3.32.0
  • 3.31.0
  • 3.30.0
  • 3.29.0
  • 3.28.0
  • 3.27.1
  • 3.26.0
  • 3.25.0
  • 3.24.0
  • 3.23.0
  • 3.22.2
  • 3.21.0
  • 3.20.0
  • 3.19.0
  • 3.18.0
  • 3.17.0
  • 3.16.0
  • 3.15.1
  • 3.14.1
  • 3.13.0
  • 3.12.1
  • 3.11.1
  • 3.10.0
  • 3.9.0
  • 3.8.0
  • 3.7.0
  • 3.6.0
  • 3.5.0
  • 3.4.0
  • 3.3.0
  • 3.2.0
  • 3.1.0
  • 3.0.0
  • 2.1.1
  • 2.0.0
  • 1.19.3
  • 1.18.0
  • 1.17.1
  • 1.16.0
  • 1.15.1
  • 1.14.0
  • 1.13.0
  • 1.12.0
  • 1.11.0
  • 1.10.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