sg-python-api 0.1.0__tar.gz → 0.1.2__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.
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/COMPATIBILITY.md +4 -9
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/PKG-INFO +15 -28
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/README.md +2 -15
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/docs/benchmarks.md +27 -26
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/docs/development.md +3 -4
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/docs/migration-guide.md +4 -10
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/pyproject.toml +2 -1
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/scripts/_conformance_setup.py +0 -8
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/scripts/_sdist_contract.py +1 -1
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/scripts/probe_wire.py +325 -25
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/scripts/run_conformance.sh +2 -2
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/scripts/run_installed_tests.py +1 -1
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/src/shotgun_api3/_async_client.py +151 -108
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/src/shotgun_api3/_async_driver.py +2 -14
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/src/shotgun_api3/_client.py +152 -119
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/src/shotgun_api3/_config.py +2 -10
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/src/shotgun_api3/_driver.py +4 -18
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/src/shotgun_api3/_files.py +66 -107
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/src/shotgun_api3/_methods.py +104 -80
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/src/shotgun_api3/_protocol.py +0 -93
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/src/shotgun_api3/_version.py +1 -1
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/client/test_activity.py +1 -1
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/client/test_async.py +1 -1
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/client/test_crud.py +1 -3
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/client/test_misc_methods.py +180 -30
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/client/test_nav.py +2 -2
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/client/test_schema.py +23 -269
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/client/test_sync.py +1 -1
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/files/test_async.py +164 -85
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/files/test_upload_routing.py +0 -1
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/files/test_uploads.py +257 -221
- sg_python_api-0.1.2/tests/fixtures/activity_stream_read.json +40 -0
- sg_python_api-0.1.2/tests/fixtures/nav_search_entity.json +42 -0
- sg_python_api-0.1.2/tests/fixtures/nav_search_string.json +39 -0
- sg_python_api-0.1.2/tests/fixtures/note_thread_read.json +35 -0
- sg_python_api-0.1.2/tests/fixtures/user_subscriptions_read.json +32 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/live/test_async.py +45 -0
- sg_python_api-0.1.2/tests/live/test_methods.py +306 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/live/test_roundtrip.py +47 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/test_config.py +2 -2
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/test_init.py +1 -1
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/test_parity.py +230 -35
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/tooling/_wire_replay.py +56 -1
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/tooling/test_artifact_evidence.py +5 -5
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/tooling/test_benchmark.py +10 -10
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/tooling/test_conformance_setup.py +9 -31
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/tooling/test_run_conformance.py +45 -37
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/tooling/test_run_installed_tests.py +3 -3
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/tooling/test_validate_artifacts.py +13 -13
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/tooling/test_wire_fixtures.py +779 -285
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/transport/test_async_driver.py +2 -6
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/transport/test_driver.py +20 -29
- sg_python_api-0.1.0/tests/files/test_multipart.py +0 -146
- sg_python_api-0.1.0/tests/fixtures/activity_stream_read.json +0 -40
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/.gitignore +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/LICENSE +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/Makefile +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/docs/testing.md +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/examples/async_client.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/examples/sync_client.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/scripts/_artifact_evidence.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/scripts/_conformance_runtime.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/scripts/benchmark.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/scripts/bootstrap_test_site.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/scripts/validate_artifacts.sh +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/src/shotgun_api3/__init__.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/src/shotgun_api3/_async_httpx2.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/src/shotgun_api3/_async_transport.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/src/shotgun_api3/_capabilities.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/src/shotgun_api3/_crud.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/src/shotgun_api3/_errors.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/src/shotgun_api3/_execution.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/src/shotgun_api3/_sentinel.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/src/shotgun_api3/_sg_timezone.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/src/shotgun_api3/_signatures.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/src/shotgun_api3/_transport.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/src/shotgun_api3/lib/__init__.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/src/shotgun_api3/lib/mockgun/__init__.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/src/shotgun_api3/lib/mockgun/_async.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/src/shotgun_api3/lib/mockgun/_mockgun.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/src/shotgun_api3/lib/sgtimezone.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/src/shotgun_api3/py.typed +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/src/shotgun_api3/shotgun.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/__init__.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/_git.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/_loopback.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/_pyright.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/_required_mode.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/_transports.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/client/__init__.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/client/test_auth_methods.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/client/test_filters.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/client/test_summarize_search.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/conftest.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/files/__init__.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/files/test_cookie_handler.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/files/test_downloads.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/fixtures/batch.json +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/fixtures/create.json +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/fixtures/fault_bad_auth.json +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/fixtures/following.json +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/fixtures/get_session_token.json +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/fixtures/info.json +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/fixtures/nav_expand.json +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/fixtures/preferences_read.json +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/fixtures/read.json +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/fixtures/schema_entity_read.json +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/fixtures/schema_read.json +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/fixtures/summarize.json +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/fixtures/text_search.json +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/fixtures/update_project_last_accessed.json +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/fixtures/work_schedule_read.json +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/lib/__init__.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/lib/conftest.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/lib/test_mockgun_async.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/lib/test_mockgun_crud.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/lib/test_mockgun_find.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/lib/test_mockgun_schema.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/lib/test_sgtimezone.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/live/__init__.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/live/conftest.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/test_datetimes.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/test_errors.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/test_examples.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/test_project_metadata.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/test_signature_parity.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/tooling/__init__.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/tooling/test_conformance_runtime.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/tooling/test_required_mode.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/transport/__init__.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/transport/test_abort.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/transport/test_async.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/transport/test_async_httpx2.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/transport/test_async_prefetch.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/transport/test_prefetch.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/transport/test_protocol.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/transport/test_retry_policy.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/transport/test_streaming.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/transport/test_sync.py +0 -0
- {sg_python_api-0.1.0 → sg_python_api-0.1.2}/tests/transport/test_urllib3.py +0 -0
|
@@ -24,7 +24,7 @@ the *readiness check*.
|
|
|
24
24
|
## Supported scope
|
|
25
25
|
|
|
26
26
|
The package provides the `shotgun_api3` import name and targets the documented synchronous API of
|
|
27
|
-
Autodesk's Python client `3.10.
|
|
27
|
+
Autodesk's Python client `3.10.3`, including its method signatures, return shapes, errors, filters,
|
|
28
28
|
paging, schema, file, activity, navigation, and scheduling operations. It also provides the
|
|
29
29
|
`shotgun_api3.lib.mockgun` and `shotgun_api3.lib.sgtimezone` modules and native async extensions.
|
|
30
30
|
|
|
@@ -112,7 +112,7 @@ operation repeats the check; the client never pages with an invalid size.
|
|
|
112
112
|
| ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
113
113
|
| Download setup errors | Setup RPC faults keep their specific types. Setup or transfer HTTP failures and invalid download URLs raise `ShotgunFileDownloadError` with a generic message and no underlying exception details. Configuration and security failures keep their existing types. |
|
|
114
114
|
| Multi-target thumbnail sharing | The client waits for source readiness before sharing and does not upload the source again. |
|
|
115
|
-
| Legacy form uploads |
|
|
115
|
+
| Legacy form uploads | Servers requiring legacy form uploads are unsupported. The client raises `ShotgunError` before any upload request; capability reads may occur. Hosted direct and multipart routes are supported. |
|
|
116
116
|
| Datetime-shaped strings | Invalid values remain unchanged strings. On platforms without pre-1970 time conversion, valid pre-epoch values use the process standard offset without historical daylight-saving accuracy. |
|
|
117
117
|
| Request diagnostics | Structured observers omit credentials and bodies. Application `httpx2` INFO logging can include signed URLs; set that logger to WARNING. |
|
|
118
118
|
| User agent | The default includes an `sg-python-api` marker. `add_user_agent()` preserves it, `reset_user_agent()` restores the default, and assigning `sg.config.user_agents` replaces every entry. |
|
|
@@ -168,13 +168,8 @@ import logging
|
|
|
168
168
|
logging.getLogger('httpx2').setLevel(logging.WARNING)
|
|
169
169
|
```
|
|
170
170
|
|
|
171
|
-
Compatibility warnings use stable codes and fixed messages
|
|
172
|
-
|
|
173
|
-
| Code | Emitted when |
|
|
174
|
-
| ------------------------------- | --------------------------------------------------------------------------------------- |
|
|
175
|
-
| `deprecated-entity-types-alias` | The application calls `entity_types()`, the deprecated alias of `schema_entity_read()`. |
|
|
176
|
-
| `deprecated-schema-alias` | The application calls `schema()`, the deprecated alias of `schema_field_read()`. |
|
|
177
|
-
| `legacy-infinite-timeout` | An operation runs with `sg.config.timeout_secs` set to `None`. |
|
|
171
|
+
Compatibility warnings use stable codes and fixed messages. The client emits one code,
|
|
172
|
+
`legacy-infinite-timeout`, when an operation runs with `sg.config.timeout_secs` set to `None`.
|
|
178
173
|
|
|
179
174
|
### Callback threads and failures
|
|
180
175
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: sg-python-api
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: Python client for Autodesk Flow Production Tracking
|
|
5
5
|
Project-URL: Documentation, https://github.com/dactylo/sg-python-api/tree/main/docs
|
|
6
6
|
Project-URL: Homepage, https://github.com/dactylo/sg-python-api
|
|
@@ -44,9 +44,9 @@ This documentation uses SG for Flow Production Tracking, formerly named Shotgun
|
|
|
44
44
|
for application tests.
|
|
45
45
|
|
|
46
46
|
sg-python-api is an independent implementation of the documented API of Autodesk's Python client
|
|
47
|
-
`3.10.
|
|
48
|
-
site before replacing its production client. The [migration guide](https://github.com/dactylo/sg-python-api/blob/v0.1.
|
|
49
|
-
through the switch, and the [compatibility reference](https://github.com/dactylo/sg-python-api/blob/v0.1.
|
|
47
|
+
`3.10.3`. Some behavior differs on purpose, so validate your application's workflows against a test
|
|
48
|
+
site before replacing its production client. The [migration guide](https://github.com/dactylo/sg-python-api/blob/v0.1.2/docs/migration-guide.md) walks
|
|
49
|
+
through the switch, and the [compatibility reference](https://github.com/dactylo/sg-python-api/blob/v0.1.2/COMPATIBILITY.md) lists the differences.
|
|
50
50
|
|
|
51
51
|
## Installation
|
|
52
52
|
|
|
@@ -55,16 +55,9 @@ requests to a remote site require HTTPS.
|
|
|
55
55
|
|
|
56
56
|
`sg-python-api` and Autodesk's `shotgun-api3` both install the `shotgun_api3` package, so install
|
|
57
57
|
exactly one of them in a Python environment. If the official client is already installed, follow
|
|
58
|
-
the [migration steps](https://github.com/dactylo/sg-python-api/blob/v0.1.
|
|
58
|
+
the [migration steps](https://github.com/dactylo/sg-python-api/blob/v0.1.2/docs/migration-guide.md#install-the-replacement) to replace it.
|
|
59
59
|
|
|
60
|
-
|
|
61
|
-
your application:
|
|
62
|
-
|
|
63
|
-
```sh
|
|
64
|
-
python -m pip install sg-python-api
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
To install from a checkout instead, run:
|
|
60
|
+
From a checkout, install into the Python environment that runs your application:
|
|
68
61
|
|
|
69
62
|
```sh
|
|
70
63
|
python -m pip install .
|
|
@@ -74,12 +67,6 @@ The base installation provides the synchronous `Shotgun` client and both `mockgu
|
|
|
74
67
|
use the native asynchronous client, `AsyncShotgun`, install the `async` extra, which adds the
|
|
75
68
|
`httpx2` HTTP library:
|
|
76
69
|
|
|
77
|
-
```sh
|
|
78
|
-
python -m pip install 'sg-python-api[async]'
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
From a checkout, use:
|
|
82
|
-
|
|
83
70
|
```sh
|
|
84
71
|
python -m pip install '.[async]'
|
|
85
72
|
```
|
|
@@ -143,23 +130,23 @@ operation fails. Without the `async` extra, importing `AsyncShotgun` raises `Imp
|
|
|
143
130
|
|
|
144
131
|
Share an `AsyncShotgun` only among tasks on one event loop, and cancel its work by cancelling the
|
|
145
132
|
task. A cancelled write may already have reached the server, so check its outcome before repeating
|
|
146
|
-
it. The [async reference](https://github.com/dactylo/sg-python-api/blob/v0.1.
|
|
133
|
+
it. The [async reference](https://github.com/dactylo/sg-python-api/blob/v0.1.2/COMPATIBILITY.md#async-extension-surfaces) covers shutdown and
|
|
147
134
|
cancellation in detail.
|
|
148
135
|
|
|
149
136
|
## Documentation
|
|
150
137
|
|
|
151
138
|
| If you want to... | Read |
|
|
152
139
|
| ----------------------------------------------------- | ---------------------------------------------------------------------------------- |
|
|
153
|
-
| Replace Autodesk's client in an existing application | [Migration guide](https://github.com/dactylo/sg-python-api/blob/v0.1.
|
|
154
|
-
| Check what behaves differently from Autodesk's client | [Compatibility](https://github.com/dactylo/sg-python-api/blob/v0.1.
|
|
155
|
-
| Tune pooling and page prefetch, or observe requests | [Configuration extensions](https://github.com/dactylo/sg-python-api/blob/v0.1.
|
|
156
|
-
| Confirm which client loads and run a smoke test | [Testing an installation](https://github.com/dactylo/sg-python-api/blob/v0.1.
|
|
157
|
-
| Compare measured latency and transfer memory | [Benchmarks](https://github.com/dactylo/sg-python-api/blob/v0.1.
|
|
158
|
-
| See changes by version | [Changelog](https://github.com/dactylo/sg-python-api/blob/v0.1.
|
|
140
|
+
| Replace Autodesk's client in an existing application | [Migration guide](https://github.com/dactylo/sg-python-api/blob/v0.1.2/docs/migration-guide.md) |
|
|
141
|
+
| Check what behaves differently from Autodesk's client | [Compatibility](https://github.com/dactylo/sg-python-api/blob/v0.1.2/COMPATIBILITY.md) |
|
|
142
|
+
| Tune pooling and page prefetch, or observe requests | [Configuration extensions](https://github.com/dactylo/sg-python-api/blob/v0.1.2/COMPATIBILITY.md#configuration-and-observer-extensions) |
|
|
143
|
+
| Confirm which client loads and run a smoke test | [Testing an installation](https://github.com/dactylo/sg-python-api/blob/v0.1.2/docs/testing.md) |
|
|
144
|
+
| Compare measured latency and transfer memory | [Benchmarks](https://github.com/dactylo/sg-python-api/blob/v0.1.2/docs/benchmarks.md) |
|
|
145
|
+
| See changes by version | [Changelog](https://github.com/dactylo/sg-python-api/blob/v0.1.2/CHANGELOG.md) |
|
|
159
146
|
|
|
160
147
|
## Development
|
|
161
148
|
|
|
162
|
-
See the [development guide](https://github.com/dactylo/sg-python-api/blob/v0.1.
|
|
149
|
+
See the [development guide](https://github.com/dactylo/sg-python-api/blob/v0.1.2/docs/development.md) for the required tools, CI, and dependency locks.
|
|
163
150
|
With those tools installed, run:
|
|
164
151
|
|
|
165
152
|
```sh
|
|
@@ -172,6 +159,6 @@ make check
|
|
|
172
159
|
|
|
173
160
|
## License
|
|
174
161
|
|
|
175
|
-
sg-python-api is available under the [MIT License](https://github.com/dactylo/sg-python-api/blob/v0.1.
|
|
162
|
+
sg-python-api is available under the [MIT License](https://github.com/dactylo/sg-python-api/blob/v0.1.2/LICENSE). It is an independent project and is
|
|
176
163
|
not affiliated with or endorsed by Autodesk. Flow Production Tracking is a product of Autodesk,
|
|
177
164
|
Inc.
|
|
@@ -20,7 +20,7 @@ This documentation uses SG for Flow Production Tracking, formerly named Shotgun
|
|
|
20
20
|
for application tests.
|
|
21
21
|
|
|
22
22
|
sg-python-api is an independent implementation of the documented API of Autodesk's Python client
|
|
23
|
-
`3.10.
|
|
23
|
+
`3.10.3`. Some behavior differs on purpose, so validate your application's workflows against a test
|
|
24
24
|
site before replacing its production client. The [migration guide](docs/migration-guide.md) walks
|
|
25
25
|
through the switch, and the [compatibility reference](COMPATIBILITY.md) lists the differences.
|
|
26
26
|
|
|
@@ -33,14 +33,7 @@ requests to a remote site require HTTPS.
|
|
|
33
33
|
exactly one of them in a Python environment. If the official client is already installed, follow
|
|
34
34
|
the [migration steps](docs/migration-guide.md#install-the-replacement) to replace it.
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
your application:
|
|
38
|
-
|
|
39
|
-
```sh
|
|
40
|
-
python -m pip install sg-python-api
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
To install from a checkout instead, run:
|
|
36
|
+
From a checkout, install into the Python environment that runs your application:
|
|
44
37
|
|
|
45
38
|
```sh
|
|
46
39
|
python -m pip install .
|
|
@@ -50,12 +43,6 @@ The base installation provides the synchronous `Shotgun` client and both `mockgu
|
|
|
50
43
|
use the native asynchronous client, `AsyncShotgun`, install the `async` extra, which adds the
|
|
51
44
|
`httpx2` HTTP library:
|
|
52
45
|
|
|
53
|
-
```sh
|
|
54
|
-
python -m pip install 'sg-python-api[async]'
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
From a checkout, use:
|
|
58
|
-
|
|
59
46
|
```sh
|
|
60
47
|
python -m pip install '.[async]'
|
|
61
48
|
```
|
|
@@ -7,9 +7,10 @@ on your site. If you have not tried the client yet, start with the
|
|
|
7
7
|
|
|
8
8
|
## What the results show
|
|
9
9
|
|
|
10
|
-
- **Latency was mixed.** In these samples,
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
- **Latency was mixed.** In these samples, all three upload routes had lower medians with
|
|
11
|
+
sg-python-api, cold and warm, and so did warm downloads. Cold medians were higher for writes,
|
|
12
|
+
schema reads, summaries, and the four-concurrent-read comparison. Warm medians were similar or
|
|
13
|
+
lower except for the encode-heavy batch.
|
|
13
14
|
- **Transfer memory was lower in the measured workloads.** sg-python-api's peak process memory grew
|
|
14
15
|
less during the measured upload and download. That observation also depends on payload shape and
|
|
15
16
|
runtime.
|
|
@@ -39,7 +40,7 @@ In the tables below, "replacement" means sg-python-api and "official" means Auto
|
|
|
39
40
|
|
|
40
41
|
| Setting | Value |
|
|
41
42
|
| --------------------------- | ----------------------------------------------------------------------- |
|
|
42
|
-
| Replacement package version | `0.
|
|
43
|
+
| Replacement package version | `0.1.1` |
|
|
43
44
|
| Autodesk client version | `3.10.2` |
|
|
44
45
|
| Python | `3.14.6` |
|
|
45
46
|
| Platform | macOS, arm64 |
|
|
@@ -55,26 +56,26 @@ estimate a reliable tail-latency distribution.
|
|
|
55
56
|
|
|
56
57
|
| Operation | Replacement cold | Official cold | Replacement warm | Official warm |
|
|
57
58
|
| ----------------------------------- | ---------------: | ------------: | ---------------: | ------------: |
|
|
58
|
-
| First script-authenticated request |
|
|
59
|
-
| Batch |
|
|
60
|
-
| Create |
|
|
61
|
-
| Delete |
|
|
62
|
-
| Download |
|
|
63
|
-
| Medium query |
|
|
64
|
-
| Find one |
|
|
65
|
-
| Paged query |
|
|
66
|
-
| Small query |
|
|
67
|
-
| Four concurrent reads |
|
|
68
|
-
| Decode-heavy read |
|
|
69
|
-
| Encode-heavy batch |
|
|
70
|
-
| Entity schema |
|
|
71
|
-
| Field schema |
|
|
72
|
-
| First session-authenticated request |
|
|
73
|
-
| Summarize |
|
|
74
|
-
| Update |
|
|
75
|
-
| Direct upload |
|
|
76
|
-
| Generic upload |
|
|
77
|
-
| Multipart upload |
|
|
59
|
+
| First script-authenticated request | 366.6 | 358.9 | 119.7 | 124.7 |
|
|
60
|
+
| Batch | 410.7 | 309.8 | 160.5 | 178.6 |
|
|
61
|
+
| Create | 407.0 | 328.3 | 175.0 | 172.1 |
|
|
62
|
+
| Delete | 456.8 | 362.4 | 193.0 | 233.5 |
|
|
63
|
+
| Download | 602.2 | 605.4 | 336.3 | 377.0 |
|
|
64
|
+
| Medium query | 362.6 | 371.6 | 120.7 | 126.1 |
|
|
65
|
+
| Find one | 354.3 | 371.3 | 128.6 | 133.4 |
|
|
66
|
+
| Paged query | 490.2 | 484.0 | 263.8 | 254.0 |
|
|
67
|
+
| Small query | 354.1 | 380.7 | 125.6 | 133.8 |
|
|
68
|
+
| Four concurrent reads | 520.6 | 377.5 | 129.6 | 131.1 |
|
|
69
|
+
| Decode-heavy read | 361.0 | 365.9 | 129.9 | 138.9 |
|
|
70
|
+
| Encode-heavy batch | 993.3 | 790.8 | 665.0 | 565.4 |
|
|
71
|
+
| Entity schema | 346.5 | 276.7 | 117.7 | 113.9 |
|
|
72
|
+
| Field schema | 371.4 | 303.3 | 141.2 | 146.3 |
|
|
73
|
+
| First session-authenticated request | 489.3 | 477.0 | 116.3 | 127.6 |
|
|
74
|
+
| Summarize | 370.7 | 282.8 | 122.2 | 133.5 |
|
|
75
|
+
| Update | 394.6 | 298.1 | 163.5 | 157.2 |
|
|
76
|
+
| Direct upload | 982.0 | 1183.9 | 652.6 | 950.1 |
|
|
77
|
+
| Generic upload | 797.1 | 1128.5 | 596.2 | 814.0 |
|
|
78
|
+
| Multipart upload | 2389.0 | 3118.5 | 2163.7 | 2745.0 |
|
|
78
79
|
|
|
79
80
|
## Transfer memory
|
|
80
81
|
|
|
@@ -84,8 +85,8 @@ memory use or individual Python allocations.
|
|
|
84
85
|
|
|
85
86
|
| Workload | Replacement peak increase | Official peak increase |
|
|
86
87
|
| -------- | ------------------------: | ---------------------: |
|
|
87
|
-
| Download | 3.
|
|
88
|
-
| Upload |
|
|
88
|
+
| Download | 3.34 MiB | 7.31 MiB |
|
|
89
|
+
| Upload | 1.95 MiB | 24.70 MiB |
|
|
89
90
|
|
|
90
91
|
The upload measurement used the multipart route. Download memory uses a fresh download-only process
|
|
91
92
|
after setup so earlier work does not dominate the process's high-water mark.
|
|
@@ -119,7 +119,7 @@ invalidate the evidence. Both scripts need network access and a
|
|
|
119
119
|
|
|
120
120
|
Run `scripts/run_conformance.sh` with the same `PATH` and with `SG_TEST_SITE`, `SG_TEST_SCRIPT`,
|
|
121
121
|
`SG_TEST_KEY`, `SG_TEST_HUMAN_LOGIN`, and `SG_TEST_HUMAN_PASSWORD` set. It clones Autodesk's suite
|
|
122
|
-
at `v3.10.
|
|
122
|
+
at `v3.10.3`, runs it against the validated wheel, and appends a tally to
|
|
123
123
|
`dist/conformance-results.md`.
|
|
124
124
|
|
|
125
125
|
The configured human user must already exist and authenticate with a legacy login passphrase and
|
|
@@ -137,9 +137,8 @@ API tests without the official client's legacy transport. Individual tests tied
|
|
|
137
137
|
private methods, bundled `httplib2`, or unsupported server versions are explicitly skipped. Their
|
|
138
138
|
exact names and reasons are recorded in `scripts/_conformance_setup.py`; unexpected imports still
|
|
139
139
|
fail. Four tests use a reduced setup because their assertions do not require the legacy transport
|
|
140
|
-
mocks.
|
|
141
|
-
|
|
142
|
-
without requiring Autodesk's exact message text.
|
|
140
|
+
mocks. Two test methods have explicit expectation adaptations: invalid export arguments must raise
|
|
141
|
+
`ShotgunError` without requiring Autodesk's exact message text.
|
|
143
142
|
|
|
144
143
|
The runtime fixtures snapshot and restore the existing user fields, custom schema and visibility,
|
|
145
144
|
and schedule exceptions changed by the tests. The two schema tests use unique field names on each
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
This guide is for applications that use Autodesk's `shotgun_api3` client and want to switch to
|
|
4
4
|
sg-python-api. sg-python-api keeps the `shotgun_api3` import name and targets the documented API of
|
|
5
|
-
Autodesk's client `3.10.
|
|
5
|
+
Autodesk's client `3.10.3`, so migration mainly concerns installation, network policy, and failure
|
|
6
6
|
handling. Work in your application's test environment first, so you can validate its actual queries
|
|
7
7
|
and writes before changing a production deployment. For a new integration, start with the
|
|
8
8
|
[README quick start](../README.md#quick-start) instead.
|
|
@@ -26,21 +26,15 @@ these:
|
|
|
26
26
|
|
|
27
27
|
Use your application's package manager to remove `shotgun-api3` and install `sg-python-api`. Both
|
|
28
28
|
provide `shotgun_api3`, so they cannot coexist in one environment. In a pip-managed environment,
|
|
29
|
-
|
|
29
|
+
run these commands from a checkout of `sg-python-api`:
|
|
30
30
|
|
|
31
31
|
```sh
|
|
32
32
|
python -m pip uninstall shotgun-api3
|
|
33
|
-
python -m pip install sg-python-api
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
To install from a checkout instead, run the second command there as:
|
|
37
|
-
|
|
38
|
-
```sh
|
|
39
33
|
python -m pip install .
|
|
40
34
|
```
|
|
41
35
|
|
|
42
|
-
When the application needs native async support,
|
|
43
|
-
|
|
36
|
+
When the application needs native async support, run `python -m pip install '.[async]'` instead of
|
|
37
|
+
the second command. Existing `import shotgun_api3` statements stay as they are.
|
|
44
38
|
|
|
45
39
|
Next, [confirm which client loads](testing.md#verify-the-import-target) and run the
|
|
46
40
|
[read-only smoke test](testing.md#run-a-read-only-smoke-test) with a test-site credential. A
|
|
@@ -10,7 +10,7 @@ requires = [ "editables~=0.3", "hatch-fancy-pypi-readme>=25.1", "hatchling>=1.27
|
|
|
10
10
|
# ==========================================================
|
|
11
11
|
[project]
|
|
12
12
|
name = "sg-python-api"
|
|
13
|
-
version = "0.1.
|
|
13
|
+
version = "0.1.2"
|
|
14
14
|
description = "Python client for Autodesk Flow Production Tracking"
|
|
15
15
|
keywords = [ "api", "flow-production-tracking", "shotgrid", "shotgun", "shotgun-api3" ]
|
|
16
16
|
license = "MIT"
|
|
@@ -138,6 +138,7 @@ max_supported_python = "3.15"
|
|
|
138
138
|
[tool.pyright]
|
|
139
139
|
pythonVersion = "3.11" # Keep in sync with tool.ruff.target-version
|
|
140
140
|
typeCheckingMode = "strict"
|
|
141
|
+
exclude = [ "dist" ]
|
|
141
142
|
extraPaths = [ ".", "src" ]
|
|
142
143
|
executionEnvironments = [
|
|
143
144
|
{ root = "tests", reportPrivateUsage = "none" },
|
|
@@ -197,14 +197,6 @@ _EXPECTATIONS = {
|
|
|
197
197
|
"self.assertRaises(shotgun_api3.ShotgunError, self.sg.export_page, None, 'csv', "
|
|
198
198
|
"layout_name='Conformance')\n"
|
|
199
199
|
),
|
|
200
|
-
'TestShotgunApi.test_deprecated_functions': (
|
|
201
|
-
'with self.assertWarns(DeprecationWarning):\n'
|
|
202
|
-
' entity_schema = self.sg.entity_types()\n'
|
|
203
|
-
'self.assertEqual(entity_schema, self.sg.schema_entity_read())\n'
|
|
204
|
-
'with self.assertWarns(DeprecationWarning):\n'
|
|
205
|
-
" field_schema = self.sg.schema('Asset')\n"
|
|
206
|
-
"self.assertEqual(field_schema, self.sg.schema_field_read('Asset'))\n"
|
|
207
|
-
),
|
|
208
200
|
}
|
|
209
201
|
_SCHEMA_INPUTS = {
|
|
210
202
|
'TestFind.test_zero_is_not_none': (
|
|
@@ -22,7 +22,7 @@ if TYPE_CHECKING:
|
|
|
22
22
|
_ARTIFACT_ARGUMENT_COUNT = 6
|
|
23
23
|
_COMMAND_ARGUMENT_COUNT = 3
|
|
24
24
|
_DIRECT_DOC_PART_COUNT = 2
|
|
25
|
-
_EXPECTED_VERSION = '0.1.
|
|
25
|
+
_EXPECTED_VERSION = '0.1.2'
|
|
26
26
|
_REGULAR_MEMBER_TYPES = frozenset({tarfile.AREGTYPE, tarfile.REGTYPE})
|
|
27
27
|
_ROOT_SOURCE_FILES = frozenset(
|
|
28
28
|
{
|