UncountablePythonSDK 0.0.29__tar.gz → 0.0.30__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of UncountablePythonSDK might be problematic. Click here for more details.
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/.gitignore +5 -0
- {uncountablepythonsdk-0.0.29/UncountablePythonSDK.egg-info → uncountablepythonsdk-0.0.30}/PKG-INFO +3 -3
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30/UncountablePythonSDK.egg-info}/PKG-INFO +3 -3
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/UncountablePythonSDK.egg-info/SOURCES.txt +0 -52
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/UncountablePythonSDK.egg-info/requires.txt +2 -2
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/UncountablePythonSDK.egg-info/top_level.txt +0 -1
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/docs/conf.py +9 -4
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/examples/async_batch.py +2 -3
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/examples/create_entity.py +4 -7
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/examples/upload_files.py +1 -1
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pkgs/type_spec/emit_python.py +0 -1
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pyproject.toml +2 -2
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/__init__.py +1 -2
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/core/__init__.py +10 -3
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/core/client.py +27 -17
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/core/file_upload.py +3 -5
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/core/types.py +1 -1
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/integration/construct_client.py +1 -1
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/integration/cron.py +4 -2
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/integration/entrypoint.py +4 -5
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/integration/executors/script_executor.py +11 -5
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/integration/job.py +5 -8
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/async_batch_processor.py +0 -1
- uncountablepythonsdk-0.0.29/examples/recipe-import/importer.py +0 -39
- uncountablepythonsdk-0.0.29/type_spec/external/api/batch/execute_batch.yaml +0 -56
- uncountablepythonsdk-0.0.29/type_spec/external/api/batch/execute_batch_load_async.yaml +0 -18
- uncountablepythonsdk-0.0.29/type_spec/external/api/chemical/convert_chemical_formats.yaml +0 -33
- uncountablepythonsdk-0.0.29/type_spec/external/api/entity/create_entities.yaml +0 -45
- uncountablepythonsdk-0.0.29/type_spec/external/api/entity/create_entity.yaml +0 -51
- uncountablepythonsdk-0.0.29/type_spec/external/api/entity/get_entities_data.yaml +0 -29
- uncountablepythonsdk-0.0.29/type_spec/external/api/entity/list_entities.yaml +0 -52
- uncountablepythonsdk-0.0.29/type_spec/external/api/entity/lock_entity.yaml +0 -21
- uncountablepythonsdk-0.0.29/type_spec/external/api/entity/resolve_entity_ids.yaml +0 -29
- uncountablepythonsdk-0.0.29/type_spec/external/api/entity/set_values.yaml +0 -18
- uncountablepythonsdk-0.0.29/type_spec/external/api/entity/transition_entity_phase.yaml +0 -44
- uncountablepythonsdk-0.0.29/type_spec/external/api/entity/unlock_entity.yaml +0 -18
- uncountablepythonsdk-0.0.29/type_spec/external/api/field_options/upsert_field_options.yaml +0 -37
- uncountablepythonsdk-0.0.29/type_spec/external/api/id_source/list_id_source.yaml +0 -35
- uncountablepythonsdk-0.0.29/type_spec/external/api/id_source/match_id_source.yaml +0 -32
- uncountablepythonsdk-0.0.29/type_spec/external/api/input_groups/get_input_group_names.yaml +0 -29
- uncountablepythonsdk-0.0.29/type_spec/external/api/inputs/create_inputs.yaml +0 -48
- uncountablepythonsdk-0.0.29/type_spec/external/api/inputs/get_input_data.yaml +0 -95
- uncountablepythonsdk-0.0.29/type_spec/external/api/inputs/get_input_names.yaml +0 -38
- uncountablepythonsdk-0.0.29/type_spec/external/api/inputs/get_inputs_data.yaml +0 -82
- uncountablepythonsdk-0.0.29/type_spec/external/api/inputs/set_input_attribute_values.yaml +0 -33
- uncountablepythonsdk-0.0.29/type_spec/external/api/inputs/set_input_category.yaml +0 -23
- uncountablepythonsdk-0.0.29/type_spec/external/api/inputs/set_input_subcategories.yaml +0 -23
- uncountablepythonsdk-0.0.29/type_spec/external/api/material_families/update_entity_material_families.yaml +0 -33
- uncountablepythonsdk-0.0.29/type_spec/external/api/outputs/get_output_data.yaml +0 -92
- uncountablepythonsdk-0.0.29/type_spec/external/api/outputs/get_output_names.yaml +0 -35
- uncountablepythonsdk-0.0.29/type_spec/external/api/outputs/resolve_output_conditions.yaml +0 -50
- uncountablepythonsdk-0.0.29/type_spec/external/api/permissions/set_core_permissions.yaml +0 -69
- uncountablepythonsdk-0.0.29/type_spec/external/api/project/get_projects.yaml +0 -42
- uncountablepythonsdk-0.0.29/type_spec/external/api/project/get_projects_data.yaml +0 -50
- uncountablepythonsdk-0.0.29/type_spec/external/api/recipe_links/create_recipe_link.yaml +0 -25
- uncountablepythonsdk-0.0.29/type_spec/external/api/recipe_metadata/get_recipe_metadata_data.yaml +0 -41
- uncountablepythonsdk-0.0.29/type_spec/external/api/recipes/archive_recipes.yaml +0 -20
- uncountablepythonsdk-0.0.29/type_spec/external/api/recipes/associate_recipe_as_input.yaml +0 -19
- uncountablepythonsdk-0.0.29/type_spec/external/api/recipes/associate_recipe_as_lot.yaml +0 -19
- uncountablepythonsdk-0.0.29/type_spec/external/api/recipes/create_recipe.yaml +0 -42
- uncountablepythonsdk-0.0.29/type_spec/external/api/recipes/create_recipes.yaml +0 -47
- uncountablepythonsdk-0.0.29/type_spec/external/api/recipes/disassociate_recipe_as_input.yaml +0 -16
- uncountablepythonsdk-0.0.29/type_spec/external/api/recipes/edit_recipe_inputs.yaml +0 -85
- uncountablepythonsdk-0.0.29/type_spec/external/api/recipes/get_curve.yaml +0 -21
- uncountablepythonsdk-0.0.29/type_spec/external/api/recipes/get_recipe_calculations.yaml +0 -39
- uncountablepythonsdk-0.0.29/type_spec/external/api/recipes/get_recipe_links.yaml +0 -26
- uncountablepythonsdk-0.0.29/type_spec/external/api/recipes/get_recipe_names.yaml +0 -29
- uncountablepythonsdk-0.0.29/type_spec/external/api/recipes/get_recipe_output_metadata.yaml +0 -36
- uncountablepythonsdk-0.0.29/type_spec/external/api/recipes/get_recipes_data.yaml +0 -244
- uncountablepythonsdk-0.0.29/type_spec/external/api/recipes/set_recipe_inputs.yaml +0 -42
- uncountablepythonsdk-0.0.29/type_spec/external/api/recipes/set_recipe_metadata.yaml +0 -20
- uncountablepythonsdk-0.0.29/type_spec/external/api/recipes/set_recipe_outputs.yaml +0 -52
- uncountablepythonsdk-0.0.29/type_spec/external/api/recipes/set_recipe_tags.yaml +0 -62
- uncountablepythonsdk-0.0.29/type_spec/external/api/recipes/unarchive_recipes.yaml +0 -17
- uncountablepythonsdk-0.0.29/type_spec/external/api/triggers/run_trigger.yaml +0 -18
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/.github/workflows/documentation.yml +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/.github/workflows/publish.yml +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/README.md +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/UncountablePythonSDK.egg-info/dependency_links.txt +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/docs/.gitignore +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/docs/index.md +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/docs/justfile +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/docs/quickstart.md +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/docs/requirements.txt +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/docs/static/favicons/android-chrome-192x192.png +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/docs/static/favicons/android-chrome-512x512.png +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/docs/static/favicons/apple-touch-icon.png +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/docs/static/favicons/browserconfig.xml +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/docs/static/favicons/favicon-16x16.png +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/docs/static/favicons/favicon-32x32.png +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/docs/static/favicons/manifest.json +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/docs/static/favicons/mstile-150x150.png +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/docs/static/favicons/safari-pinned-tab.svg +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/docs/static/logo_blue.png +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pkgs/__init__.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pkgs/argument_parser/__init__.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pkgs/argument_parser/_is_enum.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pkgs/argument_parser/_is_namedtuple.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pkgs/argument_parser/argument_parser.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pkgs/argument_parser/case_convert.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pkgs/serialization/__init__.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pkgs/serialization/missing_sentry.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pkgs/serialization/opaque_key.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pkgs/serialization/serial_class.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pkgs/serialization_util/__init__.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pkgs/serialization_util/_get_type_for_serialization.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pkgs/serialization_util/serialization_helpers.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pkgs/strenum_compat/__init__.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pkgs/strenum_compat/strenum_compat.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pkgs/type_spec/__init__.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pkgs/type_spec/__main__.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pkgs/type_spec/actions_registry/__init__.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pkgs/type_spec/actions_registry/__main__.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pkgs/type_spec/actions_registry/emit_typescript.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pkgs/type_spec/builder.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pkgs/type_spec/config.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pkgs/type_spec/emit_io_ts.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pkgs/type_spec/emit_open_api.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pkgs/type_spec/emit_open_api_util.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pkgs/type_spec/emit_typescript.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pkgs/type_spec/emit_typescript_util.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pkgs/type_spec/load_types.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pkgs/type_spec/open_api_util.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pkgs/type_spec/parts/base.py.prepart +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pkgs/type_spec/parts/base.ts.prepart +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pkgs/type_spec/test.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pkgs/type_spec/type_info/__main__.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pkgs/type_spec/type_info/emit_type_info.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pkgs/type_spec/util.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pkgs/type_spec/value_spec/__init__.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pkgs/type_spec/value_spec/__main__.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pkgs/type_spec/value_spec/convert_type.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pkgs/type_spec/value_spec/emit_python.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/pkgs/type_spec/value_spec/types.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/setup.cfg +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/core/async_batch.py +1 -1
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/integration/__init__.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/integration/db/__init__.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/integration/db/connect.py +1 -1
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/integration/executors/__init__.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/integration/server.py +5 -5
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/integration/types.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/py.typed +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/__init__.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/__init__.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/batch/__init__.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/batch/execute_batch.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/batch/execute_batch_load_async.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/chemical/__init__.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/chemical/convert_chemical_formats.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/entity/__init__.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/entity/create_entities.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/entity/create_entity.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/entity/get_entities_data.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/entity/list_entities.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/entity/lock_entity.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/entity/resolve_entity_ids.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/entity/set_values.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/entity/transition_entity_phase.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/entity/unlock_entity.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/field_options/__init__.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/field_options/upsert_field_options.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/id_source/__init__.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/id_source/list_id_source.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/id_source/match_id_source.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/input_groups/__init__.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/input_groups/get_input_group_names.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/inputs/__init__.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/inputs/create_inputs.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/inputs/get_input_data.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/inputs/get_input_names.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/inputs/get_inputs_data.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/inputs/set_input_attribute_values.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/inputs/set_input_category.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/inputs/set_input_subcategories.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/material_families/__init__.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/material_families/update_entity_material_families.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/outputs/__init__.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/outputs/get_output_data.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/outputs/get_output_names.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/outputs/resolve_output_conditions.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/permissions/__init__.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/permissions/set_core_permissions.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/project/__init__.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/project/get_projects.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/project/get_projects_data.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/recipe_links/__init__.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/recipe_links/create_recipe_link.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/recipe_metadata/__init__.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/recipe_metadata/get_recipe_metadata_data.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/recipes/__init__.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/recipes/archive_recipes.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/recipes/associate_recipe_as_input.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/recipes/associate_recipe_as_lot.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/recipes/create_recipe.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/recipes/create_recipes.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/recipes/disassociate_recipe_as_input.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/recipes/edit_recipe_inputs.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/recipes/get_curve.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/recipes/get_recipe_calculations.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/recipes/get_recipe_links.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/recipes/get_recipe_names.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/recipes/get_recipe_output_metadata.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/recipes/get_recipes_data.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/recipes/set_recipe_inputs.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/recipes/set_recipe_metadata.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/recipes/set_recipe_outputs.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/recipes/set_recipe_tags.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/recipes/unarchive_recipes.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/triggers/__init__.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/api/triggers/run_trigger.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/async_batch.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/base.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/calculations.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/chemical_structure.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/client_base.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/curves.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/entity.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/experiment_groups.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/field_values.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/fields.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/id_source.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/identifier.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/input_attributes.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/inputs.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/outputs.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/permissions.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/phases.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/post_base.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/recipe_identifiers.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/recipe_inputs.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/recipe_links.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/recipe_metadata.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/recipe_output_metadata.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/recipe_tags.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/recipe_workflow_steps.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/response.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/units.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/users.py +0 -0
- {uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/types/workflows.py +0 -0
{uncountablepythonsdk-0.0.29/UncountablePythonSDK.egg-info → uncountablepythonsdk-0.0.30}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: UncountablePythonSDK
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.30
|
|
4
4
|
Summary: Uncountable SDK
|
|
5
5
|
Project-URL: Homepage, https://github.com/uncountableinc/uncountable-python-sdk
|
|
6
6
|
Project-URL: Repository, https://github.com/uncountableinc/uncountable-python-sdk.git
|
|
@@ -27,9 +27,9 @@ Requires-Dist: PyYAML==6.*
|
|
|
27
27
|
Provides-Extra: test
|
|
28
28
|
Requires-Dist: mypy==1.*; extra == "test"
|
|
29
29
|
Requires-Dist: ruff==0.*; extra == "test"
|
|
30
|
-
Requires-Dist: pytest==
|
|
30
|
+
Requires-Dist: pytest==8.*; extra == "test"
|
|
31
31
|
Requires-Dist: coverage[toml]==6.*; extra == "test"
|
|
32
|
-
Requires-Dist: pytest-cov==
|
|
32
|
+
Requires-Dist: pytest-cov==5.*; extra == "test"
|
|
33
33
|
Requires-Dist: pytest-xdist==3.*; extra == "test"
|
|
34
34
|
|
|
35
35
|
# Uncountable Python SDK
|
{uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30/UncountablePythonSDK.egg-info}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: UncountablePythonSDK
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.30
|
|
4
4
|
Summary: Uncountable SDK
|
|
5
5
|
Project-URL: Homepage, https://github.com/uncountableinc/uncountable-python-sdk
|
|
6
6
|
Project-URL: Repository, https://github.com/uncountableinc/uncountable-python-sdk.git
|
|
@@ -27,9 +27,9 @@ Requires-Dist: PyYAML==6.*
|
|
|
27
27
|
Provides-Extra: test
|
|
28
28
|
Requires-Dist: mypy==1.*; extra == "test"
|
|
29
29
|
Requires-Dist: ruff==0.*; extra == "test"
|
|
30
|
-
Requires-Dist: pytest==
|
|
30
|
+
Requires-Dist: pytest==8.*; extra == "test"
|
|
31
31
|
Requires-Dist: coverage[toml]==6.*; extra == "test"
|
|
32
|
-
Requires-Dist: pytest-cov==
|
|
32
|
+
Requires-Dist: pytest-cov==5.*; extra == "test"
|
|
33
33
|
Requires-Dist: pytest-xdist==3.*; extra == "test"
|
|
34
34
|
|
|
35
35
|
# Uncountable Python SDK
|
|
@@ -27,7 +27,6 @@ docs/static/favicons/safari-pinned-tab.svg
|
|
|
27
27
|
examples/async_batch.py
|
|
28
28
|
examples/create_entity.py
|
|
29
29
|
examples/upload_files.py
|
|
30
|
-
examples/recipe-import/importer.py
|
|
31
30
|
pkgs/__init__.py
|
|
32
31
|
pkgs/argument_parser/__init__.py
|
|
33
32
|
pkgs/argument_parser/_is_enum.py
|
|
@@ -69,57 +68,6 @@ pkgs/type_spec/value_spec/__main__.py
|
|
|
69
68
|
pkgs/type_spec/value_spec/convert_type.py
|
|
70
69
|
pkgs/type_spec/value_spec/emit_python.py
|
|
71
70
|
pkgs/type_spec/value_spec/types.py
|
|
72
|
-
type_spec/external/api/batch/execute_batch.yaml
|
|
73
|
-
type_spec/external/api/batch/execute_batch_load_async.yaml
|
|
74
|
-
type_spec/external/api/chemical/convert_chemical_formats.yaml
|
|
75
|
-
type_spec/external/api/entity/create_entities.yaml
|
|
76
|
-
type_spec/external/api/entity/create_entity.yaml
|
|
77
|
-
type_spec/external/api/entity/get_entities_data.yaml
|
|
78
|
-
type_spec/external/api/entity/list_entities.yaml
|
|
79
|
-
type_spec/external/api/entity/lock_entity.yaml
|
|
80
|
-
type_spec/external/api/entity/resolve_entity_ids.yaml
|
|
81
|
-
type_spec/external/api/entity/set_values.yaml
|
|
82
|
-
type_spec/external/api/entity/transition_entity_phase.yaml
|
|
83
|
-
type_spec/external/api/entity/unlock_entity.yaml
|
|
84
|
-
type_spec/external/api/field_options/upsert_field_options.yaml
|
|
85
|
-
type_spec/external/api/id_source/list_id_source.yaml
|
|
86
|
-
type_spec/external/api/id_source/match_id_source.yaml
|
|
87
|
-
type_spec/external/api/input_groups/get_input_group_names.yaml
|
|
88
|
-
type_spec/external/api/inputs/create_inputs.yaml
|
|
89
|
-
type_spec/external/api/inputs/get_input_data.yaml
|
|
90
|
-
type_spec/external/api/inputs/get_input_names.yaml
|
|
91
|
-
type_spec/external/api/inputs/get_inputs_data.yaml
|
|
92
|
-
type_spec/external/api/inputs/set_input_attribute_values.yaml
|
|
93
|
-
type_spec/external/api/inputs/set_input_category.yaml
|
|
94
|
-
type_spec/external/api/inputs/set_input_subcategories.yaml
|
|
95
|
-
type_spec/external/api/material_families/update_entity_material_families.yaml
|
|
96
|
-
type_spec/external/api/outputs/get_output_data.yaml
|
|
97
|
-
type_spec/external/api/outputs/get_output_names.yaml
|
|
98
|
-
type_spec/external/api/outputs/resolve_output_conditions.yaml
|
|
99
|
-
type_spec/external/api/permissions/set_core_permissions.yaml
|
|
100
|
-
type_spec/external/api/project/get_projects.yaml
|
|
101
|
-
type_spec/external/api/project/get_projects_data.yaml
|
|
102
|
-
type_spec/external/api/recipe_links/create_recipe_link.yaml
|
|
103
|
-
type_spec/external/api/recipe_metadata/get_recipe_metadata_data.yaml
|
|
104
|
-
type_spec/external/api/recipes/archive_recipes.yaml
|
|
105
|
-
type_spec/external/api/recipes/associate_recipe_as_input.yaml
|
|
106
|
-
type_spec/external/api/recipes/associate_recipe_as_lot.yaml
|
|
107
|
-
type_spec/external/api/recipes/create_recipe.yaml
|
|
108
|
-
type_spec/external/api/recipes/create_recipes.yaml
|
|
109
|
-
type_spec/external/api/recipes/disassociate_recipe_as_input.yaml
|
|
110
|
-
type_spec/external/api/recipes/edit_recipe_inputs.yaml
|
|
111
|
-
type_spec/external/api/recipes/get_curve.yaml
|
|
112
|
-
type_spec/external/api/recipes/get_recipe_calculations.yaml
|
|
113
|
-
type_spec/external/api/recipes/get_recipe_links.yaml
|
|
114
|
-
type_spec/external/api/recipes/get_recipe_names.yaml
|
|
115
|
-
type_spec/external/api/recipes/get_recipe_output_metadata.yaml
|
|
116
|
-
type_spec/external/api/recipes/get_recipes_data.yaml
|
|
117
|
-
type_spec/external/api/recipes/set_recipe_inputs.yaml
|
|
118
|
-
type_spec/external/api/recipes/set_recipe_metadata.yaml
|
|
119
|
-
type_spec/external/api/recipes/set_recipe_outputs.yaml
|
|
120
|
-
type_spec/external/api/recipes/set_recipe_tags.yaml
|
|
121
|
-
type_spec/external/api/recipes/unarchive_recipes.yaml
|
|
122
|
-
type_spec/external/api/triggers/run_trigger.yaml
|
|
123
71
|
uncountable/__init__.py
|
|
124
72
|
uncountable/py.typed
|
|
125
73
|
uncountable/core/__init__.py
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
|
8
8
|
|
|
9
9
|
from datetime import date
|
|
10
|
-
import uncountable
|
|
11
10
|
|
|
12
11
|
project = "Uncountable SDK"
|
|
13
12
|
copyright = f"{date.today().year}, Uncountable Inc"
|
|
@@ -26,9 +25,15 @@ extensions = [
|
|
|
26
25
|
myst_enable_extensions = ["fieldlist", "deflist"]
|
|
27
26
|
|
|
28
27
|
autoapi_dirs = ["../uncountable"]
|
|
29
|
-
autoapi_options = [
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
autoapi_options = [
|
|
29
|
+
"members",
|
|
30
|
+
"undoc-members",
|
|
31
|
+
"show-inheritance",
|
|
32
|
+
"show-module-summary",
|
|
33
|
+
"imported-members",
|
|
34
|
+
]
|
|
35
|
+
autoapi_ignore = ["*integration*"]
|
|
36
|
+
autodoc_typehints = "description"
|
|
32
37
|
|
|
33
38
|
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
|
|
34
39
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from decimal import Decimal
|
|
2
|
-
|
|
3
|
-
from uncountable.core import AsyncBatchProcessor
|
|
2
|
+
|
|
3
|
+
from uncountable.core import AsyncBatchProcessor, AuthDetailsApiKey, Client
|
|
4
4
|
from uncountable.types import (
|
|
5
5
|
recipe_metadata,
|
|
6
6
|
)
|
|
@@ -10,7 +10,6 @@ from uncountable.types.recipe_identifiers import (
|
|
|
10
10
|
RecipeIdentifiers,
|
|
11
11
|
)
|
|
12
12
|
|
|
13
|
-
|
|
14
13
|
client = Client(
|
|
15
14
|
base_url="https://app.uncountable.com",
|
|
16
15
|
auth_details=AuthDetailsApiKey(
|
|
@@ -1,23 +1,20 @@
|
|
|
1
1
|
from uncountable.core import AuthDetailsOAuth, Client
|
|
2
|
+
from uncountable.core.client import ClientConfig
|
|
2
3
|
from uncountable.types import (
|
|
3
4
|
entity_t,
|
|
4
5
|
field_values_t,
|
|
5
6
|
)
|
|
6
7
|
|
|
7
|
-
|
|
8
8
|
client = Client(
|
|
9
9
|
base_url="https://app.uncountable.com",
|
|
10
|
-
auth_details=AuthDetailsOAuth(
|
|
11
|
-
|
|
12
|
-
),
|
|
10
|
+
auth_details=AuthDetailsOAuth(refresh_token="x"),
|
|
11
|
+
config=ClientConfig(allow_insecure_tls=False),
|
|
13
12
|
)
|
|
14
13
|
entities = client.create_entity(
|
|
15
14
|
definition_id=24,
|
|
16
15
|
entity_type=entity_t.EntityType.LAB_REQUEST,
|
|
17
16
|
field_values=[
|
|
18
|
-
field_values_t.FieldRefNameValue(
|
|
19
|
-
field_ref_name="name", value="SDK Lab Request"
|
|
20
|
-
),
|
|
17
|
+
field_values_t.FieldRefNameValue(field_ref_name="name", value="SDK Lab Request"),
|
|
21
18
|
field_values_t.FieldRefNameValue(field_ref_name="materialFamilyId", value=1),
|
|
22
19
|
],
|
|
23
20
|
)
|
|
@@ -1194,7 +1194,6 @@ ASYNC_BATCH_PROCESSOR_FILENAME = "async_batch_processor"
|
|
|
1194
1194
|
ASYNC_BATCH_PROCESSOR_IMPORTS = [
|
|
1195
1195
|
"import uuid",
|
|
1196
1196
|
"from abc import ABC, abstractmethod",
|
|
1197
|
-
"from dataclasses import dataclass",
|
|
1198
1197
|
"from pkgs.serialization_util.serialization_helpers import serialize_for_api",
|
|
1199
1198
|
]
|
|
1200
1199
|
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
+
from .async_batch import AsyncBatchProcessor
|
|
1
2
|
from .client import Client
|
|
2
|
-
from .types import AuthDetailsApiKey, AuthDetailsOAuth
|
|
3
3
|
from .file_upload import MediaFileUpload, UploadedFile
|
|
4
|
-
from .
|
|
4
|
+
from .types import AuthDetailsApiKey, AuthDetailsOAuth
|
|
5
5
|
|
|
6
|
-
__all__: list[str] = [
|
|
6
|
+
__all__: list[str] = [
|
|
7
|
+
"AuthDetailsApiKey",
|
|
8
|
+
"AuthDetailsOAuth",
|
|
9
|
+
"AsyncBatchProcessor",
|
|
10
|
+
"Client",
|
|
11
|
+
"MediaFileUpload",
|
|
12
|
+
"UploadedFile",
|
|
13
|
+
]
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import base64
|
|
2
|
-
from datetime import datetime, timedelta
|
|
3
2
|
import json
|
|
4
3
|
import typing
|
|
5
4
|
from dataclasses import dataclass
|
|
5
|
+
from datetime import datetime, timedelta
|
|
6
6
|
from enum import StrEnum
|
|
7
7
|
from urllib.parse import urljoin
|
|
8
|
+
from uuid import uuid4
|
|
8
9
|
|
|
9
10
|
import requests
|
|
10
11
|
from requests.exceptions import JSONDecodeError
|
|
@@ -18,6 +19,7 @@ from .file_upload import FileUpload, FileUploader, UploadedFile
|
|
|
18
19
|
from .types import AuthDetailsAll, AuthDetailsApiKey, AuthDetailsOAuth
|
|
19
20
|
|
|
20
21
|
DT = typing.TypeVar("DT")
|
|
22
|
+
UNC_REQUEST_ID_HEADER = "X-UNC-REQUEST-ID"
|
|
21
23
|
|
|
22
24
|
|
|
23
25
|
class EndpointMethod(StrEnum):
|
|
@@ -30,19 +32,17 @@ class HTTPRequestBase:
|
|
|
30
32
|
method: EndpointMethod
|
|
31
33
|
url: str
|
|
32
34
|
headers: dict[str, str]
|
|
33
|
-
body: typing.Optional[typing.Union[str, dict[str, str]]] = None
|
|
34
|
-
query_params: typing.Optional[dict[str, str]] = None
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
@dataclass(kw_only=True)
|
|
38
38
|
class HTTPGetRequest(HTTPRequestBase):
|
|
39
|
-
method
|
|
39
|
+
method = EndpointMethod.GET
|
|
40
40
|
query_params: dict[str, str]
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
@dataclass(kw_only=True)
|
|
44
44
|
class HTTPPostRequest(HTTPRequestBase):
|
|
45
|
-
method
|
|
45
|
+
method = EndpointMethod.POST
|
|
46
46
|
body: typing.Union[str, dict[str, str]]
|
|
47
47
|
|
|
48
48
|
|
|
@@ -101,13 +101,15 @@ class APIResponseError(BaseException):
|
|
|
101
101
|
|
|
102
102
|
class SDKError(BaseException):
|
|
103
103
|
message: str
|
|
104
|
+
request_id: str
|
|
104
105
|
|
|
105
|
-
def __init__(self, message: str) -> None:
|
|
106
|
+
def __init__(self, message: str, *, request_id: str) -> None:
|
|
106
107
|
super().__init__(message)
|
|
107
108
|
self.message = message
|
|
109
|
+
self.request_id = request_id
|
|
108
110
|
|
|
109
111
|
def __str__(self) -> str:
|
|
110
|
-
return f"internal SDK error, please contact Uncountable support: {self.message}"
|
|
112
|
+
return f"internal SDK error (request id {self.request_id}), please contact Uncountable support: {self.message}"
|
|
111
113
|
|
|
112
114
|
|
|
113
115
|
@dataclass(kw_only=True)
|
|
@@ -147,7 +149,9 @@ class Client(ClientMethods):
|
|
|
147
149
|
self._file_uploader = FileUploader(self._base_url, self._auth_details)
|
|
148
150
|
self._cfg = config or ClientConfig()
|
|
149
151
|
|
|
150
|
-
def _get_response_json(
|
|
152
|
+
def _get_response_json(
|
|
153
|
+
self, response: requests.Response, request_id: str
|
|
154
|
+
) -> dict[str, JsonValue]:
|
|
151
155
|
if response.status_code < 200 or response.status_code > 299:
|
|
152
156
|
extra_details: dict[str, JsonValue] | None = None
|
|
153
157
|
try:
|
|
@@ -160,12 +164,15 @@ class Client(ClientMethods):
|
|
|
160
164
|
status_code=response.status_code, extra_details=extra_details
|
|
161
165
|
)
|
|
162
166
|
try:
|
|
163
|
-
return response.json()
|
|
164
|
-
except JSONDecodeError:
|
|
165
|
-
raise SDKError("unable to process response")
|
|
167
|
+
return typing.cast(dict[str, JsonValue], response.json())
|
|
168
|
+
except JSONDecodeError as e:
|
|
169
|
+
raise SDKError("unable to process response", request_id=request_id) from e
|
|
166
170
|
|
|
167
171
|
def do_request(self, *, api_request: APIRequest, return_type: type[DT]) -> DT:
|
|
168
|
-
|
|
172
|
+
request_id = str(uuid4())
|
|
173
|
+
http_request = self._build_http_request(
|
|
174
|
+
api_request=api_request, request_id=request_id
|
|
175
|
+
)
|
|
169
176
|
match http_request:
|
|
170
177
|
case HTTPGetRequest():
|
|
171
178
|
response = requests.get(
|
|
@@ -179,18 +186,17 @@ class Client(ClientMethods):
|
|
|
179
186
|
http_request.url,
|
|
180
187
|
headers=http_request.headers,
|
|
181
188
|
data=http_request.body,
|
|
182
|
-
params=http_request.query_params,
|
|
183
189
|
verify=not self._cfg.allow_insecure_tls,
|
|
184
190
|
)
|
|
185
191
|
case _:
|
|
186
192
|
typing.assert_never(http_request)
|
|
187
|
-
response_data = self._get_response_json(response)
|
|
193
|
+
response_data = self._get_response_json(response, request_id=request_id)
|
|
188
194
|
cached_parser = self._get_cached_parser(return_type)
|
|
189
195
|
try:
|
|
190
196
|
data = response_data["data"]
|
|
191
197
|
return cached_parser.parse_api(data)
|
|
192
198
|
except (ValueError, JSONDecodeError, KeyError) as e:
|
|
193
|
-
raise SDKError("unable to process response") from e
|
|
199
|
+
raise SDKError("unable to process response", request_id=request_id) from e
|
|
194
200
|
|
|
195
201
|
def _get_cached_parser(self, data_type: type[DT]) -> CachedParser[DT]:
|
|
196
202
|
if data_type not in self._parser_map:
|
|
@@ -213,8 +219,9 @@ class Client(ClientMethods):
|
|
|
213
219
|
"scope": oauth_details.scope,
|
|
214
220
|
"grant_type": "client_credentials",
|
|
215
221
|
},
|
|
222
|
+
verify=not self._cfg.allow_insecure_tls,
|
|
216
223
|
)
|
|
217
|
-
data = self._get_response_json(response)
|
|
224
|
+
data = self._get_response_json(response, request_id=str(uuid4()))
|
|
218
225
|
token_data = oauth_bearer_token_data_parser.parse_storage(data)
|
|
219
226
|
self._oauth_bearer_token_cache = OAuthBearerTokenCache(
|
|
220
227
|
token=token_data.access_token,
|
|
@@ -235,8 +242,11 @@ class Client(ClientMethods):
|
|
|
235
242
|
return {"Authorization": f"Bearer {token}"}
|
|
236
243
|
typing.assert_never(self._auth_details)
|
|
237
244
|
|
|
238
|
-
def _build_http_request(
|
|
245
|
+
def _build_http_request(
|
|
246
|
+
self, *, api_request: APIRequest, request_id: str
|
|
247
|
+
) -> HTTPRequest:
|
|
239
248
|
headers = self._build_auth_headers()
|
|
249
|
+
headers[UNC_REQUEST_ID_HEADER] = request_id
|
|
240
250
|
method = api_request.method.lower()
|
|
241
251
|
data = {"data": json.dumps(serialize_for_api(api_request.args))}
|
|
242
252
|
match method:
|
|
@@ -4,7 +4,7 @@ from dataclasses import dataclass
|
|
|
4
4
|
from enum import StrEnum
|
|
5
5
|
from io import BytesIO
|
|
6
6
|
from pathlib import Path
|
|
7
|
-
from typing import Generator, Self
|
|
7
|
+
from typing import Generator, Literal, Self
|
|
8
8
|
|
|
9
9
|
import aiohttp
|
|
10
10
|
import aiotus
|
|
@@ -23,7 +23,7 @@ class MediaFileUpload:
|
|
|
23
23
|
"""Upload file from a path on disk"""
|
|
24
24
|
|
|
25
25
|
path: str
|
|
26
|
-
type: FileUploadType.MEDIA_FILE_UPLOAD = FileUploadType.MEDIA_FILE_UPLOAD
|
|
26
|
+
type: Literal[FileUploadType.MEDIA_FILE_UPLOAD] = FileUploadType.MEDIA_FILE_UPLOAD
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
FileUpload = MediaFileUpload
|
|
@@ -90,9 +90,7 @@ class FileUploader:
|
|
|
90
90
|
name=file_bytes.name, file_id=int(location.path.split("/")[-1])
|
|
91
91
|
)
|
|
92
92
|
|
|
93
|
-
def upload_files(
|
|
94
|
-
self: Self, *, file_uploads: list[FileUpload]
|
|
95
|
-
) -> list[UploadedFile]:
|
|
93
|
+
def upload_files(self: Self, *, file_uploads: list[FileUpload]) -> list[UploadedFile]:
|
|
96
94
|
return [
|
|
97
95
|
asyncio.run(self._upload_file(file_upload)) for file_upload in file_uploads
|
|
98
96
|
]
|
|
@@ -23,6 +23,8 @@ def cron_job_executor(**kwargs: dict) -> None:
|
|
|
23
23
|
client=construct_uncountable_client(profile_meta=args_passed.profile_metadata),
|
|
24
24
|
)
|
|
25
25
|
|
|
26
|
-
job = resolve_script_executor(
|
|
26
|
+
job = resolve_script_executor(
|
|
27
|
+
args_passed.definition.executor, args_passed.profile_metadata
|
|
28
|
+
)
|
|
27
29
|
|
|
28
|
-
job.run(args)
|
|
30
|
+
job.run(args=args)
|
{uncountablepythonsdk-0.0.29 → uncountablepythonsdk-0.0.30}/uncountable/integration/entrypoint.py
RENAMED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import os
|
|
2
2
|
from importlib import resources
|
|
3
3
|
|
|
4
|
-
from uncountable.integration.server import IntegrationServer
|
|
5
|
-
from uncountable.integration.types import ProfileDefinition
|
|
6
4
|
from pkgs.argument_parser import CachedParser
|
|
7
5
|
from uncountable.integration.db.connect import create_db_engine
|
|
8
|
-
|
|
6
|
+
from uncountable.integration.server import IntegrationServer
|
|
7
|
+
from uncountable.integration.types import ProfileDefinition
|
|
9
8
|
|
|
10
9
|
profile_parser = CachedParser(ProfileDefinition)
|
|
11
10
|
|
|
@@ -19,8 +18,8 @@ def main() -> None:
|
|
|
19
18
|
for entry in resources.files(profiles_module).iterdir()
|
|
20
19
|
if entry.is_dir()
|
|
21
20
|
]
|
|
22
|
-
for
|
|
23
|
-
profile_name =
|
|
21
|
+
for profile_file in profiles:
|
|
22
|
+
profile_name = profile_file.name
|
|
24
23
|
try:
|
|
25
24
|
profile = profile_parser.parse_yaml_resource(
|
|
26
25
|
package=".".join([profiles_module, profile_name]),
|
|
@@ -1,15 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
import os
|
|
3
1
|
import importlib
|
|
4
2
|
import inspect
|
|
3
|
+
import os
|
|
4
|
+
|
|
5
5
|
from uncountable.integration.job import Job
|
|
6
6
|
from uncountable.integration.types import JobExecutorScript, ProfileMetadata
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
def resolve_script_executor(
|
|
10
|
-
|
|
9
|
+
def resolve_script_executor(
|
|
10
|
+
executor: JobExecutorScript, profile_metadata: ProfileMetadata
|
|
11
|
+
) -> Job:
|
|
12
|
+
job_module_path = ".".join([
|
|
13
|
+
os.environ["UNC_PROFILES_MODULE"],
|
|
14
|
+
profile_metadata.name,
|
|
15
|
+
executor.import_path,
|
|
16
|
+
])
|
|
11
17
|
job_module = importlib.import_module(job_module_path)
|
|
12
|
-
found_jobs: list[
|
|
18
|
+
found_jobs: list[Job] = []
|
|
13
19
|
for _, job_class in inspect.getmembers(job_module, inspect.isclass):
|
|
14
20
|
if getattr(job_class, "_unc_job_registered", False):
|
|
15
21
|
found_jobs.append(job_class())
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
from abc import ABC, abstractmethod
|
|
1
2
|
from dataclasses import dataclass
|
|
3
|
+
|
|
2
4
|
from uncountable.core.client import Client
|
|
3
5
|
from uncountable.integration.types import JobDefinition
|
|
4
6
|
|
|
5
|
-
from abc import ABC, abstractmethod
|
|
6
|
-
|
|
7
7
|
|
|
8
8
|
@dataclass
|
|
9
9
|
class JobArgumentsBase:
|
|
@@ -29,17 +29,14 @@ class Job(ABC):
|
|
|
29
29
|
_unc_job_registered: bool = False
|
|
30
30
|
|
|
31
31
|
@abstractmethod
|
|
32
|
-
def run(self, args: JobArguments) -> JobResult:
|
|
33
|
-
...
|
|
32
|
+
def run(self, args: JobArguments) -> JobResult: ...
|
|
34
33
|
|
|
35
34
|
|
|
36
35
|
class CronJob(Job):
|
|
37
|
-
|
|
38
36
|
@abstractmethod
|
|
39
|
-
def run(self, args: CronJobArguments) -> JobResult:
|
|
40
|
-
...
|
|
37
|
+
def run(self, args: CronJobArguments) -> JobResult: ...
|
|
41
38
|
|
|
42
39
|
|
|
43
|
-
def register_job(cls: Job):
|
|
40
|
+
def register_job(cls: Job) -> Job:
|
|
44
41
|
cls._unc_job_registered = True
|
|
45
42
|
return cls
|
|
@@ -19,7 +19,6 @@ from uncountable.types import recipe_workflow_steps as recipe_workflow_steps_t
|
|
|
19
19
|
import uncountable.types.api.recipes.set_recipe_metadata as set_recipe_metadata_t
|
|
20
20
|
import uuid
|
|
21
21
|
from abc import ABC, abstractmethod
|
|
22
|
-
from dataclasses import dataclass
|
|
23
22
|
from pkgs.serialization_util.serialization_helpers import serialize_for_api
|
|
24
23
|
|
|
25
24
|
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
from typing import Iterable, Optional
|
|
2
|
-
import itertools
|
|
3
|
-
from dataclasses import dataclass
|
|
4
|
-
from src.client.requests_client import Client
|
|
5
|
-
from src.types.api.recipes.external_create_recipes import (
|
|
6
|
-
Arguments,
|
|
7
|
-
ExternalCreateRecipeDefinition,
|
|
8
|
-
)
|
|
9
|
-
from src.types.api.entity.external_resolve_entity_identifiers import (
|
|
10
|
-
EntityIdentifier
|
|
11
|
-
)
|
|
12
|
-
from src.types.base import ObjectId
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
@dataclass(kw_only=True)
|
|
17
|
-
class RecipeIngredientData:
|
|
18
|
-
ingredient_identifier: EntityIdentifier
|
|
19
|
-
recipe_step_id: Optional[ObjectId] = None
|
|
20
|
-
value_numeric: Optional[str] = None
|
|
21
|
-
value_str: Optional[str] = None
|
|
22
|
-
set_actual_value: bool = False
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
def import_recipes(
|
|
26
|
-
client: Client,
|
|
27
|
-
material_family_id: ObjectId,
|
|
28
|
-
project_id: Optional[ObjectId],
|
|
29
|
-
recipe_data: Iterable[ExternalCreateRecipeDefinition],
|
|
30
|
-
batch_size: int = 100,
|
|
31
|
-
) -> None:
|
|
32
|
-
for batch in itertools.batched(recipe_data, batch_size):
|
|
33
|
-
client.external_create_recipes(
|
|
34
|
-
Arguments(
|
|
35
|
-
material_family_id=material_family_id,
|
|
36
|
-
project_id=project_id,
|
|
37
|
-
recipe_definitions=list(batch),
|
|
38
|
-
)
|
|
39
|
-
)
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
$endpoint:
|
|
2
|
-
is_sdk: true
|
|
3
|
-
method: post
|
|
4
|
-
path: ${external}/batch/execute_batch
|
|
5
|
-
function: main.site.app.external.batch.execute_batch.execute_batch
|
|
6
|
-
desc: Run multiple API calls via one request
|
|
7
|
-
|
|
8
|
-
RequestMethod:
|
|
9
|
-
type: StringEnum
|
|
10
|
-
values:
|
|
11
|
-
get: GET
|
|
12
|
-
head: HEAD
|
|
13
|
-
post: POST
|
|
14
|
-
put: PUT
|
|
15
|
-
delete: DELETE
|
|
16
|
-
connect: CONNECT
|
|
17
|
-
options: OPTIONS
|
|
18
|
-
trace: TRACE
|
|
19
|
-
patch: PATCH
|
|
20
|
-
|
|
21
|
-
BatchRequest:
|
|
22
|
-
type: Object
|
|
23
|
-
properties:
|
|
24
|
-
path:
|
|
25
|
-
type: String
|
|
26
|
-
method:
|
|
27
|
-
type: RequestMethod
|
|
28
|
-
data:
|
|
29
|
-
convert_value: no_convert
|
|
30
|
-
type: JsonValue
|
|
31
|
-
desc: JSON payload for the api call
|
|
32
|
-
|
|
33
|
-
Arguments:
|
|
34
|
-
type: Object
|
|
35
|
-
properties:
|
|
36
|
-
requests:
|
|
37
|
-
type: List<BatchRequest>
|
|
38
|
-
|
|
39
|
-
BatchResponse:
|
|
40
|
-
type: Object
|
|
41
|
-
properties:
|
|
42
|
-
path:
|
|
43
|
-
type: String
|
|
44
|
-
method:
|
|
45
|
-
type: RequestMethod
|
|
46
|
-
status_code:
|
|
47
|
-
type: Integer
|
|
48
|
-
response:
|
|
49
|
-
convert_value: no_convert
|
|
50
|
-
type: JsonValue
|
|
51
|
-
|
|
52
|
-
Data:
|
|
53
|
-
type: Object
|
|
54
|
-
properties:
|
|
55
|
-
responses:
|
|
56
|
-
type: List<BatchResponse>
|