@@ -7,24 +7,24 @@ Generated APIs can theoretically support all APIs in a catch-all generic format.
77# Quick-Start
88
99``` python
10- from mindee import Client, product
10+ from mindee import Client, PredictResponse, product
1111
1212# Init a new client
1313mindee_client = Client(api_key = " my-api-key" )
1414
15- # Add your custom endpoint (document)
15+ # Add the corresponding endpoint (document). Set the account_name to "mindee" if you are using OTS.
1616my_endpoint = mindee_client.create_endpoint(
1717 account_name = " my-account" ,
1818 endpoint_name = " my-endpoint" ,
19- version = " my-version" # Note: version should be always provided when using for OTS products
19+ version = " my-version"
2020)
2121
2222# Load a file from disk
2323input_doc = mindee_client.source_from_path(" /path/to/the/file.ext" )
2424
2525# Parse the file.
2626# The endpoint must be specified since it cannot be determined from the class.
27- result = mindee_client.parse (
27+ result: PredictResponse = mindee_client.enqueue_and_parse (
2828 product.GeneratedV1,
2929 input_doc,
3030 endpoint = my_endpoint
@@ -33,9 +33,9 @@ result = mindee_client.parse(
3333# Print a brief summary of the parsed data
3434print (result.document)
3535
36- # Iterate over all the fields in the document
37- for field_name, field_values in result.document.fields.items():
38- print (field_name, " =" , field_values)
36+ # # Iterate over all the fields in the document
37+ # for field_name, field_values in result.document.inference.prediction .fields.items():
38+ # print(field_name, "=", field_values)
3939```
4040
4141# Generated Endpoints
0 commit comments