moderation_api 1.41.0__tar.gz → 2.0.0__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.
- moderation_api-2.0.0/PKG-INFO +805 -0
- moderation_api-2.0.0/README-PYPI.md +789 -0
- moderation_api-2.0.0/README.md +789 -0
- moderation_api-2.0.0/pyproject.toml +55 -0
- moderation_api-2.0.0/setup.cfg +4 -0
- moderation_api-2.0.0/src/moderation_api/__init__.py +17 -0
- moderation_api-2.0.0/src/moderation_api/_hooks/__init__.py +4 -0
- moderation_api-2.0.0/src/moderation_api/_hooks/sdkhooks.py +74 -0
- moderation_api-2.0.0/src/moderation_api/_hooks/types.py +124 -0
- moderation_api-2.0.0/src/moderation_api/_version.py +15 -0
- moderation_api-2.0.0/src/moderation_api/account.py +195 -0
- moderation_api-2.0.0/src/moderation_api/actions.py +1629 -0
- moderation_api-2.0.0/src/moderation_api/authors.py +1403 -0
- moderation_api-2.0.0/src/moderation_api/basesdk.py +396 -0
- moderation_api-2.0.0/src/moderation_api/channels.py +1585 -0
- moderation_api-2.0.0/src/moderation_api/content_sdk.py +325 -0
- moderation_api-2.0.0/src/moderation_api/errors/__init__.py +69 -0
- moderation_api-2.0.0/src/moderation_api/errors/authenticationerror.py +61 -0
- moderation_api-2.0.0/src/moderation_api/errors/badrequesterror.py +59 -0
- moderation_api-2.0.0/src/moderation_api/errors/conflicterror.py +57 -0
- moderation_api-2.0.0/src/moderation_api/errors/internalservererror.py +55 -0
- moderation_api-2.0.0/src/moderation_api/errors/moderationapidefaulterror.py +40 -0
- moderation_api-2.0.0/src/moderation_api/errors/moderationapierror.py +30 -0
- moderation_api-2.0.0/src/moderation_api/errors/no_response_error.py +17 -0
- moderation_api-2.0.0/src/moderation_api/errors/notfounderror.py +65 -0
- moderation_api-2.0.0/src/moderation_api/errors/permissiondeniederror.py +66 -0
- moderation_api-2.0.0/src/moderation_api/errors/ratelimiterror.py +58 -0
- moderation_api-2.0.0/src/moderation_api/errors/responsevalidationerror.py +27 -0
- moderation_api-2.0.0/src/moderation_api/httpclient.py +125 -0
- moderation_api-2.0.0/src/moderation_api/items.py +905 -0
- moderation_api-2.0.0/src/moderation_api/models/__init__.py +1624 -0
- moderation_api-2.0.0/src/moderation_api/models/addwordlistwordsop.py +66 -0
- moderation_api-2.0.0/src/moderation_api/models/authenticationerror.py +23 -0
- moderation_api-2.0.0/src/moderation_api/models/badrequesterror.py +19 -0
- moderation_api-2.0.0/src/moderation_api/models/channel.py +190 -0
- moderation_api-2.0.0/src/moderation_api/models/conflicterror.py +12 -0
- moderation_api-2.0.0/src/moderation_api/models/createactionop.py +339 -0
- moderation_api-2.0.0/src/moderation_api/models/createauthorop.py +197 -0
- moderation_api-2.0.0/src/moderation_api/models/createchannelop.py +92 -0
- moderation_api-2.0.0/src/moderation_api/models/createprojectop.py +62 -0
- moderation_api-2.0.0/src/moderation_api/models/createwebhookop.py +193 -0
- moderation_api-2.0.0/src/moderation_api/models/deleteactionop.py +37 -0
- moderation_api-2.0.0/src/moderation_api/models/deleteauthorop.py +30 -0
- moderation_api-2.0.0/src/moderation_api/models/deletechannelop.py +37 -0
- moderation_api-2.0.0/src/moderation_api/models/deleteprojectop.py +37 -0
- moderation_api-2.0.0/src/moderation_api/models/deletewebhookop.py +37 -0
- moderation_api-2.0.0/src/moderation_api/models/duplicatechannelop.py +57 -0
- moderation_api-2.0.0/src/moderation_api/models/duplicateprojectop.py +52 -0
- moderation_api-2.0.0/src/moderation_api/models/errorissue.py +49 -0
- moderation_api-2.0.0/src/moderation_api/models/executeactionop.py +87 -0
- moderation_api-2.0.0/src/moderation_api/models/getaccountop.py +70 -0
- moderation_api-2.0.0/src/moderation_api/models/getactionop.py +199 -0
- moderation_api-2.0.0/src/moderation_api/models/getauthorop.py +18 -0
- moderation_api-2.0.0/src/moderation_api/models/getchannelop.py +18 -0
- moderation_api-2.0.0/src/moderation_api/models/getprojectop.py +18 -0
- moderation_api-2.0.0/src/moderation_api/models/getqueueop.py +405 -0
- moderation_api-2.0.0/src/moderation_api/models/getqueuestatsop.py +264 -0
- moderation_api-2.0.0/src/moderation_api/models/getwebhookop.py +135 -0
- moderation_api-2.0.0/src/moderation_api/models/getwebhooksecretop.py +19 -0
- moderation_api-2.0.0/src/moderation_api/models/getwordlistembeddingstatusop.py +49 -0
- moderation_api-2.0.0/src/moderation_api/models/getwordlistop.py +81 -0
- moderation_api-2.0.0/src/moderation_api/models/internalservererror.py +12 -0
- moderation_api-2.0.0/src/moderation_api/models/listactionsop.py +257 -0
- moderation_api-2.0.0/src/moderation_api/models/listauthorsop.py +143 -0
- moderation_api-2.0.0/src/moderation_api/models/listchannelsop.py +86 -0
- moderation_api-2.0.0/src/moderation_api/models/listprojectsop.py +77 -0
- moderation_api-2.0.0/src/moderation_api/models/listqueueitemsop.py +335 -0
- moderation_api-2.0.0/src/moderation_api/models/listwebhooksop.py +186 -0
- moderation_api-2.0.0/src/moderation_api/models/listwordlistsop.py +126 -0
- moderation_api-2.0.0/src/moderation_api/models/notfounderror.py +31 -0
- moderation_api-2.0.0/src/moderation_api/models/pagination.py +46 -0
- moderation_api-2.0.0/src/moderation_api/models/permissiondeniederror.py +33 -0
- moderation_api-2.0.0/src/moderation_api/models/project.py +97 -0
- moderation_api-2.0.0/src/moderation_api/models/projectwithkey.py +102 -0
- moderation_api-2.0.0/src/moderation_api/models/publicauthor.py +373 -0
- moderation_api-2.0.0/src/moderation_api/models/ratelimiterror.py +12 -0
- moderation_api-2.0.0/src/moderation_api/models/removewordlistwordsop.py +57 -0
- moderation_api-2.0.0/src/moderation_api/models/resolvequeueitemop.py +106 -0
- moderation_api-2.0.0/src/moderation_api/models/security.py +42 -0
- moderation_api-2.0.0/src/moderation_api/models/submitcontentop.py +3637 -0
- moderation_api-2.0.0/src/moderation_api/models/unresolvequeueitemop.py +90 -0
- moderation_api-2.0.0/src/moderation_api/models/updateactionop.py +359 -0
- moderation_api-2.0.0/src/moderation_api/models/updateauthorop.py +211 -0
- moderation_api-2.0.0/src/moderation_api/models/updatechannelop.py +224 -0
- moderation_api-2.0.0/src/moderation_api/models/updateprojectop.py +128 -0
- moderation_api-2.0.0/src/moderation_api/models/updatewebhookop.py +213 -0
- moderation_api-2.0.0/src/moderation_api/models/updatewordlistop.py +133 -0
- moderation_api-2.0.0/src/moderation_api/projects.py +1487 -0
- moderation_api-2.0.0/src/moderation_api/py.typed +1 -0
- moderation_api-2.0.0/src/moderation_api/queue_sdk.py +499 -0
- moderation_api-2.0.0/src/moderation_api/sdk.py +207 -0
- moderation_api-2.0.0/src/moderation_api/sdkconfiguration.py +48 -0
- moderation_api-2.0.0/src/moderation_api/types/__init__.py +24 -0
- moderation_api-2.0.0/src/moderation_api/types/base64fileinput.py +43 -0
- moderation_api-2.0.0/src/moderation_api/types/basemodel.py +77 -0
- moderation_api-2.0.0/src/moderation_api/utils/__init__.py +186 -0
- moderation_api-2.0.0/src/moderation_api/utils/annotations.py +79 -0
- moderation_api-2.0.0/src/moderation_api/utils/datetimes.py +41 -0
- moderation_api-2.0.0/src/moderation_api/utils/dynamic_imports.py +54 -0
- moderation_api-2.0.0/src/moderation_api/utils/enums.py +134 -0
- moderation_api-2.0.0/src/moderation_api/utils/eventstreaming.py +326 -0
- moderation_api-2.0.0/src/moderation_api/utils/forms.py +239 -0
- moderation_api-2.0.0/src/moderation_api/utils/headers.py +136 -0
- moderation_api-2.0.0/src/moderation_api/utils/logger.py +27 -0
- moderation_api-2.0.0/src/moderation_api/utils/metadata.py +119 -0
- moderation_api-2.0.0/src/moderation_api/utils/queryparams.py +217 -0
- moderation_api-2.0.0/src/moderation_api/utils/requestbodies.py +67 -0
- moderation_api-2.0.0/src/moderation_api/utils/retries.py +372 -0
- moderation_api-2.0.0/src/moderation_api/utils/security.py +215 -0
- moderation_api-2.0.0/src/moderation_api/utils/serializers.py +326 -0
- moderation_api-2.0.0/src/moderation_api/utils/unions.py +58 -0
- moderation_api-2.0.0/src/moderation_api/utils/unmarshal_json_response.py +38 -0
- moderation_api-2.0.0/src/moderation_api/utils/url.py +154 -0
- moderation_api-2.0.0/src/moderation_api/utils/values.py +142 -0
- moderation_api-2.0.0/src/moderation_api/webhook_signature.py +67 -0
- moderation_api-2.0.0/src/moderation_api/webhooks.py +1181 -0
- moderation_api-2.0.0/src/moderation_api/webhooksecret.py +195 -0
- moderation_api-2.0.0/src/moderation_api/wordlist.py +1061 -0
- moderation_api-2.0.0/src/moderation_api/words.py +461 -0
- moderation_api-2.0.0/src/moderation_api.egg-info/PKG-INFO +805 -0
- moderation_api-2.0.0/src/moderation_api.egg-info/SOURCES.txt +123 -0
- moderation_api-2.0.0/src/moderation_api.egg-info/dependency_links.txt +1 -0
- moderation_api-2.0.0/src/moderation_api.egg-info/requires.txt +4 -0
- moderation_api-2.0.0/src/moderation_api.egg-info/top_level.txt +1 -0
- moderation_api-1.41.0/.gitignore +0 -16
- moderation_api-1.41.0/.release-please-manifest.json +0 -3
- moderation_api-1.41.0/CHANGELOG.md +0 -542
- moderation_api-1.41.0/CONTRIBUTING.md +0 -121
- moderation_api-1.41.0/PKG-INFO +0 -458
- moderation_api-1.41.0/README.md +0 -423
- moderation_api-1.41.0/SECURITY.md +0 -27
- moderation_api-1.41.0/api.md +0 -188
- moderation_api-1.41.0/bin/check-release-environment +0 -21
- moderation_api-1.41.0/bin/publish-pypi +0 -7
- moderation_api-1.41.0/examples/.keep +0 -4
- moderation_api-1.41.0/pyproject.toml +0 -255
- moderation_api-1.41.0/release-please-config.json +0 -66
- moderation_api-1.41.0/requirements-dev.lock +0 -110
- moderation_api-1.41.0/src/moderation_api/__init__.py +0 -102
- moderation_api-1.41.0/src/moderation_api/_base_client.py +0 -2131
- moderation_api-1.41.0/src/moderation_api/_client.py +0 -775
- moderation_api-1.41.0/src/moderation_api/_compat.py +0 -226
- moderation_api-1.41.0/src/moderation_api/_constants.py +0 -14
- moderation_api-1.41.0/src/moderation_api/_exceptions.py +0 -108
- moderation_api-1.41.0/src/moderation_api/_files.py +0 -173
- moderation_api-1.41.0/src/moderation_api/_models.py +0 -952
- moderation_api-1.41.0/src/moderation_api/_qs.py +0 -149
- moderation_api-1.41.0/src/moderation_api/_resource.py +0 -43
- moderation_api-1.41.0/src/moderation_api/_response.py +0 -835
- moderation_api-1.41.0/src/moderation_api/_streaming.py +0 -338
- moderation_api-1.41.0/src/moderation_api/_types.py +0 -273
- moderation_api-1.41.0/src/moderation_api/_utils/__init__.py +0 -64
- moderation_api-1.41.0/src/moderation_api/_utils/_compat.py +0 -45
- moderation_api-1.41.0/src/moderation_api/_utils/_datetime_parse.py +0 -136
- moderation_api-1.41.0/src/moderation_api/_utils/_json.py +0 -35
- moderation_api-1.41.0/src/moderation_api/_utils/_logs.py +0 -25
- moderation_api-1.41.0/src/moderation_api/_utils/_path.py +0 -127
- moderation_api-1.41.0/src/moderation_api/_utils/_proxy.py +0 -65
- moderation_api-1.41.0/src/moderation_api/_utils/_reflection.py +0 -42
- moderation_api-1.41.0/src/moderation_api/_utils/_resources_proxy.py +0 -24
- moderation_api-1.41.0/src/moderation_api/_utils/_streams.py +0 -12
- moderation_api-1.41.0/src/moderation_api/_utils/_sync.py +0 -58
- moderation_api-1.41.0/src/moderation_api/_utils/_transform.py +0 -457
- moderation_api-1.41.0/src/moderation_api/_utils/_typing.py +0 -156
- moderation_api-1.41.0/src/moderation_api/_utils/_utils.py +0 -433
- moderation_api-1.41.0/src/moderation_api/_version.py +0 -4
- moderation_api-1.41.0/src/moderation_api/lib/.keep +0 -4
- moderation_api-1.41.0/src/moderation_api/py.typed +0 -0
- moderation_api-1.41.0/src/moderation_api/resources/__init__.py +0 -131
- moderation_api-1.41.0/src/moderation_api/resources/account.py +0 -135
- moderation_api-1.41.0/src/moderation_api/resources/actions/__init__.py +0 -33
- moderation_api-1.41.0/src/moderation_api/resources/actions/actions.py +0 -794
- moderation_api-1.41.0/src/moderation_api/resources/actions/execute.py +0 -354
- moderation_api-1.41.0/src/moderation_api/resources/auth.py +0 -204
- moderation_api-1.41.0/src/moderation_api/resources/authors.py +0 -730
- moderation_api-1.41.0/src/moderation_api/resources/content.py +0 -384
- moderation_api-1.41.0/src/moderation_api/resources/queue/__init__.py +0 -33
- moderation_api-1.41.0/src/moderation_api/resources/queue/items.py +0 -445
- moderation_api-1.41.0/src/moderation_api/resources/queue/queue.py +0 -302
- moderation_api-1.41.0/src/moderation_api/resources/webhook_secret.py +0 -143
- moderation_api-1.41.0/src/moderation_api/resources/webhooks.py +0 -618
- moderation_api-1.41.0/src/moderation_api/resources/wordlist/__init__.py +0 -33
- moderation_api-1.41.0/src/moderation_api/resources/wordlist/wordlist.py +0 -470
- moderation_api-1.41.0/src/moderation_api/resources/wordlist/words.py +0 -274
- moderation_api-1.41.0/src/moderation_api/types/__init__.py +0 -43
- moderation_api-1.41.0/src/moderation_api/types/account_list_response.py +0 -31
- moderation_api-1.41.0/src/moderation_api/types/action_create_params.py +0 -77
- moderation_api-1.41.0/src/moderation_api/types/action_create_response.py +0 -82
- moderation_api-1.41.0/src/moderation_api/types/action_delete_response.py +0 -13
- moderation_api-1.41.0/src/moderation_api/types/action_list_params.py +0 -13
- moderation_api-1.41.0/src/moderation_api/types/action_list_response.py +0 -85
- moderation_api-1.41.0/src/moderation_api/types/action_retrieve_response.py +0 -82
- moderation_api-1.41.0/src/moderation_api/types/action_update_params.py +0 -77
- moderation_api-1.41.0/src/moderation_api/types/action_update_response.py +0 -82
- moderation_api-1.41.0/src/moderation_api/types/actions/__init__.py +0 -8
- moderation_api-1.41.0/src/moderation_api/types/actions/execute_execute_by_id_params.py +0 -24
- moderation_api-1.41.0/src/moderation_api/types/actions/execute_execute_by_id_response.py +0 -20
- moderation_api-1.41.0/src/moderation_api/types/actions/execute_execute_params.py +0 -30
- moderation_api-1.41.0/src/moderation_api/types/actions/execute_execute_response.py +0 -12
- moderation_api-1.41.0/src/moderation_api/types/auth_create_response.py +0 -16
- moderation_api-1.41.0/src/moderation_api/types/auth_retrieve_response.py +0 -13
- moderation_api-1.41.0/src/moderation_api/types/author_create_params.py +0 -66
- moderation_api-1.41.0/src/moderation_api/types/author_create_response.py +0 -132
- moderation_api-1.41.0/src/moderation_api/types/author_delete_response.py +0 -9
- moderation_api-1.41.0/src/moderation_api/types/author_list_params.py +0 -40
- moderation_api-1.41.0/src/moderation_api/types/author_list_response.py +0 -159
- moderation_api-1.41.0/src/moderation_api/types/author_retrieve_response.py +0 -132
- moderation_api-1.41.0/src/moderation_api/types/author_update_params.py +0 -63
- moderation_api-1.41.0/src/moderation_api/types/author_update_response.py +0 -132
- moderation_api-1.41.0/src/moderation_api/types/content_submit_params.py +0 -586
- moderation_api-1.41.0/src/moderation_api/types/content_submit_response.py +0 -476
- moderation_api-1.41.0/src/moderation_api/types/queue/__init__.py +0 -10
- moderation_api-1.41.0/src/moderation_api/types/queue/item_list_params.py +0 -36
- moderation_api-1.41.0/src/moderation_api/types/queue/item_list_response.py +0 -90
- moderation_api-1.41.0/src/moderation_api/types/queue/item_resolve_params.py +0 -15
- moderation_api-1.41.0/src/moderation_api/types/queue/item_resolve_response.py +0 -19
- moderation_api-1.41.0/src/moderation_api/types/queue/item_unresolve_params.py +0 -15
- moderation_api-1.41.0/src/moderation_api/types/queue/item_unresolve_response.py +0 -17
- moderation_api-1.41.0/src/moderation_api/types/queue_get_stats_params.py +0 -14
- moderation_api-1.41.0/src/moderation_api/types/queue_get_stats_response.py +0 -110
- moderation_api-1.41.0/src/moderation_api/types/queue_retrieve_response.py +0 -112
- moderation_api-1.41.0/src/moderation_api/types/webhook_create_params.py +0 -46
- moderation_api-1.41.0/src/moderation_api/types/webhook_create_response.py +0 -55
- moderation_api-1.41.0/src/moderation_api/types/webhook_delete_response.py +0 -13
- moderation_api-1.41.0/src/moderation_api/types/webhook_list_response.py +0 -58
- moderation_api-1.41.0/src/moderation_api/types/webhook_retrieve_response.py +0 -55
- moderation_api-1.41.0/src/moderation_api/types/webhook_secret_retrieve_response.py +0 -14
- moderation_api-1.41.0/src/moderation_api/types/webhook_update_params.py +0 -44
- moderation_api-1.41.0/src/moderation_api/types/webhook_update_response.py +0 -55
- moderation_api-1.41.0/src/moderation_api/types/wordlist/__init__.py +0 -8
- moderation_api-1.41.0/src/moderation_api/types/wordlist/word_add_params.py +0 -14
- moderation_api-1.41.0/src/moderation_api/types/wordlist/word_add_response.py +0 -20
- moderation_api-1.41.0/src/moderation_api/types/wordlist/word_remove_params.py +0 -14
- moderation_api-1.41.0/src/moderation_api/types/wordlist/word_remove_response.py +0 -20
- moderation_api-1.41.0/src/moderation_api/types/wordlist_get_embedding_status_response.py +0 -20
- moderation_api-1.41.0/src/moderation_api/types/wordlist_list_response.py +0 -30
- moderation_api-1.41.0/src/moderation_api/types/wordlist_retrieve_response.py +0 -32
- moderation_api-1.41.0/src/moderation_api/types/wordlist_update_params.py +0 -29
- moderation_api-1.41.0/src/moderation_api/types/wordlist_update_response.py +0 -32
- moderation_api-1.41.0/tests/__init__.py +0 -1
- moderation_api-1.41.0/tests/api_resources/__init__.py +0 -1
- moderation_api-1.41.0/tests/api_resources/actions/__init__.py +0 -1
- moderation_api-1.41.0/tests/api_resources/actions/test_execute.py +0 -245
- moderation_api-1.41.0/tests/api_resources/queue/__init__.py +0 -1
- moderation_api-1.41.0/tests/api_resources/queue/test_items.py +0 -398
- moderation_api-1.41.0/tests/api_resources/test_account.py +0 -80
- moderation_api-1.41.0/tests/api_resources/test_actions.py +0 -496
- moderation_api-1.41.0/tests/api_resources/test_auth.py +0 -154
- moderation_api-1.41.0/tests/api_resources/test_authors.py +0 -522
- moderation_api-1.41.0/tests/api_resources/test_content.py +0 -242
- moderation_api-1.41.0/tests/api_resources/test_queue.py +0 -210
- moderation_api-1.41.0/tests/api_resources/test_webhook_secret.py +0 -80
- moderation_api-1.41.0/tests/api_resources/test_webhooks.py +0 -464
- moderation_api-1.41.0/tests/api_resources/test_wordlist.py +0 -363
- moderation_api-1.41.0/tests/api_resources/wordlist/__init__.py +0 -1
- moderation_api-1.41.0/tests/api_resources/wordlist/test_words.py +0 -208
- moderation_api-1.41.0/tests/conftest.py +0 -84
- moderation_api-1.41.0/tests/sample_file.txt +0 -1
- moderation_api-1.41.0/tests/test_client.py +0 -2042
- moderation_api-1.41.0/tests/test_extract_files.py +0 -91
- moderation_api-1.41.0/tests/test_files.py +0 -148
- moderation_api-1.41.0/tests/test_models.py +0 -1017
- moderation_api-1.41.0/tests/test_qs.py +0 -78
- moderation_api-1.41.0/tests/test_required_args.py +0 -111
- moderation_api-1.41.0/tests/test_response.py +0 -277
- moderation_api-1.41.0/tests/test_streaming.py +0 -252
- moderation_api-1.41.0/tests/test_transform.py +0 -460
- moderation_api-1.41.0/tests/test_utils/test_datetime_parse.py +0 -110
- moderation_api-1.41.0/tests/test_utils/test_json.py +0 -126
- moderation_api-1.41.0/tests/test_utils/test_path.py +0 -89
- moderation_api-1.41.0/tests/test_utils/test_proxy.py +0 -34
- moderation_api-1.41.0/tests/test_utils/test_typing.py +0 -73
- moderation_api-1.41.0/tests/utils.py +0 -167
- moderation_api-1.41.0/uv.lock +0 -1829
- {moderation_api-1.41.0 → moderation_api-2.0.0}/LICENSE +0 -0
|
@@ -0,0 +1,805 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: moderation_api
|
|
3
|
+
Version: 2.0.0
|
|
4
|
+
Summary: The official Python library for the Moderation API
|
|
5
|
+
Author: Moderation API
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Project-URL: repository, https://github.com/moderation-api/sdk-python
|
|
8
|
+
Requires-Python: >=3.10
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Requires-Dist: httpcore>=1.0.9
|
|
12
|
+
Requires-Dist: httpx>=0.28.1
|
|
13
|
+
Requires-Dist: jsonpath-python>=1.0.6
|
|
14
|
+
Requires-Dist: pydantic>=2.11.2
|
|
15
|
+
Dynamic: license-file
|
|
16
|
+
|
|
17
|
+
<!-- Start Custom [intro] -->
|
|
18
|
+
# Moderation API Python SDK
|
|
19
|
+
|
|
20
|
+
[](https://pypi.org/project/moderation_api/)
|
|
21
|
+
|
|
22
|
+
The official Python library for [Moderation API](https://moderationapi.com). Use it to moderate text, images, video and audio, manage authors, review queues, actions and wordlists, and verify webhooks. It supports both synchronous and `asyncio` code.
|
|
23
|
+
|
|
24
|
+
- Get an API key in the [dashboard](https://dash.moderationapi.com).
|
|
25
|
+
- Read the [documentation](https://docs.moderationapi.com) and the [API reference](https://docs.moderationapi.com/api-reference/introduction).
|
|
26
|
+
<!-- End Custom [intro] -->
|
|
27
|
+
|
|
28
|
+
<!-- Start Summary [summary] -->
|
|
29
|
+
## Summary
|
|
30
|
+
|
|
31
|
+
Moderation API: Moderate text, images, video and audio in real time, manage authors, review queues and actions, and receive webhooks.
|
|
32
|
+
|
|
33
|
+
More information about the API can be found at https://docs.moderationapi.com
|
|
34
|
+
<!-- End Summary [summary] -->
|
|
35
|
+
|
|
36
|
+
<!-- Start Table of Contents [toc] -->
|
|
37
|
+
## Table of Contents
|
|
38
|
+
<!-- $toc-max-depth=2 -->
|
|
39
|
+
* [Moderation API Python SDK](https://github.com/moderation-api/sdk-python/blob/master/#moderation-api-python-sdk)
|
|
40
|
+
* [SDK Installation](https://github.com/moderation-api/sdk-python/blob/master/#sdk-installation)
|
|
41
|
+
* [IDE Support](https://github.com/moderation-api/sdk-python/blob/master/#ide-support)
|
|
42
|
+
* [SDK Example Usage](https://github.com/moderation-api/sdk-python/blob/master/#sdk-example-usage)
|
|
43
|
+
* [Moderating content](https://github.com/moderation-api/sdk-python/blob/master/#moderating-content)
|
|
44
|
+
* [Verifying webhooks](https://github.com/moderation-api/sdk-python/blob/master/#verifying-webhooks)
|
|
45
|
+
* [Authentication](https://github.com/moderation-api/sdk-python/blob/master/#authentication)
|
|
46
|
+
* [Available Resources and Operations](https://github.com/moderation-api/sdk-python/blob/master/#available-resources-and-operations)
|
|
47
|
+
* [Pagination](https://github.com/moderation-api/sdk-python/blob/master/#pagination)
|
|
48
|
+
* [Retries](https://github.com/moderation-api/sdk-python/blob/master/#retries)
|
|
49
|
+
* [Error Handling](https://github.com/moderation-api/sdk-python/blob/master/#error-handling)
|
|
50
|
+
* [Server Selection](https://github.com/moderation-api/sdk-python/blob/master/#server-selection)
|
|
51
|
+
* [Custom HTTP Client](https://github.com/moderation-api/sdk-python/blob/master/#custom-http-client)
|
|
52
|
+
* [Resource Management](https://github.com/moderation-api/sdk-python/blob/master/#resource-management)
|
|
53
|
+
* [Debugging](https://github.com/moderation-api/sdk-python/blob/master/#debugging)
|
|
54
|
+
* [Timeouts](https://github.com/moderation-api/sdk-python/blob/master/#timeouts)
|
|
55
|
+
* [Requirements](https://github.com/moderation-api/sdk-python/blob/master/#requirements)
|
|
56
|
+
* [Support](https://github.com/moderation-api/sdk-python/blob/master/#support)
|
|
57
|
+
* [Development](https://github.com/moderation-api/sdk-python/blob/master/#development)
|
|
58
|
+
* [Maturity](https://github.com/moderation-api/sdk-python/blob/master/#maturity)
|
|
59
|
+
* [Contributions](https://github.com/moderation-api/sdk-python/blob/master/#contributions)
|
|
60
|
+
|
|
61
|
+
<!-- End Table of Contents [toc] -->
|
|
62
|
+
|
|
63
|
+
<!-- Start SDK Installation [installation] -->
|
|
64
|
+
## SDK Installation
|
|
65
|
+
|
|
66
|
+
> [!NOTE]
|
|
67
|
+
> **Python version upgrade policy**
|
|
68
|
+
>
|
|
69
|
+
> Once a Python version reaches its [official end of life date](https://devguide.python.org/versions/), a 3-month grace period is provided for users to upgrade. Following this grace period, the minimum python version supported in the SDK will be updated.
|
|
70
|
+
|
|
71
|
+
The SDK can be installed with *uv*, *pip*, or *poetry* package managers.
|
|
72
|
+
|
|
73
|
+
### uv
|
|
74
|
+
|
|
75
|
+
*uv* is a fast Python package installer and resolver, designed as a drop-in replacement for pip and pip-tools. It's recommended for its speed and modern Python tooling capabilities.
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
uv add moderation_api
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### PIP
|
|
82
|
+
|
|
83
|
+
*PIP* is the default package installer for Python, enabling easy installation and management of packages from PyPI via the command line.
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
pip install moderation_api
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Poetry
|
|
90
|
+
|
|
91
|
+
*Poetry* is a modern tool that simplifies dependency management and package publishing by using a single `pyproject.toml` file to handle project metadata and dependencies.
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
poetry add moderation_api
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Shell and script usage with `uv`
|
|
98
|
+
|
|
99
|
+
You can use this SDK in a Python shell with [uv](https://docs.astral.sh/uv/) and the `uvx` command that comes with it like so:
|
|
100
|
+
|
|
101
|
+
```shell
|
|
102
|
+
uvx --from moderation_api python
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
It's also possible to write a standalone Python script without needing to set up a whole project like so:
|
|
106
|
+
|
|
107
|
+
```python
|
|
108
|
+
#!/usr/bin/env -S uv run --script
|
|
109
|
+
# /// script
|
|
110
|
+
# requires-python = ">=3.10"
|
|
111
|
+
# dependencies = [
|
|
112
|
+
# "moderation_api",
|
|
113
|
+
# ]
|
|
114
|
+
# ///
|
|
115
|
+
|
|
116
|
+
from moderation_api import ModerationAPI
|
|
117
|
+
|
|
118
|
+
sdk = ModerationAPI(
|
|
119
|
+
# SDK arguments
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
# Rest of script here...
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Once that is saved to a file, you can run it with `uv run script.py` where
|
|
126
|
+
`script.py` can be replaced with the actual file name.
|
|
127
|
+
<!-- End SDK Installation [installation] -->
|
|
128
|
+
|
|
129
|
+
<!-- Start IDE Support [idesupport] -->
|
|
130
|
+
## IDE Support
|
|
131
|
+
|
|
132
|
+
### PyCharm
|
|
133
|
+
|
|
134
|
+
Generally, the SDK will work well with most IDEs out of the box. However, when using PyCharm, you can enjoy much better integration with Pydantic by installing an additional plugin.
|
|
135
|
+
|
|
136
|
+
- [PyCharm Pydantic Plugin](https://docs.pydantic.dev/latest/integrations/pycharm/)
|
|
137
|
+
<!-- End IDE Support [idesupport] -->
|
|
138
|
+
|
|
139
|
+
<!-- Start SDK Example Usage [usage] -->
|
|
140
|
+
## SDK Example Usage
|
|
141
|
+
|
|
142
|
+
### Example
|
|
143
|
+
|
|
144
|
+
```python
|
|
145
|
+
# Synchronous Example
|
|
146
|
+
from moderation_api import ModerationAPI
|
|
147
|
+
import os
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
with ModerationAPI(
|
|
151
|
+
secret_key=os.getenv("MODAPI_SECRET_KEY", ""),
|
|
152
|
+
) as ma_client:
|
|
153
|
+
|
|
154
|
+
res = ma_client.content.submit(content={
|
|
155
|
+
"type": "text",
|
|
156
|
+
"text": "Hey, check out my profile for a deal!",
|
|
157
|
+
}, content_id="message-48213", author_id="user-1092", conversation_id="room-general", metadata={
|
|
158
|
+
"platform": "ios",
|
|
159
|
+
})
|
|
160
|
+
|
|
161
|
+
# Handle response
|
|
162
|
+
print(res)
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
</br>
|
|
166
|
+
|
|
167
|
+
The same SDK client can also be used to make asynchronous requests by importing asyncio.
|
|
168
|
+
|
|
169
|
+
```python
|
|
170
|
+
# Asynchronous Example
|
|
171
|
+
import asyncio
|
|
172
|
+
from moderation_api import ModerationAPI
|
|
173
|
+
import os
|
|
174
|
+
|
|
175
|
+
async def main():
|
|
176
|
+
|
|
177
|
+
async with ModerationAPI(
|
|
178
|
+
secret_key=os.getenv("MODAPI_SECRET_KEY", ""),
|
|
179
|
+
) as ma_client:
|
|
180
|
+
|
|
181
|
+
res = await ma_client.content.submit_async(content={
|
|
182
|
+
"type": "text",
|
|
183
|
+
"text": "Hey, check out my profile for a deal!",
|
|
184
|
+
}, content_id="message-48213", author_id="user-1092", conversation_id="room-general", metadata={
|
|
185
|
+
"platform": "ios",
|
|
186
|
+
})
|
|
187
|
+
|
|
188
|
+
# Handle response
|
|
189
|
+
print(res)
|
|
190
|
+
|
|
191
|
+
asyncio.run(main())
|
|
192
|
+
```
|
|
193
|
+
<!-- End SDK Example Usage [usage] -->
|
|
194
|
+
<!-- Start Custom [guide] -->
|
|
195
|
+
## Moderating content
|
|
196
|
+
|
|
197
|
+
Use `content.submit` to moderate text, images, video, audio, or objects with several fields. All parameters except `content` are optional.
|
|
198
|
+
|
|
199
|
+
The client reads your API key from the `MODAPI_SECRET_KEY` environment variable. To set it in code, pass `secret_key`.
|
|
200
|
+
|
|
201
|
+
```python
|
|
202
|
+
from moderation_api import ModerationAPI
|
|
203
|
+
|
|
204
|
+
with ModerationAPI() as client: # reads MODAPI_SECRET_KEY
|
|
205
|
+
# Text
|
|
206
|
+
client.content.submit(
|
|
207
|
+
content={"type": "text", "text": "Your text here"},
|
|
208
|
+
content_id="message-123", # your ID for the content
|
|
209
|
+
author_id="user-123", # your ID for the user who wrote it
|
|
210
|
+
conversation_id="room-123", # groups related content
|
|
211
|
+
metadata={"platform": "ios"},
|
|
212
|
+
)
|
|
213
|
+
|
|
214
|
+
# Image, video and audio: send a URL
|
|
215
|
+
client.content.submit(content={"type": "image", "url": "https://example.com/image.jpg"})
|
|
216
|
+
client.content.submit(content={"type": "video", "url": "https://example.com/video.mp4"})
|
|
217
|
+
client.content.submit(content={"type": "audio", "url": "https://example.com/audio.mp3"})
|
|
218
|
+
|
|
219
|
+
# An object with several fields, moderated together
|
|
220
|
+
client.content.submit(
|
|
221
|
+
content={
|
|
222
|
+
"type": "object",
|
|
223
|
+
"data": {
|
|
224
|
+
"title": {"type": "text", "text": "Post title"},
|
|
225
|
+
"body": {"type": "text", "text": "Post content"},
|
|
226
|
+
"thumbnail": {"type": "image", "url": "https://example.com/thumb.jpg"},
|
|
227
|
+
},
|
|
228
|
+
},
|
|
229
|
+
)
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
Every method has an `async` version with the suffix `_async`, for example `await client.content.submit_async(...)`.
|
|
233
|
+
|
|
234
|
+
### Using the result
|
|
235
|
+
|
|
236
|
+
`evaluation.flagged` tells you if any policy flagged the content. `recommendation.action` is the action the API recommends after it applies your thresholds and rules: `allow`, `review` or `reject`.
|
|
237
|
+
|
|
238
|
+
```python
|
|
239
|
+
from moderation_api import ModerationAPI
|
|
240
|
+
|
|
241
|
+
with ModerationAPI() as client:
|
|
242
|
+
result = client.content.submit(content={"type": "text", "text": "Some content"})
|
|
243
|
+
|
|
244
|
+
if result.evaluation.flagged:
|
|
245
|
+
print("A policy flagged the content")
|
|
246
|
+
|
|
247
|
+
if result.recommendation.action == "reject":
|
|
248
|
+
pass # Block the content
|
|
249
|
+
elif result.recommendation.action == "review":
|
|
250
|
+
pass # Publish or hold it, and send it to a review queue
|
|
251
|
+
else:
|
|
252
|
+
pass # Publish the content
|
|
253
|
+
|
|
254
|
+
for policy in result.policies:
|
|
255
|
+
print(f"{policy.id}: flagged={policy.flagged}")
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
## Verifying webhooks
|
|
259
|
+
|
|
260
|
+
Moderation API signs every webhook delivery with your project's webhook signing secret. The signature is in the `modapi-signature` header.
|
|
261
|
+
|
|
262
|
+
### Webhook signing secret
|
|
263
|
+
|
|
264
|
+
Find the secret on the [API keys page in the dashboard](https://dash.moderationapi.com/project/latest/configure/api-keys), or get it with `client.webhook_secret.retrieve()`. Store it in the `MODAPI_WEBHOOK_SECRET` environment variable. It is not your API key. Get it once, for example in a setup script, and do not call `retrieve` for each delivery, so verification does not depend on a call to the API. Keep it as secret as your API key: anyone with it can sign webhooks.
|
|
265
|
+
|
|
266
|
+
### Verify a delivery
|
|
267
|
+
|
|
268
|
+
`construct_event` checks the signature against the raw body and returns the event as a dictionary. It reads the secret from `MODAPI_WEBHOOK_SECRET`; to set it in code, pass `secret`. It raises `WebhookSignatureError` if the signature does not match.
|
|
269
|
+
|
|
270
|
+
```python
|
|
271
|
+
from flask import Flask, request
|
|
272
|
+
from moderation_api.webhook_signature import WebhookSignatureError, construct_event
|
|
273
|
+
|
|
274
|
+
app = Flask(__name__)
|
|
275
|
+
|
|
276
|
+
@app.post("/webhooks/moderation")
|
|
277
|
+
def moderation_webhook():
|
|
278
|
+
try:
|
|
279
|
+
event = construct_event(
|
|
280
|
+
request.get_data(), # the raw body, not parsed JSON
|
|
281
|
+
request.headers.get("modapi-signature", ""),
|
|
282
|
+
)
|
|
283
|
+
except WebhookSignatureError:
|
|
284
|
+
return "Invalid signature", 400
|
|
285
|
+
|
|
286
|
+
print(event["type"])
|
|
287
|
+
return "", 200
|
|
288
|
+
```
|
|
289
|
+
<!-- End Custom [guide] -->
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
<!-- Start Authentication [security] -->
|
|
293
|
+
## Authentication
|
|
294
|
+
|
|
295
|
+
### Per-Client Security Schemes
|
|
296
|
+
|
|
297
|
+
This SDK supports the following security scheme globally:
|
|
298
|
+
|
|
299
|
+
| Name | Type | Scheme | Environment Variable |
|
|
300
|
+
| ------------ | ---- | ----------- | -------------------- |
|
|
301
|
+
| `secret_key` | http | HTTP Bearer | `MODAPI_SECRET_KEY` |
|
|
302
|
+
|
|
303
|
+
To authenticate with the API the `secret_key` parameter must be set when initializing the SDK client instance. For example:
|
|
304
|
+
```python
|
|
305
|
+
from moderation_api import ModerationAPI
|
|
306
|
+
import os
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
with ModerationAPI(
|
|
310
|
+
secret_key=os.getenv("MODAPI_SECRET_KEY", ""),
|
|
311
|
+
) as ma_client:
|
|
312
|
+
|
|
313
|
+
res = ma_client.authors.list(request={})
|
|
314
|
+
|
|
315
|
+
while res is not None:
|
|
316
|
+
# Handle items
|
|
317
|
+
|
|
318
|
+
res = res.next()
|
|
319
|
+
|
|
320
|
+
```
|
|
321
|
+
<!-- End Authentication [security] -->
|
|
322
|
+
<!-- Start Custom [auth] -->
|
|
323
|
+
### Project and organization keys
|
|
324
|
+
|
|
325
|
+
Moderation API has two kinds of API keys:
|
|
326
|
+
|
|
327
|
+
- A **project key** works with one project: content, authors, review queues, actions, wordlists, webhooks and the account. Most integrations need only this key.
|
|
328
|
+
- An **organization key** works with the [management API](https://docs.moderationapi.com/api-reference/management-api): projects and channels. The management API is available on Enterprise plans.
|
|
329
|
+
|
|
330
|
+
Each key works only with its own endpoints. With the wrong key the API returns `403` with the code `project_key_required` or `organization_key_required`. If you use both, create one client for each key:
|
|
331
|
+
|
|
332
|
+
```python
|
|
333
|
+
import os
|
|
334
|
+
from moderation_api import ModerationAPI
|
|
335
|
+
|
|
336
|
+
# Project key, from MODAPI_SECRET_KEY
|
|
337
|
+
client = ModerationAPI()
|
|
338
|
+
|
|
339
|
+
# Organization key
|
|
340
|
+
management = ModerationAPI(secret_key=os.environ["MODAPI_ORGANIZATION_KEY"])
|
|
341
|
+
|
|
342
|
+
res = management.projects.list()
|
|
343
|
+
while res is not None:
|
|
344
|
+
for project in res.result.data:
|
|
345
|
+
print(project.id, project.name)
|
|
346
|
+
res = res.next()
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
Create the organization client only where you manage projects and channels, for example in a setup script, and keep the organization key out of the code that moderates content.
|
|
350
|
+
<!-- End Custom [auth] -->
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
<!-- Start Available Resources and Operations [operations] -->
|
|
354
|
+
## Available Resources and Operations
|
|
355
|
+
|
|
356
|
+
<details open>
|
|
357
|
+
<summary>Available methods</summary>
|
|
358
|
+
|
|
359
|
+
### [Account](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/account/README.md)
|
|
360
|
+
|
|
361
|
+
* [retrieve](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/account/README.md#retrieve) - Get account details
|
|
362
|
+
|
|
363
|
+
### [Actions](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/actions/README.md)
|
|
364
|
+
|
|
365
|
+
* [list](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/actions/README.md#list) - List moderation actions
|
|
366
|
+
* [create](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/actions/README.md#create) - Create an action
|
|
367
|
+
* [retrieve](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/actions/README.md#retrieve) - Get an action
|
|
368
|
+
* [update](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/actions/README.md#update) - Update an action
|
|
369
|
+
* [delete](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/actions/README.md#delete) - Delete an action
|
|
370
|
+
* [execute](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/actions/README.md#execute) - Execute moderation action
|
|
371
|
+
|
|
372
|
+
### [Authors](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/authors/README.md)
|
|
373
|
+
|
|
374
|
+
* [list](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/authors/README.md#list) - List authors
|
|
375
|
+
* [create](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/authors/README.md#create) - Create a new author
|
|
376
|
+
* [retrieve](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/authors/README.md#retrieve) - Get author details
|
|
377
|
+
* [update](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/authors/README.md#update) - Update author details
|
|
378
|
+
* [delete](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/authors/README.md#delete) - Delete an author
|
|
379
|
+
|
|
380
|
+
### [Channels](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/channels/README.md)
|
|
381
|
+
|
|
382
|
+
* [list](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/channels/README.md#list) - List channels
|
|
383
|
+
* [create](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/channels/README.md#create) - Create a channel
|
|
384
|
+
* [retrieve](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/channels/README.md#retrieve) - Get a channel
|
|
385
|
+
* [update](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/channels/README.md#update) - Update a channel
|
|
386
|
+
* [delete](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/channels/README.md#delete) - Delete a channel
|
|
387
|
+
* [duplicate](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/channels/README.md#duplicate) - Duplicate a channel
|
|
388
|
+
|
|
389
|
+
### [Content](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/contentsdk/README.md)
|
|
390
|
+
|
|
391
|
+
* [submit](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/contentsdk/README.md#submit)
|
|
392
|
+
|
|
393
|
+
### [Projects](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/projects/README.md)
|
|
394
|
+
|
|
395
|
+
* [list](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/projects/README.md#list) - List projects
|
|
396
|
+
* [create](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/projects/README.md#create) - Create a project
|
|
397
|
+
* [retrieve](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/projects/README.md#retrieve) - Get a project
|
|
398
|
+
* [update](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/projects/README.md#update) - Update a project
|
|
399
|
+
* [delete](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/projects/README.md#delete) - Delete a project
|
|
400
|
+
* [duplicate](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/projects/README.md#duplicate) - Duplicate a project
|
|
401
|
+
|
|
402
|
+
### [Queue](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/queuesdk/README.md)
|
|
403
|
+
|
|
404
|
+
* [retrieve](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/queuesdk/README.md#retrieve) - Get a queue
|
|
405
|
+
* [get_stats](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/queuesdk/README.md#get_stats) - Get queue statistics
|
|
406
|
+
|
|
407
|
+
#### [Queue.Items](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/items/README.md)
|
|
408
|
+
|
|
409
|
+
* [list](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/items/README.md#list) - Get queue items
|
|
410
|
+
* [resolve](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/items/README.md#resolve) - Resolve a queue item
|
|
411
|
+
* [unresolve](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/items/README.md#unresolve) - Unresolve a queue item
|
|
412
|
+
|
|
413
|
+
### [Webhooks](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/webhooks/README.md)
|
|
414
|
+
|
|
415
|
+
* [list](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/webhooks/README.md#list) - List webhooks
|
|
416
|
+
* [create](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/webhooks/README.md#create) - Create a webhook
|
|
417
|
+
* [retrieve](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/webhooks/README.md#retrieve) - Get a webhook
|
|
418
|
+
* [update](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/webhooks/README.md#update) - Update a webhook
|
|
419
|
+
* [delete](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/webhooks/README.md#delete) - Delete a webhook
|
|
420
|
+
|
|
421
|
+
### [WebhookSecret](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/webhooksecret/README.md)
|
|
422
|
+
|
|
423
|
+
* [retrieve](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/webhooksecret/README.md#retrieve) - Get the webhook signing secret
|
|
424
|
+
|
|
425
|
+
### [Wordlist](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/wordlist/README.md)
|
|
426
|
+
|
|
427
|
+
* [list](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/wordlist/README.md#list) - List wordlists
|
|
428
|
+
* [retrieve](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/wordlist/README.md#retrieve) - Get wordlist
|
|
429
|
+
* [update](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/wordlist/README.md#update) - Update wordlist
|
|
430
|
+
* [get_embedding_status](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/wordlist/README.md#get_embedding_status) - Get embedding status
|
|
431
|
+
|
|
432
|
+
#### [Wordlist.Words](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/words/README.md)
|
|
433
|
+
|
|
434
|
+
* [add](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/words/README.md#add) - Add words to wordlist
|
|
435
|
+
* [remove](https://github.com/moderation-api/sdk-python/blob/master/docs/sdks/words/README.md#remove) - Remove words from wordlist
|
|
436
|
+
|
|
437
|
+
</details>
|
|
438
|
+
<!-- End Available Resources and Operations [operations] -->
|
|
439
|
+
|
|
440
|
+
<!-- Start Pagination [pagination] -->
|
|
441
|
+
## Pagination
|
|
442
|
+
|
|
443
|
+
Some of the endpoints in this SDK support pagination. To use pagination, you make your SDK calls as usual, but the
|
|
444
|
+
returned response object will have a `Next` method that can be called to pull down the next group of results. If the
|
|
445
|
+
return value of `Next` is `None`, then there are no more pages to be fetched.
|
|
446
|
+
|
|
447
|
+
Here's an example of one such pagination call:
|
|
448
|
+
```python
|
|
449
|
+
from moderation_api import ModerationAPI
|
|
450
|
+
import os
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
with ModerationAPI(
|
|
454
|
+
secret_key=os.getenv("MODAPI_SECRET_KEY", ""),
|
|
455
|
+
) as ma_client:
|
|
456
|
+
|
|
457
|
+
res = ma_client.authors.list(request={})
|
|
458
|
+
|
|
459
|
+
while res is not None:
|
|
460
|
+
# Handle items
|
|
461
|
+
|
|
462
|
+
res = res.next()
|
|
463
|
+
|
|
464
|
+
```
|
|
465
|
+
<!-- End Pagination [pagination] -->
|
|
466
|
+
|
|
467
|
+
<!-- Start Retries [retries] -->
|
|
468
|
+
## Retries
|
|
469
|
+
|
|
470
|
+
Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
|
|
471
|
+
|
|
472
|
+
To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
|
|
473
|
+
```python
|
|
474
|
+
from moderation_api import ModerationAPI
|
|
475
|
+
from moderation_api.utils import BackoffStrategy, RetryConfig
|
|
476
|
+
import os
|
|
477
|
+
|
|
478
|
+
|
|
479
|
+
with ModerationAPI(
|
|
480
|
+
secret_key=os.getenv("MODAPI_SECRET_KEY", ""),
|
|
481
|
+
) as ma_client:
|
|
482
|
+
|
|
483
|
+
res = ma_client.authors.list(request={},
|
|
484
|
+
RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
|
|
485
|
+
|
|
486
|
+
while res is not None:
|
|
487
|
+
# Handle items
|
|
488
|
+
|
|
489
|
+
res = res.next()
|
|
490
|
+
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
If you'd like to override the default retry strategy for all operations that support retries, you can use the `retry_config` optional parameter when initializing the SDK:
|
|
494
|
+
```python
|
|
495
|
+
from moderation_api import ModerationAPI
|
|
496
|
+
from moderation_api.utils import BackoffStrategy, RetryConfig
|
|
497
|
+
import os
|
|
498
|
+
|
|
499
|
+
|
|
500
|
+
with ModerationAPI(
|
|
501
|
+
retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
|
|
502
|
+
secret_key=os.getenv("MODAPI_SECRET_KEY", ""),
|
|
503
|
+
) as ma_client:
|
|
504
|
+
|
|
505
|
+
res = ma_client.authors.list(request={})
|
|
506
|
+
|
|
507
|
+
while res is not None:
|
|
508
|
+
# Handle items
|
|
509
|
+
|
|
510
|
+
res = res.next()
|
|
511
|
+
|
|
512
|
+
```
|
|
513
|
+
<!-- End Retries [retries] -->
|
|
514
|
+
|
|
515
|
+
<!-- Start Error Handling [errors] -->
|
|
516
|
+
## Error Handling
|
|
517
|
+
|
|
518
|
+
[`ModerationAPIError`](https://github.com/moderation-api/sdk-python/blob/master/./src/moderation_api/errors/moderationapierror.py) is the base class for all HTTP error responses. It has the following properties:
|
|
519
|
+
|
|
520
|
+
| Property | Type | Description |
|
|
521
|
+
| ------------------ | ---------------- | --------------------------------------------------------------------------------------- |
|
|
522
|
+
| `err.message` | `str` | Error message |
|
|
523
|
+
| `err.status_code` | `int` | HTTP response status code eg `404` |
|
|
524
|
+
| `err.headers` | `httpx.Headers` | HTTP response headers |
|
|
525
|
+
| `err.body` | `str` | HTTP body. Can be empty string if no body is returned. |
|
|
526
|
+
| `err.raw_response` | `httpx.Response` | Raw HTTP response |
|
|
527
|
+
| `err.data` | | Optional. Some errors may contain structured data. [See Error Classes](https://github.com/moderation-api/sdk-python/blob/master/#error-classes). |
|
|
528
|
+
|
|
529
|
+
### Example
|
|
530
|
+
```python
|
|
531
|
+
from moderation_api import ModerationAPI, errors
|
|
532
|
+
import os
|
|
533
|
+
from typing import Literal
|
|
534
|
+
|
|
535
|
+
|
|
536
|
+
with ModerationAPI(
|
|
537
|
+
secret_key=os.getenv("MODAPI_SECRET_KEY", ""),
|
|
538
|
+
) as ma_client:
|
|
539
|
+
res = None
|
|
540
|
+
try:
|
|
541
|
+
|
|
542
|
+
res = ma_client.authors.list(request={})
|
|
543
|
+
|
|
544
|
+
while res is not None:
|
|
545
|
+
# Handle items
|
|
546
|
+
|
|
547
|
+
res = res.next()
|
|
548
|
+
|
|
549
|
+
|
|
550
|
+
except errors.ModerationAPIError as e:
|
|
551
|
+
# The base class for HTTP error responses
|
|
552
|
+
print(e.message)
|
|
553
|
+
print(e.status_code)
|
|
554
|
+
print(e.body)
|
|
555
|
+
print(e.headers)
|
|
556
|
+
print(e.raw_response)
|
|
557
|
+
|
|
558
|
+
# Depending on the method different errors may be thrown
|
|
559
|
+
if isinstance(e, errors.BadRequestError):
|
|
560
|
+
print(e.data.type) # Literal["invalid_request_error"]
|
|
561
|
+
print(e.data.code) # models.BadRequestErrorCode
|
|
562
|
+
print(e.data.message) # str
|
|
563
|
+
print(e.data.issues) # Optional[List[models.ErrorIssue]]
|
|
564
|
+
print(e.data.request_id) # str
|
|
565
|
+
```
|
|
566
|
+
|
|
567
|
+
### Error Classes
|
|
568
|
+
**Primary errors:**
|
|
569
|
+
* [`ModerationAPIError`](https://github.com/moderation-api/sdk-python/blob/master/./src/moderation_api/errors/moderationapierror.py): The base class for HTTP error responses.
|
|
570
|
+
* [`AuthenticationError`](https://github.com/moderation-api/sdk-python/blob/master/./src/moderation_api/errors/authenticationerror.py): The API key is missing, invalid or revoked. Status code `401`.
|
|
571
|
+
* [`RateLimitError`](https://github.com/moderation-api/sdk-python/blob/master/./src/moderation_api/errors/ratelimiterror.py): Too many requests. Retry after the number of seconds in the `Retry-After` header. Status code `429`.
|
|
572
|
+
|
|
573
|
+
<details><summary>Less common errors (10)</summary>
|
|
574
|
+
|
|
575
|
+
<br />
|
|
576
|
+
|
|
577
|
+
**Network errors:**
|
|
578
|
+
* [`httpx.RequestError`](https://www.python-httpx.org/exceptions/#httpx.RequestError): Base class for request errors.
|
|
579
|
+
* [`httpx.ConnectError`](https://www.python-httpx.org/exceptions/#httpx.ConnectError): HTTP client was unable to make a request to a server.
|
|
580
|
+
* [`httpx.TimeoutException`](https://www.python-httpx.org/exceptions/#httpx.TimeoutException): HTTP request timed out.
|
|
581
|
+
|
|
582
|
+
|
|
583
|
+
**Inherit from [`ModerationAPIError`](https://github.com/moderation-api/sdk-python/blob/master/./src/moderation_api/errors/moderationapierror.py)**:
|
|
584
|
+
* [`BadRequestError`](https://github.com/moderation-api/sdk-python/blob/master/./src/moderation_api/errors/badrequesterror.py): The request is malformed or a parameter is invalid. Status code `400`. Applicable to 32 of 42 methods.*
|
|
585
|
+
* [`NotFoundError`](https://github.com/moderation-api/sdk-python/blob/master/./src/moderation_api/errors/notfounderror.py): The resource does not exist or the key cannot see it. Status code `404`. Applicable to 31 of 42 methods.*
|
|
586
|
+
* [`PermissionDeniedError`](https://github.com/moderation-api/sdk-python/blob/master/./src/moderation_api/errors/permissiondeniederror.py): The API key cannot do this, or the plan limit for this resource is reached. Status code `403`. Applicable to 27 of 42 methods.*
|
|
587
|
+
* [`InternalServerError`](https://github.com/moderation-api/sdk-python/blob/master/./src/moderation_api/errors/internalservererror.py): Something went wrong on our side. Retry with backoff. Status code `500`. Applicable to 15 of 42 methods.*
|
|
588
|
+
* [`ConflictError`](https://github.com/moderation-api/sdk-python/blob/master/./src/moderation_api/errors/conflicterror.py): The request conflicts with the current state of a resource. Status code `409`. Applicable to 2 of 42 methods.*
|
|
589
|
+
* [`ResponseValidationError`](https://github.com/moderation-api/sdk-python/blob/master/./src/moderation_api/errors/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute.
|
|
590
|
+
|
|
591
|
+
</details>
|
|
592
|
+
|
|
593
|
+
\* Check [the method documentation](https://github.com/moderation-api/sdk-python/blob/master/#available-resources-and-operations) to see if the error is applicable.
|
|
594
|
+
<!-- End Error Handling [errors] -->
|
|
595
|
+
|
|
596
|
+
<!-- Start Server Selection [server] -->
|
|
597
|
+
## Server Selection
|
|
598
|
+
|
|
599
|
+
### Override Server URL Per-Client
|
|
600
|
+
|
|
601
|
+
The default server can be overridden globally by passing a URL to the `server_url: str` optional parameter when initializing the SDK client instance. For example:
|
|
602
|
+
```python
|
|
603
|
+
from moderation_api import ModerationAPI
|
|
604
|
+
import os
|
|
605
|
+
|
|
606
|
+
|
|
607
|
+
with ModerationAPI(
|
|
608
|
+
server_url="https://moderationapi.com/api/v1",
|
|
609
|
+
secret_key=os.getenv("MODAPI_SECRET_KEY", ""),
|
|
610
|
+
) as ma_client:
|
|
611
|
+
|
|
612
|
+
res = ma_client.authors.list(request={})
|
|
613
|
+
|
|
614
|
+
while res is not None:
|
|
615
|
+
# Handle items
|
|
616
|
+
|
|
617
|
+
res = res.next()
|
|
618
|
+
|
|
619
|
+
```
|
|
620
|
+
<!-- End Server Selection [server] -->
|
|
621
|
+
|
|
622
|
+
<!-- Start Custom HTTP Client [http-client] -->
|
|
623
|
+
## Custom HTTP Client
|
|
624
|
+
|
|
625
|
+
The Python SDK makes API calls using the [httpx](https://www.python-httpx.org/) HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with your own HTTP client instance.
|
|
626
|
+
Depending on whether you are using the sync or async version of the SDK, you can pass an instance of `HttpClient` or `AsyncHttpClient` respectively, which are Protocol's ensuring that the client has the necessary methods to make API calls.
|
|
627
|
+
This allows you to wrap the client with your own custom logic, such as adding custom headers, logging, or error handling, or you can just pass an instance of `httpx.Client` or `httpx.AsyncClient` directly.
|
|
628
|
+
|
|
629
|
+
For example, you could specify a header for every request that this sdk makes as follows:
|
|
630
|
+
```python
|
|
631
|
+
from moderation_api import ModerationAPI
|
|
632
|
+
import httpx
|
|
633
|
+
|
|
634
|
+
http_client = httpx.Client(headers={"x-custom-header": "someValue"})
|
|
635
|
+
s = ModerationAPI(client=http_client)
|
|
636
|
+
```
|
|
637
|
+
|
|
638
|
+
or you could wrap the client with your own custom logic:
|
|
639
|
+
```python
|
|
640
|
+
from moderation_api import ModerationAPI
|
|
641
|
+
from moderation_api.httpclient import AsyncHttpClient
|
|
642
|
+
import httpx
|
|
643
|
+
|
|
644
|
+
class CustomClient(AsyncHttpClient):
|
|
645
|
+
client: AsyncHttpClient
|
|
646
|
+
|
|
647
|
+
def __init__(self, client: AsyncHttpClient):
|
|
648
|
+
self.client = client
|
|
649
|
+
|
|
650
|
+
async def send(
|
|
651
|
+
self,
|
|
652
|
+
request: httpx.Request,
|
|
653
|
+
*,
|
|
654
|
+
stream: bool = False,
|
|
655
|
+
auth: Union[
|
|
656
|
+
httpx._types.AuthTypes, httpx._client.UseClientDefault, None
|
|
657
|
+
] = httpx.USE_CLIENT_DEFAULT,
|
|
658
|
+
follow_redirects: Union[
|
|
659
|
+
bool, httpx._client.UseClientDefault
|
|
660
|
+
] = httpx.USE_CLIENT_DEFAULT,
|
|
661
|
+
) -> httpx.Response:
|
|
662
|
+
request.headers["Client-Level-Header"] = "added by client"
|
|
663
|
+
|
|
664
|
+
return await self.client.send(
|
|
665
|
+
request, stream=stream, auth=auth, follow_redirects=follow_redirects
|
|
666
|
+
)
|
|
667
|
+
|
|
668
|
+
def build_request(
|
|
669
|
+
self,
|
|
670
|
+
method: str,
|
|
671
|
+
url: httpx._types.URLTypes,
|
|
672
|
+
*,
|
|
673
|
+
content: Optional[httpx._types.RequestContent] = None,
|
|
674
|
+
data: Optional[httpx._types.RequestData] = None,
|
|
675
|
+
files: Optional[httpx._types.RequestFiles] = None,
|
|
676
|
+
json: Optional[Any] = None,
|
|
677
|
+
params: Optional[httpx._types.QueryParamTypes] = None,
|
|
678
|
+
headers: Optional[httpx._types.HeaderTypes] = None,
|
|
679
|
+
cookies: Optional[httpx._types.CookieTypes] = None,
|
|
680
|
+
timeout: Union[
|
|
681
|
+
httpx._types.TimeoutTypes, httpx._client.UseClientDefault
|
|
682
|
+
] = httpx.USE_CLIENT_DEFAULT,
|
|
683
|
+
extensions: Optional[httpx._types.RequestExtensions] = None,
|
|
684
|
+
) -> httpx.Request:
|
|
685
|
+
return self.client.build_request(
|
|
686
|
+
method,
|
|
687
|
+
url,
|
|
688
|
+
content=content,
|
|
689
|
+
data=data,
|
|
690
|
+
files=files,
|
|
691
|
+
json=json,
|
|
692
|
+
params=params,
|
|
693
|
+
headers=headers,
|
|
694
|
+
cookies=cookies,
|
|
695
|
+
timeout=timeout,
|
|
696
|
+
extensions=extensions,
|
|
697
|
+
)
|
|
698
|
+
|
|
699
|
+
s = ModerationAPI(async_client=CustomClient(httpx.AsyncClient()))
|
|
700
|
+
```
|
|
701
|
+
### httpx2 (Pydantic's httpx fork)
|
|
702
|
+
|
|
703
|
+
[httpx2](https://httpx2.pydantic.dev/) is Pydantic's maintained fork of `httpx`. To run this SDK on httpx2, call `alias_httpx()` at your program's entry point, before importing the SDK, so every `import httpx` — including the ones inside the SDK — resolves to `httpx2`:
|
|
704
|
+
```python
|
|
705
|
+
import httpx2
|
|
706
|
+
|
|
707
|
+
httpx2.alias_httpx()
|
|
708
|
+
|
|
709
|
+
from moderation_api import ModerationAPI
|
|
710
|
+
|
|
711
|
+
s = ModerationAPI()
|
|
712
|
+
```
|
|
713
|
+
|
|
714
|
+
An SDK can also be generated against httpx2 directly, so it depends on the fork instead of `httpx`, by setting `python.httpClientLibrary: httpx2` in `gen.yaml`.
|
|
715
|
+
<!-- End Custom HTTP Client [http-client] -->
|
|
716
|
+
|
|
717
|
+
<!-- Start Resource Management [resource-management] -->
|
|
718
|
+
## Resource Management
|
|
719
|
+
|
|
720
|
+
The `ModerationAPI` class implements the context manager protocol and registers a finalizer function to close the underlying sync and async HTTPX clients it uses under the hood. This will close HTTP connections, release memory and free up other resources held by the SDK. In short-lived Python programs and notebooks that make a few SDK method calls, resource management may not be a concern. However, in longer-lived programs, it is beneficial to create a single SDK instance via a [context manager][context-manager] and reuse it across the application.
|
|
721
|
+
|
|
722
|
+
[context-manager]: https://docs.python.org/3/reference/datamodel.html#context-managers
|
|
723
|
+
|
|
724
|
+
```python
|
|
725
|
+
from moderation_api import ModerationAPI
|
|
726
|
+
import os
|
|
727
|
+
def main():
|
|
728
|
+
|
|
729
|
+
with ModerationAPI(
|
|
730
|
+
secret_key=os.getenv("MODAPI_SECRET_KEY", ""),
|
|
731
|
+
) as ma_client:
|
|
732
|
+
# Rest of application here...
|
|
733
|
+
|
|
734
|
+
|
|
735
|
+
# Or when using async:
|
|
736
|
+
async def amain():
|
|
737
|
+
|
|
738
|
+
async with ModerationAPI(
|
|
739
|
+
secret_key=os.getenv("MODAPI_SECRET_KEY", ""),
|
|
740
|
+
) as ma_client:
|
|
741
|
+
# Rest of application here...
|
|
742
|
+
```
|
|
743
|
+
<!-- End Resource Management [resource-management] -->
|
|
744
|
+
|
|
745
|
+
<!-- Start Debugging [debug] -->
|
|
746
|
+
## Debugging
|
|
747
|
+
|
|
748
|
+
You can setup your SDK to emit debug logs for SDK requests and responses.
|
|
749
|
+
|
|
750
|
+
You can pass your own logger class directly into your SDK.
|
|
751
|
+
```python
|
|
752
|
+
from moderation_api import ModerationAPI
|
|
753
|
+
import logging
|
|
754
|
+
|
|
755
|
+
logging.basicConfig(level=logging.DEBUG)
|
|
756
|
+
s = ModerationAPI(debug_logger=logging.getLogger("moderation_api"))
|
|
757
|
+
```
|
|
758
|
+
|
|
759
|
+
You can also enable a default debug logger by setting an environment variable `MODAPI_DEBUG` to true.
|
|
760
|
+
<!-- End Debugging [debug] -->
|
|
761
|
+
|
|
762
|
+
<!-- Placeholder for Future Speakeasy SDK Sections -->
|
|
763
|
+
|
|
764
|
+
<!-- Start Custom [more] -->
|
|
765
|
+
## Timeouts
|
|
766
|
+
|
|
767
|
+
Set a timeout in milliseconds for all requests on the client, or for one request:
|
|
768
|
+
|
|
769
|
+
```python
|
|
770
|
+
from moderation_api import ModerationAPI
|
|
771
|
+
|
|
772
|
+
with ModerationAPI(timeout_ms=10_000) as client:
|
|
773
|
+
client.content.submit(content={"type": "text", "text": "Hello"}, timeout_ms=5_000)
|
|
774
|
+
```
|
|
775
|
+
|
|
776
|
+
## Requirements
|
|
777
|
+
|
|
778
|
+
Python 3.10 or later.
|
|
779
|
+
|
|
780
|
+
|
|
781
|
+
## Support
|
|
782
|
+
|
|
783
|
+
- [API reference](https://docs.moderationapi.com/api-reference/introduction)
|
|
784
|
+
- [Errors and error codes](https://docs.moderationapi.com/api-reference/errors)
|
|
785
|
+
- [Rate limits](https://docs.moderationapi.com/api-reference/rate-limits)
|
|
786
|
+
- [Guides](https://docs.moderationapi.com/get-started/introduction)
|
|
787
|
+
- Email [support@moderationapi.com](https://github.com/moderation-api/sdk-python/blob/master/mailto:support@moderationapi.com)
|
|
788
|
+
|
|
789
|
+
Found a bug? Open an issue in this repository. This package is generated from the [Moderation API OpenAPI spec](https://api.moderationapi.com/v1/openapi.json), so pull requests to the generated code can't be merged as they are, but we use them to fix the generator.
|
|
790
|
+
<!-- End Custom [more] -->
|
|
791
|
+
|
|
792
|
+
# Development
|
|
793
|
+
|
|
794
|
+
## Maturity
|
|
795
|
+
|
|
796
|
+
This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage
|
|
797
|
+
to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally
|
|
798
|
+
looking for the latest version.
|
|
799
|
+
|
|
800
|
+
## Contributions
|
|
801
|
+
|
|
802
|
+
While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation.
|
|
803
|
+
We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.
|
|
804
|
+
|
|
805
|
+
### SDK Created by [Speakeasy](https://www.speakeasy.com/?utm_source=moderation-api&utm_campaign=python)
|