diff --git a/docs/conf.py b/docs/conf.py index f2797265..d6e630f4 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -54,7 +54,7 @@ # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ["_static"] +html_static_path = [] # A list of paths that contain extra files not directly related to the documentation. html_extra_path = ["extras"] diff --git a/docs/parsing/generated.rst b/docs/parsing/generated.rst new file mode 100644 index 00000000..c7e00918 --- /dev/null +++ b/docs/parsing/generated.rst @@ -0,0 +1,16 @@ +---------------- +Generated Fields +---------------- + +Generated Lists +=============== +.. autoclass:: mindee.parsing.generated.generated_list + :members: + + +Generated Objects +================= +.. autoclass:: mindee.parsing.generated.generated_object + :members: + +.. autofunction:: mindee.parsing.generated.is_generated_object diff --git a/docs/parsing/index.rst b/docs/parsing/index.rst index 10ad1612..25e1abe1 100644 --- a/docs/parsing/index.rst +++ b/docs/parsing/index.rst @@ -7,4 +7,5 @@ Parsing Utilities ./standard ./common ./custom + ./generated diff --git a/docs/product/generated_v1.rst b/docs/product/generated_v1.rst index 6413aa41..c4654c45 100644 --- a/docs/product/generated_v1.rst +++ b/docs/product/generated_v1.rst @@ -1,12 +1,15 @@ Generated V1 ------------ -**Sample Code:** -.. literalinclude:: /extras/code_samples/generated_v1_sync.txt +**Sample Code (sync):** + +.. literalinclude:: /extras/code_samples/default.txt :language: Python -.. literalinclude:: /extras/code_samples/generated_v1_async.txt +**Sample Code (async):** + +.. literalinclude:: /extras/code_samples/default_async.txt :language: Python .. autoclass:: mindee.product.generated.generated_v1.GeneratedV1 @@ -20,7 +23,3 @@ Generated V1 .. autoclass:: mindee.product.generated.generated_v1.GeneratedV1Page :members: :inherited-members: - -.. autoclass:: mindee.product.generated.generated_v1.GeneratedV1Prediction - :members: - :inherited-members: diff --git a/docs/product/international_id_v1.rst b/docs/product/international_id_v1.rst index 2d37bb8f..da97708c 100644 --- a/docs/product/international_id_v1.rst +++ b/docs/product/international_id_v1.rst @@ -3,7 +3,7 @@ International ID V1 **Sample Code:** -.. literalinclude:: /extras/code_samples/international_id_v1.txt +.. literalinclude:: /extras/code_samples/international_id_v1_async.txt :language: Python .. autoclass:: mindee.product.international_id.international_id_v1.InternationalIdV1 diff --git a/mindee/client.py b/mindee/client.py index 3b65363c..eeda9d60 100644 --- a/mindee/client.py +++ b/mindee/client.py @@ -227,32 +227,23 @@ def enqueue_and_parse( """ Enqueues to an asynchronous endpoint and automatically polls for a response. - :param product_class: The document class to use. - The response object will be instantiated based on this parameter. + :param product_class: The document class to use. The response object will be instantiated based on this parameter. - :param input_source: The document/source file to use. - Has to be created beforehand. + :param input_source: The document/source file to use. Has to be created beforehand. - :param include_words: Whether to include the full text for each page. - This performs a full OCR operation on the server and will increase response time. + :param include_words: Whether to include the full text for each page. This performs a full OCR operation on the server and will increase response time. - :param close_file: Whether to ``close()`` the file after parsing it. - Set to ``False`` if you need to access the file after this operation. + :param close_file: Whether to ``close()`` the file after parsing it. Set to ``False`` if you need to access the file after this operation. - :param page_options: If set, remove pages from the document as specified. - This is done before sending the file to the server. - It is useful to avoid page limitations. + :param page_options: If set, remove pages from the document as specified. This is done before sending the file to the server. It is useful to avoid page limitations. - :param cropper: Whether to include cropper results for each page. - This performs a cropping operation on the server and will increase response time. + :param cropper: Whether to include cropper results for each page. This performs a cropping operation on the server and will increase response time. :param endpoint: For custom endpoints, an endpoint has to be given. - :param initial_delay_sec: Delay between each polling attempts - This should not be shorter than 4 seconds. + :param initial_delay_sec: Delay between each polling attempts This should not be shorter than 4 seconds. - :param delay_sec: Delay between each polling attempts - This should not be shorter than 2 seconds. + :param delay_sec: Delay between each polling attempts This should not be shorter than 2 seconds. :param max_retries: Total amount of polling attempts. """ diff --git a/mindee/product/generated/__init__.py b/mindee/product/generated/__init__.py index 01c2a2be..513906f3 100644 --- a/mindee/product/generated/__init__.py +++ b/mindee/product/generated/__init__.py @@ -1,5 +1,5 @@ from mindee.product.generated.generated_v1 import ( GeneratedV1, GeneratedV1Document, - GeneratedV1Page, + GeneratedV1Page )