diff --git a/docs/build/doctrees/adobe.pdfservices.operation.doctree b/docs/build/doctrees/adobe.pdfservices.operation.doctree index 5028490..7d32a75 100644 Binary files a/docs/build/doctrees/adobe.pdfservices.operation.doctree and b/docs/build/doctrees/adobe.pdfservices.operation.doctree differ diff --git a/docs/build/doctrees/environment.pickle b/docs/build/doctrees/environment.pickle index 79ee81f..a289986 100644 Binary files a/docs/build/doctrees/environment.pickle and b/docs/build/doctrees/environment.pickle differ diff --git a/docs/build/doctrees/reference/index.doctree b/docs/build/doctrees/reference/index.doctree index 14eaab6..acaefe8 100644 Binary files a/docs/build/doctrees/reference/index.doctree and b/docs/build/doctrees/reference/index.doctree differ diff --git a/docs/build/html/adobe.pdfservices.operation.html b/docs/build/html/adobe.pdfservices.operation.html index f260681..eea6d1e 100644 --- a/docs/build/html/adobe.pdfservices.operation.html +++ b/docs/build/html/adobe.pdfservices.operation.html @@ -163,7 +163,8 @@

Submodules
{
     "connectTimeout": "4000",
-    "readTimeout": "20000"
+    "readTimeout": "20000",
+    "region": "eu"
 }
 
@@ -187,12 +188,12 @@

Submodules -
-with_pdf_services_uri(pdf_services_uri: str)
-

Sets the pdf services uri link.

+
+with_read_timeout(read_timeout: int)
+

Sets the read timeout. It should be greater than zero.

Parameters
-

pdf_services_uri (str) – url for the new rest api

+

read_timeout (int) – Defines the read timeout in milliseconds, The number of milliseconds the client will wait for the server to send a response after the connection is established. Default value is 10000 milliseconds

Returns

This Builder instance to add any additional parameters.

@@ -204,12 +205,12 @@

Submodules -
-with_read_timeout(read_timeout: int)
-

Sets the read timeout. It should be greater than zero.

+
+with_region(region: adobe.pdfservices.operation.region.Region)
+

Updates the relevant value for the region.

Parameters
-

read_timeout (int) – Defines the read timeout in milliseconds, The number of milliseconds the client will wait for the server to send a response after the connection is established. Default value is 10000 milliseconds

+

region (Region) – Service region(US or EU). Default value is US.

Returns

This Builder instance to add any additional parameters.

diff --git a/docs/build/html/genindex.html b/docs/build/html/genindex.html index 825da42..b233626 100644 --- a/docs/build/html/genindex.html +++ b/docs/build/html/genindex.html @@ -573,12 +573,12 @@

W

  • with_include_styling_info() (adobe.pdfservices.operation.pdfops.options.extractpdf.extract_pdf_options.ExtractPDFOptions.Builder method), [1]
  • with_organization_id() (adobe.pdfservices.operation.auth.service_account_credentials.ServiceAccountCredentials.Builder method), [1], [2] -
  • -
  • with_pdf_services_uri() (adobe.pdfservices.operation.client_config.ClientConfig.Builder method), [1], [2]
  • with_private_key() (adobe.pdfservices.operation.auth.service_account_credentials.ServiceAccountCredentials.Builder method), [1], [2]
  • -
  • with_read_timeout() (adobe.pdfservices.operation.client_config.ClientConfig.Builder method), [1], [2] +
  • with_read_timeout() (adobe.pdfservices.operation.client_config.ClientConfig.Builder method), [1], [2] +
  • +
  • with_region() (adobe.pdfservices.operation.client_config.ClientConfig.Builder method), [1], [2]
  • with_table_structure_format() (adobe.pdfservices.operation.pdfops.options.extractpdf.extract_pdf_options.ExtractPDFOptions.Builder method), [1]
  • diff --git a/docs/build/html/objects.inv b/docs/build/html/objects.inv index 04c3888..44ebe56 100644 Binary files a/docs/build/html/objects.inv and b/docs/build/html/objects.inv differ diff --git a/docs/build/html/reference/index.html b/docs/build/html/reference/index.html index 3a04944..d538c99 100644 --- a/docs/build/html/reference/index.html +++ b/docs/build/html/reference/index.html @@ -123,7 +123,8 @@

    ClientConfig
    {
         "connectTimeout": "4000",
    -    "readTimeout": "20000"
    +    "readTimeout": "20000",
    +    "region": "eu"
     }
     
    @@ -147,12 +148,12 @@

    ClientConfig -
    -with_pdf_services_uri(pdf_services_uri: str)
    -

    Sets the pdf services uri link.

    +
    +with_read_timeout(read_timeout: int)
    +

    Sets the read timeout. It should be greater than zero.

    Parameters
    -

    pdf_services_uri (str) – url for the new rest api

    +

    read_timeout (int) – Defines the read timeout in milliseconds, The number of milliseconds the client will wait for the server to send a response after the connection is established. Default value is 10000 milliseconds

    Returns

    This Builder instance to add any additional parameters.

    @@ -164,12 +165,12 @@

    ClientConfig -
    -with_read_timeout(read_timeout: int)
    -

    Sets the read timeout. It should be greater than zero.

    +
    +with_region(region: adobe.pdfservices.operation.region.Region)
    +

    Updates the relevant value for the region.

    Parameters
    -

    read_timeout (int) – Defines the read timeout in milliseconds, The number of milliseconds the client will wait for the server to send a response after the connection is established. Default value is 10000 milliseconds

    +

    region (Region) – Service region(US or EU). Default value is US.

    Returns

    This Builder instance to add any additional parameters.

    @@ -238,7 +239,8 @@

    ClientConfigBuilder
    {
         "connectTimeout": "4000",
    -    "readTimeout": "20000"
    +    "readTimeout": "20000",
    +    "region": "eu"
     }
     
    @@ -263,11 +265,11 @@

    ClientConfigBuilder
    -with_pdf_services_uri(pdf_services_uri: str)
    -

    Sets the pdf services uri link.

    +with_read_timeout(read_timeout: int) +

    Sets the read timeout. It should be greater than zero.

    Parameters
    -

    pdf_services_uri (str) – url for the new rest api

    +

    read_timeout (int) – Defines the read timeout in milliseconds, The number of milliseconds the client will wait for the server to send a response after the connection is established. Default value is 10000 milliseconds

    Returns

    This Builder instance to add any additional parameters.

    @@ -280,11 +282,11 @@

    ClientConfigBuilder
    -with_read_timeout(read_timeout: int)
    -

    Sets the read timeout. It should be greater than zero.

    +with_region(region: adobe.pdfservices.operation.region.Region) +

    Updates the relevant value for the region.

    Parameters
    -

    read_timeout (int) – Defines the read timeout in milliseconds, The number of milliseconds the client will wait for the server to send a response after the connection is established. Default value is 10000 milliseconds

    +

    region (Region) – Service region(US or EU). Default value is US.

    Returns

    This Builder instance to add any additional parameters.

    diff --git a/docs/build/html/searchindex.js b/docs/build/html/searchindex.js index 1b58908..21709fc 100644 --- a/docs/build/html/searchindex.js +++ b/docs/build/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({docnames:["adobe","adobe.pdfservices","adobe.pdfservices.operation","adobe.pdfservices.operation.auth","adobe.pdfservices.operation.exception","adobe.pdfservices.operation.io","adobe.pdfservices.operation.pdfops","adobe.pdfservices.operation.pdfops.options","adobe.pdfservices.operation.pdfops.options.extractpdf","index","modules","reference/index"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":4,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":3,"sphinx.domains.rst":2,"sphinx.domains.std":2,sphinx:56},filenames:["adobe.rst","adobe.pdfservices.rst","adobe.pdfservices.operation.rst","adobe.pdfservices.operation.auth.rst","adobe.pdfservices.operation.exception.rst","adobe.pdfservices.operation.io.rst","adobe.pdfservices.operation.pdfops.rst","adobe.pdfservices.operation.pdfops.options.rst","adobe.pdfservices.operation.pdfops.options.extractpdf.rst","index.rst","modules.rst","reference/index.rst"],objects:{"":[[0,0,0,"-","adobe"]],"adobe.pdfservices":[[2,0,0,"-","operation"]],"adobe.pdfservices.operation":[[3,0,0,"-","auth"],[2,0,0,"-","client_config"],[4,0,0,"-","exception"],[2,0,0,"-","execution_context"],[5,0,0,"-","io"],[2,0,0,"-","operation"],[6,0,0,"-","pdfops"]],"adobe.pdfservices.operation.auth":[[3,0,0,"-","credentials"],[3,0,0,"-","service_account_credentials"]],"adobe.pdfservices.operation.auth.credentials":[[11,1,1,"","Credentials"]],"adobe.pdfservices.operation.auth.credentials.Credentials":[[11,2,1,"","service_account_credentials_builder"]],"adobe.pdfservices.operation.auth.service_account_credentials":[[11,1,1,"","ServiceAccountCredentials"]],"adobe.pdfservices.operation.auth.service_account_credentials.ServiceAccountCredentials":[[11,1,1,"id6","Builder"],[11,3,1,"","account_id"],[11,3,1,"","claim"],[11,3,1,"","client_id"],[11,3,1,"","client_secret"],[11,3,1,"","organization_id"],[11,3,1,"","private_key"]],"adobe.pdfservices.operation.auth.service_account_credentials.ServiceAccountCredentials.Builder":[[11,2,1,"id7","build"],[11,2,1,"id8","from_file"],[11,2,1,"id9","with_account_id"],[11,2,1,"id10","with_client_id"],[11,2,1,"id11","with_client_secret"],[11,2,1,"id12","with_organization_id"],[11,2,1,"id13","with_private_key"]],"adobe.pdfservices.operation.client_config":[[11,1,1,"","ClientConfig"]],"adobe.pdfservices.operation.client_config.ClientConfig":[[11,1,1,"id0","Builder"],[11,2,1,"","builder"]],"adobe.pdfservices.operation.client_config.ClientConfig.Builder":[[11,2,1,"id1","build"],[11,2,1,"id2","from_file"],[11,2,1,"id3","with_connect_timeout"],[11,2,1,"id4","with_pdf_services_uri"],[11,2,1,"id5","with_read_timeout"]],"adobe.pdfservices.operation.exception":[[11,0,0,"-","exceptions"]],"adobe.pdfservices.operation.exception.exceptions":[[11,4,1,"","SdkException"],[11,4,1,"","ServiceApiException"],[11,4,1,"","ServiceUsageException"]],"adobe.pdfservices.operation.exception.exceptions.SdkException":[[11,3,1,"","request_tracking_id"]],"adobe.pdfservices.operation.exception.exceptions.ServiceApiException":[[11,5,1,"","DEFAULT_ERROR_CODE"],[11,5,1,"","DEFAULT_STATUS_CODE"],[11,3,1,"","error_code"],[11,3,1,"","request_tracking_id"],[11,3,1,"","status_code"]],"adobe.pdfservices.operation.exception.exceptions.ServiceUsageException":[[11,5,1,"","DEFAULT_ERROR_CODE"],[11,5,1,"","DEFAULT_STATUS_CODE"],[11,3,1,"","error_code"],[11,3,1,"","request_tracking_id"],[11,3,1,"","status_code"]],"adobe.pdfservices.operation.execution_context":[[11,1,1,"","ExecutionContext"]],"adobe.pdfservices.operation.execution_context.ExecutionContext":[[11,2,1,"","create"]],"adobe.pdfservices.operation.io":[[5,0,0,"-","file_ref"]],"adobe.pdfservices.operation.io.file_ref":[[11,1,1,"","FileRef"]],"adobe.pdfservices.operation.io.file_ref.FileRef":[[11,2,1,"","create_from_local_file"],[11,2,1,"","create_from_stream"],[11,2,1,"","get_media_type"],[11,2,1,"","save_as"],[11,2,1,"","write_to_stream"]],"adobe.pdfservices.operation.operation":[[2,1,1,"","Operation"]],"adobe.pdfservices.operation.operation.Operation":[[2,2,1,"","execute"]],"adobe.pdfservices.operation.pdfops":[[6,0,0,"-","extract_pdf_operation"],[7,0,0,"-","options"]],"adobe.pdfservices.operation.pdfops.extract_pdf_operation":[[11,1,1,"","ExtractPDFOperation"]],"adobe.pdfservices.operation.pdfops.extract_pdf_operation.ExtractPDFOperation":[[11,5,1,"","SUPPORTED_SOURCE_MEDIA_TYPES"],[11,2,1,"","create_new"],[11,2,1,"","execute"],[11,2,1,"","get_options"],[11,2,1,"","set_input"],[11,2,1,"","set_options"]],"adobe.pdfservices.operation.pdfops.options":[[8,0,0,"-","extractpdf"]],"adobe.pdfservices.operation.pdfops.options.extractpdf":[[8,0,0,"-","extract_element_type"],[8,0,0,"-","extract_pdf_options"],[8,0,0,"-","extract_renditions_element_type"],[8,0,0,"-","table_structure_type"]],"adobe.pdfservices.operation.pdfops.options.extractpdf.extract_element_type":[[8,1,1,"","ExtractElementType"]],"adobe.pdfservices.operation.pdfops.options.extractpdf.extract_element_type.ExtractElementType":[[8,5,1,"","TABLES"],[8,5,1,"","TEXT"]],"adobe.pdfservices.operation.pdfops.options.extractpdf.extract_pdf_options":[[11,1,1,"","ExtractPDFOptions"]],"adobe.pdfservices.operation.pdfops.options.extractpdf.extract_pdf_options.ExtractPDFOptions":[[11,1,1,"","Builder"],[11,2,1,"","builder"],[11,3,1,"","elements_to_extract"],[11,3,1,"","elements_to_extract_renditions"],[11,3,1,"","get_char_info"],[11,3,1,"","include_styling_info"],[11,3,1,"","table_output_format"]],"adobe.pdfservices.operation.pdfops.options.extractpdf.extract_pdf_options.ExtractPDFOptions.Builder":[[11,2,1,"","build"],[11,2,1,"","with_element_to_extract"],[11,2,1,"","with_element_to_extract_renditions"],[11,2,1,"","with_elements_to_extract"],[11,2,1,"","with_elements_to_extract_renditions"],[11,2,1,"","with_get_char_info"],[11,2,1,"","with_include_styling_info"],[11,2,1,"","with_table_structure_format"]],"adobe.pdfservices.operation.pdfops.options.extractpdf.extract_renditions_element_type":[[8,1,1,"","ExtractRenditionsElementType"]],"adobe.pdfservices.operation.pdfops.options.extractpdf.extract_renditions_element_type.ExtractRenditionsElementType":[[8,5,1,"","FIGURES"],[8,5,1,"","TABLES"]],"adobe.pdfservices.operation.pdfops.options.extractpdf.table_structure_type":[[8,1,1,"","TableStructureType"]],"adobe.pdfservices.operation.pdfops.options.extractpdf.table_structure_type.TableStructureType":[[8,5,1,"","CSV"]],adobe:[[1,0,0,"-","pdfservices"]]},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","method","Python method"],"3":["py","property","Python property"],"4":["py","exception","Python exception"],"5":["py","attribute","Python attribute"]},objtypes:{"0":"py:module","1":"py:class","2":"py:method","3":"py:property","4":"py:exception","5":"py:attribute"},terms:{"0":[4,11],"10000":[2,11],"20000":[2,11],"4000":[2,11],"429":[4,11],"abstract":[2,5,11],"boolean":[8,11],"class":[2,3,5,6,8,9,11],"default":[2,4,5,11],"enum":8,"export":[8,11],"int":[2,11],"new":[2,3,6,11],"return":[2,3,4,5,6,8,11],"static":[2,3,5,8,11],"true":[2,6,8,11],"try":[2,6,11],"while":[2,5,6,11],A:[2,3,5,6,11],For:[2,3,5,11],If:[5,11],It:[2,3,5,11],The:[2,3,4,5,6,8,11],__file__:[2,6,11],_io:[5,11],abc:[2,3,5,11],absolut:[5,11],abspath:[2,6,11],accept:[5,11],access:[3,11],account:[3,11],account_id:[3,11],across:[2,11],add:[2,3,6,8,11],addit:[2,3,6,8,11],adequ:[4,11],adob:[10,11],adobeorg:[3,11],after:[2,11],all:[2,3,9,11],allow:[3,11],along:[6,11],an:[2,3,4,5,6,8,11],ani:[2,3,5,6,8,9,11],api:[2,3,4,6,9],applic:[3,11],ar:[2,3,6,11],auth:[1,2,11],authent:[2,11],author:[3,11],base:[2,3,4,5,6,8,11],base_path:[2,6,11],been:[3,4,11],behalf:[3,11],bool:[8,11],bound:[8,11],box:[8,11],bufferedread:[5,11],build:[2,3,6,8,11],builder:[2,3,6,8,11],built:[2,3,11],call:[2,3,4,5,6,11],can:[2,3,8,11],charact:[8,11],claim:[3,11],classmethod:[6,11],classpath:[3,11],clean:[6,11],click:[3,9,11],client:[2,3,4,11],client_config:[0,1,11],client_config_file_path:[2,11],client_credenti:[3,11],client_id:[3,11],client_secret:[3,11],clientconfig:2,code:[4,11],com:[3,11],config:[2,11],configur:[2,3,11],connect:[2,11],connect_timeout:[2,11],connecttimeout:[2,11],consist:[2,11],constant:[3,11],consum:[5,11],content:[10,11],context:[2,6,11],creat:[2,3,5,6,11],create_from_local_fil:[2,5,6,11],create_from_stream:[5,11],create_kei:[6,11],create_new:[2,6,11],credenti:[1,2,4,6],credentials_file_path:[3,11],csv:[8,11],current:[2,3,8,11],custom:[2,11],default_error_cod:[4,11],default_status_cod:[4,11],defin:[2,8,11],delet:[5,11],desir:[2,11],detail:[4,11],determin:[2,11],differ:[3,11],directori:[3,5,6,11],dirnam:[2,6,11],document:9,doesn:[4,11],e:[5,11],each:[2,11],either:[4,5,11],element:[6,8,11],element_to_extract:[8,11],element_to_extract_rendit:[8,11],elements_to_extract:[8,11],elements_to_extract_rendit:[8,11],elementtyp:8,empti:[8,11],encapsul:[2,11],encount:[2,6,11],enterpris:[3,11],error:[4,6,11],error_cod:[4,11],establish:[2,11],etc:[5,11],exampl:[5,11],except:[1,2,6],execut:[2,5,6,11],execution_context:[0,1,6,11],executioncontext:[2,6],exhaust:[4,11],expos:9,extens:[5,11],extension_media_type_map:[6,11],extensionmediatypemap:[6,11],extract:[3,6,8,11],extract_element_typ:[6,7,11],extract_pdf_oper:[1,2,11],extract_pdf_opt:[2,6,7,11],extract_renditions_element_typ:[6,7,11],extractelementtyp:[2,6,8,11],extractpdf:[6,7,11],extractpdfinput:[2,6,11],extractpdfoper:[2,6,8],extractpdfopt:[2,6,8],extractrenditionselementtyp:[2,6,8,11],extracttexttablewithfiguretablerendit:[2,6,11],factori:[3,11],failur:[4,11],figur:[2,6,8,11],file:[2,3,5,6,8,11],file_ref:[1,2,6,11],fileref:[2,5,6],format:[3,5,6,8,11],from:[2,3,5,6,8,11],from_fil:[2,3,6,11],get:[3,6,9,11],get_char_info:[8,11],get_media_typ:[5,11],get_opt:[6,11],greater:[2,11],ha:[3,4,11],have:[8,11],here:[3,11],how:[6,11],http:[2,4,11],i:[5,11],id:[3,4,11],identifi:[3,5,11],ims_base_uri:[3,11],include_styling_info:[8,11],infer:[5,11],info:[8,11],inform:[8,11],input:[6,8,11],input_stream:[5,11],instanc:[2,3,5,6,8,11],intern:[3,6,11],io:[1,2,6,11],issu:[3,11],itself:[3,11],json:[2,3,6,8,11],jwt_base_uri:[3,11],kei:[2,3,11],left:9,level:[8,11],limit:[4,11],link:[2,11],list:[8,11],local:[5,11],local_file_path:[5,11],local_sourc:[5,11],locat:[5,11],log:[2,6,11],look:[3,11],mai:[6,11],marker:[3,11],media:[5,11],media_typ:[5,11],messag:[4,11],method:[3,5,11],millisecond:[2,11],mime_typ:[6,11],modul:[9,10],nav:9,need:[8,11],network:[4,11],none:[2,3,4,5,8,11],number:[2,11],object:[2,3,8,11],onli:[3,8,11],oper:[0,1,9,11],option:[2,3,5,6,11],org_id:[3,11],organ:[3,11],organization_id:[3,11],os:[2,6,11],output:[2,6,8,11],packag:10,paramet:[2,3,5,6,8,11],path:[2,3,5,6,11],pdf:[2,3,6,8,11],pdf_services_uri:[2,11],pdfop:[1,2,11],pdfservic:[0,10,11],pem:[3,11],pleas:9,privat:[3,11],private_kei:[3,11],private_key_fil:[3,11],properti:[3,4,8,11],provid:[2,5,11],quota:[4,11],rais:[6,8,11],reach:[4,11],read:[2,5,11],read_timeout:[2,11],readabl:[5,11],readtimeout:[2,11],refer:[5,9],rel:[5,11],rendit:[6,8,11],repres:[2,4,5,11],request:[2,4,11],request_tracking_id:[4,11],resourc:[2,6,11],respons:[2,6,11],rest:[2,11],result:[2,4,6,11],reus:[2,11],rtype:[],sampl:[2,6,11],save:[5,11],save_a:[2,5,6,11],sdk:[5,11],sdkexcept:[2,4,6,11],secret:[3,11],section:9,see:[6,11],send:[2,11],server:[2,11],servic:[2,3,4,11],service_account_credenti:[1,2,11],service_account_credentials_build:[2,3,6,11],service_const:[3,11],serviceaccountcredenti:3,serviceapiexcept:[2,4,6,11],serviceconst:[3,11],serviceusageerror:[4,11],serviceusageexcept:[2,4,6,11],set:[2,3,6,8,11],set_input:[2,6,11],set_opt:[2,6,11],should:[2,11],side:[4,11],sourc:[2,6,11],source_file_ref:[6,11],specifi:[5,8,11],start:9,state:[2,3,11],statu:[4,11],status_cod:[4,11],store:[6,11],str:[2,3,5,8,11],stream:[5,11],structur:[2,3,6,8,11],style:[8,11],submodul:[0,1,7],subpackag:10,suppli:[6,11],support:[3,6,8,11],supported_source_media_typ:[6,11],synchron:[6,11],system:[6,11],t:[4,11],tabl:[2,6,8,11],table_output_format:[8,11],table_structur:[8,11],table_structure_typ:[6,7,11],tablestructuretyp:[8,11],techacct:[3,11],temporari:[5,6,11],text:[2,6,8,11],than:[2,11],thi:[2,3,4,5,6,8,9,11],thrown:[4,11],timeout:[2,11],token:[3,11],tool:[3,11],track:[4,11],type:[2,3,5,6,8,11],typic:[2,4,5,11],underli:[4,11],unknown:[4,11],until:[2,11],up:[3,6,11],uri:[2,11],url:[2,11],us:[2,3,5,6,11],usag:[2,4,6,11],valu:[2,4,8,11],valueerror:[8,11],wait:[2,11],when:[4,5,11],whether:[8,11],which:[3,5,6,8,11],whose:[8,11],with_account_id:[3,11],with_client_id:[3,11],with_client_secret:[3,11],with_connect_timeout:[2,11],with_element_to_extract:[8,11],with_element_to_extract_rendit:[8,11],with_elements_to_extract:[2,6,8,11],with_elements_to_extract_rendit:[2,6,8,11],with_get_char_info:[2,6,8,11],with_include_styling_info:[6,8,11],with_organization_id:[3,11],with_pdf_services_uri:[2,11],with_private_kei:[3,11],with_read_timeout:[2,11],with_table_structure_format:[8,11],within:[3,11],work:[5,11],write_to_stream:[5,11],writer_stream:[5,11],your:[3,11],zero:[2,11],zip:[2,6,11]},titles:["adobe package","adobe.pdfservices package","adobe.pdfservices.operation package","adobe.pdfservices.operation.auth package","adobe.pdfservices.operation.exception package","adobe.pdfservices.operation.io package","adobe.pdfservices.operation.pdfops package","adobe.pdfservices.operation.pdfops.options package","adobe.pdfservices.operation.pdfops.options.extractpdf package","pdfservices-sdk","src","API Reference"],titleterms:{adob:[0,1,2,3,4,5,6,7,8],api:11,auth:3,client_config:2,clientconfig:11,clientconfigbuild:11,content:[0,1,2,3,4,5,6,7,8],credenti:[3,11],except:[4,11],execution_context:2,executioncontext:11,extract_element_typ:8,extract_pdf_oper:6,extract_pdf_opt:8,extract_renditions_element_typ:8,extractpdf:8,extractpdfoper:11,extractpdfopt:11,file_ref:5,fileref:11,io:5,modul:[0,1,2,3,4,5,6,7,8],oper:[2,3,4,5,6,7,8],option:[7,8],packag:[0,1,2,3,4,5,6,7,8],pdfop:[6,7,8],pdfservic:[1,2,3,4,5,6,7,8,9],refer:11,sdk:9,service_account_credenti:3,serviceaccountcredenti:11,serviceaccountcredentialsbuild:11,src:10,submodul:[2,3,4,5,6,8],subpackag:[0,1,2,6,7],table_structure_typ:8}}) \ No newline at end of file +Search.setIndex({docnames:["adobe","adobe.pdfservices","adobe.pdfservices.operation","adobe.pdfservices.operation.auth","adobe.pdfservices.operation.exception","adobe.pdfservices.operation.io","adobe.pdfservices.operation.pdfops","adobe.pdfservices.operation.pdfops.options","adobe.pdfservices.operation.pdfops.options.extractpdf","index","modules","reference/index"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":4,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":3,"sphinx.domains.rst":2,"sphinx.domains.std":2,sphinx:56},filenames:["adobe.rst","adobe.pdfservices.rst","adobe.pdfservices.operation.rst","adobe.pdfservices.operation.auth.rst","adobe.pdfservices.operation.exception.rst","adobe.pdfservices.operation.io.rst","adobe.pdfservices.operation.pdfops.rst","adobe.pdfservices.operation.pdfops.options.rst","adobe.pdfservices.operation.pdfops.options.extractpdf.rst","index.rst","modules.rst","reference/index.rst"],objects:{"":[[0,0,0,"-","adobe"]],"adobe.pdfservices":[[2,0,0,"-","operation"]],"adobe.pdfservices.operation":[[3,0,0,"-","auth"],[2,0,0,"-","client_config"],[4,0,0,"-","exception"],[2,0,0,"-","execution_context"],[5,0,0,"-","io"],[2,0,0,"-","operation"],[6,0,0,"-","pdfops"]],"adobe.pdfservices.operation.auth":[[3,0,0,"-","credentials"],[3,0,0,"-","service_account_credentials"]],"adobe.pdfservices.operation.auth.credentials":[[11,1,1,"","Credentials"]],"adobe.pdfservices.operation.auth.credentials.Credentials":[[11,2,1,"","service_account_credentials_builder"]],"adobe.pdfservices.operation.auth.service_account_credentials":[[11,1,1,"","ServiceAccountCredentials"]],"adobe.pdfservices.operation.auth.service_account_credentials.ServiceAccountCredentials":[[11,1,1,"id6","Builder"],[11,3,1,"","account_id"],[11,3,1,"","claim"],[11,3,1,"","client_id"],[11,3,1,"","client_secret"],[11,3,1,"","organization_id"],[11,3,1,"","private_key"]],"adobe.pdfservices.operation.auth.service_account_credentials.ServiceAccountCredentials.Builder":[[11,2,1,"id7","build"],[11,2,1,"id8","from_file"],[11,2,1,"id9","with_account_id"],[11,2,1,"id10","with_client_id"],[11,2,1,"id11","with_client_secret"],[11,2,1,"id12","with_organization_id"],[11,2,1,"id13","with_private_key"]],"adobe.pdfservices.operation.client_config":[[11,1,1,"","ClientConfig"]],"adobe.pdfservices.operation.client_config.ClientConfig":[[11,1,1,"id0","Builder"],[11,2,1,"","builder"]],"adobe.pdfservices.operation.client_config.ClientConfig.Builder":[[11,2,1,"id1","build"],[11,2,1,"id2","from_file"],[11,2,1,"id3","with_connect_timeout"],[11,2,1,"id4","with_read_timeout"],[11,2,1,"id5","with_region"]],"adobe.pdfservices.operation.exception":[[11,0,0,"-","exceptions"]],"adobe.pdfservices.operation.exception.exceptions":[[11,4,1,"","SdkException"],[11,4,1,"","ServiceApiException"],[11,4,1,"","ServiceUsageException"]],"adobe.pdfservices.operation.exception.exceptions.SdkException":[[11,3,1,"","request_tracking_id"]],"adobe.pdfservices.operation.exception.exceptions.ServiceApiException":[[11,5,1,"","DEFAULT_ERROR_CODE"],[11,5,1,"","DEFAULT_STATUS_CODE"],[11,3,1,"","error_code"],[11,3,1,"","request_tracking_id"],[11,3,1,"","status_code"]],"adobe.pdfservices.operation.exception.exceptions.ServiceUsageException":[[11,5,1,"","DEFAULT_ERROR_CODE"],[11,5,1,"","DEFAULT_STATUS_CODE"],[11,3,1,"","error_code"],[11,3,1,"","request_tracking_id"],[11,3,1,"","status_code"]],"adobe.pdfservices.operation.execution_context":[[11,1,1,"","ExecutionContext"]],"adobe.pdfservices.operation.execution_context.ExecutionContext":[[11,2,1,"","create"]],"adobe.pdfservices.operation.io":[[5,0,0,"-","file_ref"]],"adobe.pdfservices.operation.io.file_ref":[[11,1,1,"","FileRef"]],"adobe.pdfservices.operation.io.file_ref.FileRef":[[11,2,1,"","create_from_local_file"],[11,2,1,"","create_from_stream"],[11,2,1,"","get_media_type"],[11,2,1,"","save_as"],[11,2,1,"","write_to_stream"]],"adobe.pdfservices.operation.operation":[[2,1,1,"","Operation"]],"adobe.pdfservices.operation.operation.Operation":[[2,2,1,"","execute"]],"adobe.pdfservices.operation.pdfops":[[6,0,0,"-","extract_pdf_operation"],[7,0,0,"-","options"]],"adobe.pdfservices.operation.pdfops.extract_pdf_operation":[[11,1,1,"","ExtractPDFOperation"]],"adobe.pdfservices.operation.pdfops.extract_pdf_operation.ExtractPDFOperation":[[11,5,1,"","SUPPORTED_SOURCE_MEDIA_TYPES"],[11,2,1,"","create_new"],[11,2,1,"","execute"],[11,2,1,"","get_options"],[11,2,1,"","set_input"],[11,2,1,"","set_options"]],"adobe.pdfservices.operation.pdfops.options":[[8,0,0,"-","extractpdf"]],"adobe.pdfservices.operation.pdfops.options.extractpdf":[[8,0,0,"-","extract_element_type"],[8,0,0,"-","extract_pdf_options"],[8,0,0,"-","extract_renditions_element_type"],[8,0,0,"-","table_structure_type"]],"adobe.pdfservices.operation.pdfops.options.extractpdf.extract_element_type":[[8,1,1,"","ExtractElementType"]],"adobe.pdfservices.operation.pdfops.options.extractpdf.extract_element_type.ExtractElementType":[[8,5,1,"","TABLES"],[8,5,1,"","TEXT"]],"adobe.pdfservices.operation.pdfops.options.extractpdf.extract_pdf_options":[[11,1,1,"","ExtractPDFOptions"]],"adobe.pdfservices.operation.pdfops.options.extractpdf.extract_pdf_options.ExtractPDFOptions":[[11,1,1,"","Builder"],[11,2,1,"","builder"],[11,3,1,"","elements_to_extract"],[11,3,1,"","elements_to_extract_renditions"],[11,3,1,"","get_char_info"],[11,3,1,"","include_styling_info"],[11,3,1,"","table_output_format"]],"adobe.pdfservices.operation.pdfops.options.extractpdf.extract_pdf_options.ExtractPDFOptions.Builder":[[11,2,1,"","build"],[11,2,1,"","with_element_to_extract"],[11,2,1,"","with_element_to_extract_renditions"],[11,2,1,"","with_elements_to_extract"],[11,2,1,"","with_elements_to_extract_renditions"],[11,2,1,"","with_get_char_info"],[11,2,1,"","with_include_styling_info"],[11,2,1,"","with_table_structure_format"]],"adobe.pdfservices.operation.pdfops.options.extractpdf.extract_renditions_element_type":[[8,1,1,"","ExtractRenditionsElementType"]],"adobe.pdfservices.operation.pdfops.options.extractpdf.extract_renditions_element_type.ExtractRenditionsElementType":[[8,5,1,"","FIGURES"],[8,5,1,"","TABLES"]],"adobe.pdfservices.operation.pdfops.options.extractpdf.table_structure_type":[[8,1,1,"","TableStructureType"]],"adobe.pdfservices.operation.pdfops.options.extractpdf.table_structure_type.TableStructureType":[[8,5,1,"","CSV"]],adobe:[[1,0,0,"-","pdfservices"]]},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","method","Python method"],"3":["py","property","Python property"],"4":["py","exception","Python exception"],"5":["py","attribute","Python attribute"]},objtypes:{"0":"py:module","1":"py:class","2":"py:method","3":"py:property","4":"py:exception","5":"py:attribute"},terms:{"0":[4,11],"10000":[2,11],"20000":[2,11],"4000":[2,11],"429":[4,11],"abstract":[2,5,11],"boolean":[8,11],"class":[2,3,5,6,8,9,11],"default":[2,4,5,11],"enum":8,"export":[8,11],"int":[2,11],"new":[2,3,6,11],"return":[2,3,4,5,6,8,11],"static":[2,3,5,8,11],"true":[2,6,8,11],"try":[2,6,11],"while":[2,5,6,11],A:[2,3,5,6,11],For:[2,3,5,11],If:[5,11],It:[2,3,5,11],The:[2,3,4,5,6,8,11],__file__:[2,6,11],_io:[5,11],abc:[2,3,5,11],absolut:[5,11],abspath:[2,6,11],accept:[5,11],access:[3,11],account:[3,11],account_id:[3,11],across:[2,11],add:[2,3,6,8,11],addit:[2,3,6,8,11],adequ:[4,11],adob:[10,11],adobeorg:[3,11],after:[2,11],all:[2,3,9,11],allow:[3,11],along:[6,11],an:[2,3,4,5,6,8,11],ani:[2,3,5,6,8,9,11],api:[2,3,4,6,9],applic:[3,11],ar:[2,3,6,11],auth:[1,2,11],authent:[2,11],author:[3,11],base:[2,3,4,5,6,8,11],base_path:[2,6,11],been:[3,4,11],behalf:[3,11],bool:[8,11],bound:[8,11],box:[8,11],bufferedread:[5,11],build:[2,3,6,8,11],builder:[2,3,6,8,11],built:[2,3,11],call:[2,3,4,5,6,11],can:[2,3,8,11],charact:[8,11],claim:[3,11],classmethod:[6,11],classpath:[3,11],clean:[6,11],click:[3,9,11],client:[2,3,4,11],client_config:[0,1,11],client_config_file_path:[2,11],client_credenti:[3,11],client_id:[3,11],client_secret:[3,11],clientconfig:2,code:[4,11],com:[3,11],config:[2,11],configur:[2,3,11],connect:[2,11],connect_timeout:[2,11],connecttimeout:[2,11],consist:[2,11],constant:[3,11],consum:[5,11],content:[10,11],context:[2,6,11],creat:[2,3,5,6,11],create_from_local_fil:[2,5,6,11],create_from_stream:[5,11],create_kei:[6,11],create_new:[2,6,11],credenti:[1,2,4,6],credentials_file_path:[3,11],csv:[8,11],current:[2,3,8,11],custom:[2,11],default_error_cod:[4,11],default_status_cod:[4,11],defin:[2,8,11],delet:[5,11],desir:[2,11],detail:[4,11],determin:[2,11],differ:[3,11],directori:[3,5,6,11],dirnam:[2,6,11],document:9,doesn:[4,11],e:[5,11],each:[2,11],either:[4,5,11],element:[6,8,11],element_to_extract:[8,11],element_to_extract_rendit:[8,11],elements_to_extract:[8,11],elements_to_extract_rendit:[8,11],elementtyp:8,empti:[8,11],encapsul:[2,11],encount:[2,6,11],enterpris:[3,11],error:[4,6,11],error_cod:[4,11],establish:[2,11],etc:[5,11],eu:[2,11],exampl:[5,11],except:[1,2,6],execut:[2,5,6,11],execution_context:[0,1,6,11],executioncontext:[2,6],exhaust:[4,11],expos:9,extens:[5,11],extension_media_type_map:[6,11],extensionmediatypemap:[6,11],extract:[3,6,8,11],extract_element_typ:[6,7,11],extract_pdf_oper:[1,2,11],extract_pdf_opt:[2,6,7,11],extract_renditions_element_typ:[6,7,11],extractelementtyp:[2,6,8,11],extractpdf:[6,7,11],extractpdfinput:[2,6,11],extractpdfoper:[2,6,8],extractpdfopt:[2,6,8],extractrenditionselementtyp:[2,6,8,11],extracttexttablewithfiguretablerendit:[2,6,11],factori:[3,11],failur:[4,11],figur:[2,6,8,11],file:[2,3,5,6,8,11],file_ref:[1,2,6,11],fileref:[2,5,6],format:[3,5,6,8,11],from:[2,3,5,6,8,11],from_fil:[2,3,6,11],get:[3,6,9,11],get_char_info:[8,11],get_media_typ:[5,11],get_opt:[6,11],greater:[2,11],ha:[3,4,11],have:[8,11],here:[3,11],how:[6,11],http:[2,4,11],i:[5,11],id:[3,4,11],identifi:[3,5,11],ims_base_uri:[3,11],include_styling_info:[8,11],infer:[5,11],info:[8,11],inform:[8,11],input:[6,8,11],input_stream:[5,11],instanc:[2,3,5,6,8,11],intern:[3,6,11],io:[1,2,6,11],issu:[3,11],itself:[3,11],json:[2,3,6,8,11],jwt_base_uri:[3,11],kei:[2,3,11],left:9,level:[8,11],limit:[4,11],link:[],list:[8,11],local:[5,11],local_file_path:[5,11],local_sourc:[5,11],locat:[5,11],log:[2,6,11],look:[3,11],mai:[6,11],marker:[3,11],media:[5,11],media_typ:[5,11],messag:[4,11],method:[3,5,11],millisecond:[2,11],mime_typ:[6,11],modul:[9,10],nav:9,need:[8,11],network:[4,11],none:[2,3,4,5,8,11],number:[2,11],object:[2,3,8,11],onli:[3,8,11],oper:[0,1,9,11],option:[2,3,5,6,11],org_id:[3,11],organ:[3,11],organization_id:[3,11],os:[2,6,11],output:[2,6,8,11],packag:10,paramet:[2,3,5,6,8,11],path:[2,3,5,6,11],pdf:[2,3,6,8,11],pdf_services_uri:[],pdfop:[1,2,11],pdfservic:[0,10,11],pem:[3,11],pleas:9,privat:[3,11],private_kei:[3,11],private_key_fil:[3,11],properti:[3,4,8,11],provid:[2,5,11],quota:[4,11],rais:[6,8,11],reach:[4,11],read:[2,5,11],read_timeout:[2,11],readabl:[5,11],readtimeout:[2,11],refer:[5,9],region:[2,11],rel:[5,11],relev:[2,11],rendit:[6,8,11],repres:[2,4,5,11],request:[2,4,11],request_tracking_id:[4,11],resourc:[2,6,11],respons:[2,6,11],rest:[],result:[2,4,6,11],reus:[2,11],rtype:[],sampl:[2,6,11],save:[5,11],save_a:[2,5,6,11],sdk:[5,11],sdkexcept:[2,4,6,11],secret:[3,11],section:9,see:[6,11],send:[2,11],server:[2,11],servic:[2,3,4,11],service_account_credenti:[1,2,11],service_account_credentials_build:[2,3,6,11],service_const:[3,11],serviceaccountcredenti:3,serviceapiexcept:[2,4,6,11],serviceconst:[3,11],serviceusageerror:[4,11],serviceusageexcept:[2,4,6,11],set:[2,3,6,8,11],set_input:[2,6,11],set_opt:[2,6,11],should:[2,11],side:[4,11],sourc:[2,6,11],source_file_ref:[6,11],specifi:[5,8,11],start:9,state:[2,3,11],statu:[4,11],status_cod:[4,11],store:[6,11],str:[2,3,5,8,11],stream:[5,11],structur:[2,3,6,8,11],style:[8,11],submodul:[0,1,7],subpackag:10,suppli:[6,11],support:[3,6,8,11],supported_source_media_typ:[6,11],synchron:[6,11],system:[6,11],t:[4,11],tabl:[2,6,8,11],table_output_format:[8,11],table_structur:[8,11],table_structure_typ:[6,7,11],tablestructuretyp:[8,11],techacct:[3,11],temporari:[5,6,11],text:[2,6,8,11],than:[2,11],thi:[2,3,4,5,6,8,9,11],thrown:[4,11],timeout:[2,11],token:[3,11],tool:[3,11],track:[4,11],type:[2,3,5,6,8,11],typic:[2,4,5,11],underli:[4,11],unknown:[4,11],until:[2,11],up:[3,6,11],updat:[2,11],uri:[],url:[],us:[2,3,5,6,11],usag:[2,4,6,11],valu:[2,4,8,11],valueerror:[8,11],wait:[2,11],when:[4,5,11],whether:[8,11],which:[3,5,6,8,11],whose:[8,11],with_account_id:[3,11],with_client_id:[3,11],with_client_secret:[3,11],with_connect_timeout:[2,11],with_element_to_extract:[8,11],with_element_to_extract_rendit:[8,11],with_elements_to_extract:[2,6,8,11],with_elements_to_extract_rendit:[2,6,8,11],with_get_char_info:[2,6,8,11],with_include_styling_info:[6,8,11],with_organization_id:[3,11],with_pdf_services_uri:[],with_private_kei:[3,11],with_read_timeout:[2,11],with_region:[2,11],with_table_structure_format:[8,11],within:[3,11],work:[5,11],write_to_stream:[5,11],writer_stream:[5,11],your:[3,11],zero:[2,11],zip:[2,6,11]},titles:["adobe package","adobe.pdfservices package","adobe.pdfservices.operation package","adobe.pdfservices.operation.auth package","adobe.pdfservices.operation.exception package","adobe.pdfservices.operation.io package","adobe.pdfservices.operation.pdfops package","adobe.pdfservices.operation.pdfops.options package","adobe.pdfservices.operation.pdfops.options.extractpdf package","pdfservices-sdk","src","API Reference"],titleterms:{adob:[0,1,2,3,4,5,6,7,8],api:11,auth:3,client_config:2,clientconfig:11,clientconfigbuild:11,content:[0,1,2,3,4,5,6,7,8],credenti:[3,11],except:[4,11],execution_context:2,executioncontext:11,extract_element_typ:8,extract_pdf_oper:6,extract_pdf_opt:8,extract_renditions_element_typ:8,extractpdf:8,extractpdfoper:11,extractpdfopt:11,file_ref:5,fileref:11,io:5,modul:[0,1,2,3,4,5,6,7,8],oper:[2,3,4,5,6,7,8],option:[7,8],packag:[0,1,2,3,4,5,6,7,8],pdfop:[6,7,8],pdfservic:[1,2,3,4,5,6,7,8,9],refer:11,sdk:9,service_account_credenti:3,serviceaccountcredenti:11,serviceaccountcredentialsbuild:11,src:10,submodul:[2,3,4,5,6,8],subpackag:[0,1,2,6,7],table_structure_typ:8}}) \ No newline at end of file diff --git a/setup.py b/setup.py index 3f51d0e..d532a82 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ def parse_requirements(filename, session=None): setuptools.setup( name="pdfservices-sdk", - version="2.0.0", + version="2.1.0", author='Adobe Document Services', author_email='extractapi@adobe.com', license='Apache2', diff --git a/src/adobe/pdfservices/operation/client_config.py b/src/adobe/pdfservices/operation/client_config.py index 6fcda71..85d8b10 100644 --- a/src/adobe/pdfservices/operation/client_config.py +++ b/src/adobe/pdfservices/operation/client_config.py @@ -11,6 +11,7 @@ from adobe.pdfservices.operation.internal.constants.service_constants import ServiceConstants from adobe.pdfservices.operation.internal.util import file_utils +from adobe.pdfservices.operation.region import Region class ClientConfig(object): @@ -21,6 +22,7 @@ class ClientConfig(object): _READ_TIMEOUT_KEY = "readTimeout" _PDF_SERVICES = "pdf_services" _PDF_SERVICES_URI = "pdf_services_uri" + _REGION = "region" @staticmethod def builder(): @@ -43,6 +45,30 @@ def __init__(self): self._read_timeout = ServiceConstants.HTTP_READ_TIMEOUT self._pdf_services_uri = ServiceConstants.PDF_SERVICES_URI + def with_region(self, region: Region): + """Updates the relevant value for the region. + + :param region: Service region(US or EU). Default value is US. + :type region: Region + :return: This Builder instance to add any additional parameters. + :rtype: ClientConfig.Builder + """ + self._set_pdf_services_uri_for_region(region) + return self + + def _set_pdf_services_uri_for_region(self, region: Region): + """Sets the pdf service uri based on the region. + + :param region: Service region(US or EU).Default value is US. + :type region: Region + :return: Region specific pdf_services_uri + :rtype: str + """ + if region == 'us': + self._pdf_services_uri = ServiceConstants.PDF_SERVICES_URI_US + elif region == 'eu': + self._pdf_services_uri = ServiceConstants.PDF_SERVICES_URI_EU + # the time it allows for the client to establish a connection to the server def with_connect_timeout(self, connect_timeout: int): """Sets the connect timeout. It should be greater than zero. @@ -56,17 +82,6 @@ def with_connect_timeout(self, connect_timeout: int): self._connect_timeout = connect_timeout return self - def with_pdf_services_uri(self, pdf_services_uri: str): - """Sets the pdf services uri link. - - :param pdf_services_uri: url for the new rest api - :type pdf_services_uri: str - :return: This Builder instance to add any additional parameters. - :rtype: ClientConfig.Builder - """ - self._pdf_services_uri = pdf_services_uri - return self - # the time it will wait on a response once connection is estalished def with_read_timeout(self, read_timeout: int): """Sets the read timeout. It should be greater than zero. @@ -97,13 +112,16 @@ def from_file(self, client_config_file_path: str): { "connectTimeout": "4000", - "readTimeout": "20000" + "readTimeout": "20000", + "region": "eu" } """ config_json_str = file_utils.read_conf_file_content(client_config_file_path) config_dict = json.loads(config_json_str) self._connect_timeout = int(config_dict.get(ClientConfig._CONNECT_TIMEOUT_KEY, self._connect_timeout)) self._read_timeout = int(config_dict.get(ClientConfig._READ_TIMEOUT_KEY, self._read_timeout)) + region_node = config_dict.get(ClientConfig._REGION) + self.with_region(region_node) pdf_services_config = config_dict.get(ClientConfig._PDF_SERVICES) if pdf_services_config: pdf_services_uri_node = pdf_services_config.get(ClientConfig._PDF_SERVICES_URI) @@ -119,4 +137,4 @@ def build(self): :rtype: ClientConfig """ from adobe.pdfservices.operation.internal.internal_client_config import InternalClientConfig - return InternalClientConfig(self._connect_timeout, self._read_timeout, self._pdf_services_uri) + return InternalClientConfig(self._connect_timeout, self._read_timeout, self._pdf_services_uri) \ No newline at end of file diff --git a/src/adobe/pdfservices/operation/internal/constants/service_constants.py b/src/adobe/pdfservices/operation/internal/constants/service_constants.py index 439c199..c29bd06 100644 --- a/src/adobe/pdfservices/operation/internal/constants/service_constants.py +++ b/src/adobe/pdfservices/operation/internal/constants/service_constants.py @@ -47,7 +47,7 @@ class ServiceConstants: JWT_URI_SUFFIX = 'ims/exchange/jwt/' JWT_AUDIENCE_SUFFIX = 'c/' JWT_CLAIM = 's/ent_documentcloud_sdk' - OPERATION_RESULT_TEMP_DIRECTORY = 'extractSdkResult' + OPERATION_RESULT_TEMP_DIRECTORY = 'sdk_result' CPF_OPS_CREATE_URI = 'https://cpf-ue1.adobe.io/ops/:create' EXTRACT_OPERATION_ENDPOINT = 'extractpdf' TEXT_MIME_TYPE = "text/directory" @@ -56,3 +56,5 @@ class ServiceConstants: CONTENT_ANALYZER_RESPONSE_STRING = "contentAnalyzerResponse" ASSET_UPLOAD_URI_REQUESTS_STRING = "assetUploadURIRequests" PDF_SERVICES_URI = "https://pdf-services.adobe.io" + PDF_SERVICES_URI_US = "https://pdf-services-va6.adobe.io" + PDF_SERVICES_URI_EU = "https://pdf-services-irl1.adobe.io" diff --git a/src/adobe/pdfservices/operation/internal/http/http_client.py b/src/adobe/pdfservices/operation/internal/http/http_client.py index 5c8726d..900c55d 100644 --- a/src/adobe/pdfservices/operation/internal/http/http_client.py +++ b/src/adobe/pdfservices/operation/internal/http/http_client.py @@ -48,7 +48,7 @@ def _append_default_headers(headers: dict): # Set SDK Info header headers[DefaultHeaders.DC_APP_INFO_HEADER_KEY] = "{lang}-{name}-{version}".format(lang="python", name='pdfservices-sdk', - version='2.0.0') + version='2.1.0') headers[DefaultHeaders.ACCEPT_HEADER_NAME] = DefaultHeaders.JSON_TXT_CONTENT_TYPE diff --git a/src/adobe/pdfservices/operation/region.py b/src/adobe/pdfservices/operation/region.py new file mode 100644 index 0000000..3ecda0c --- /dev/null +++ b/src/adobe/pdfservices/operation/region.py @@ -0,0 +1,31 @@ +# Copyright 2021 Adobe. All rights reserved. +# This file is licensed to you under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. You may obtain a copy +# of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed under +# the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS +# OF ANY KIND, either express or implied. See the License for the specific language +# governing permissions and limitations under the License. + +import enum + + +class Region(str, enum.Enum): + """ + enum of Region. + """ + + US = "us" + """ + Represents + "US East (N. Virginia)" + region + """ + + EU = "eu" + """ + Represents + "Europe (Ireland)" + region + """ \ No newline at end of file