sg-python-api 0.1.2__py3-none-any.whl → 0.2.0__py3-none-any.whl

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.
Files changed (56) hide show
  1. {sg_python_api-0.1.2.dist-info → sg_python_api-0.2.0.dist-info}/METADATA +21 -24
  2. sg_python_api-0.2.0.dist-info/RECORD +58 -0
  3. shotgun_api3/__init__.py +4 -0
  4. shotgun_api3/_async_client.py +347 -281
  5. shotgun_api3/_async_driver.py +25 -55
  6. shotgun_api3/_async_httpx2.py +92 -59
  7. shotgun_api3/_async_transport.py +38 -3
  8. shotgun_api3/_capabilities.py +4 -3
  9. shotgun_api3/_client.py +296 -422
  10. shotgun_api3/_config.py +245 -120
  11. shotgun_api3/_connections.py +144 -0
  12. shotgun_api3/_crud.py +25 -250
  13. shotgun_api3/_driver.py +29 -54
  14. shotgun_api3/_execution.py +1 -3
  15. shotgun_api3/_files.py +193 -21
  16. shotgun_api3/_methods.py +59 -411
  17. shotgun_api3/_protocol.py +27 -53
  18. shotgun_api3/_transport.py +82 -407
  19. shotgun_api3/_version.py +7 -2
  20. shotgun_api3/lib/mockgun/__init__.py +20 -7
  21. shotgun_api3/lib/mockgun/_activity.py +510 -0
  22. shotgun_api3/lib/mockgun/_async_client.py +196 -0
  23. shotgun_api3/lib/mockgun/_dates.py +164 -0
  24. shotgun_api3/lib/mockgun/_errors.py +18 -0
  25. shotgun_api3/lib/mockgun/_events.py +1031 -0
  26. shotgun_api3/lib/mockgun/_follows.py +217 -0
  27. shotgun_api3/lib/mockgun/_handlers.py +558 -0
  28. shotgun_api3/lib/mockgun/_links.py +440 -0
  29. shotgun_api3/lib/mockgun/_new_client.py +92 -0
  30. shotgun_api3/lib/mockgun/_presets.py +492 -0
  31. shotgun_api3/lib/mockgun/_query.py +2163 -0
  32. shotgun_api3/lib/mockgun/_retirement.py +368 -0
  33. shotgun_api3/lib/mockgun/_schema.py +172 -0
  34. shotgun_api3/lib/mockgun/_schema_writes.py +425 -0
  35. shotgun_api3/lib/mockgun/_search.py +378 -0
  36. shotgun_api3/lib/mockgun/_server.py +169 -0
  37. shotgun_api3/lib/mockgun/_sessions.py +206 -0
  38. shotgun_api3/lib/mockgun/_site.py +150 -0
  39. shotgun_api3/lib/mockgun/_site_data.py +584 -0
  40. shotgun_api3/lib/mockgun/_storage.py +208 -0
  41. shotgun_api3/lib/mockgun/_store.py +1446 -0
  42. shotgun_api3/lib/mockgun/_summaries.py +964 -0
  43. shotgun_api3/lib/mockgun/_sync_client.py +190 -0
  44. shotgun_api3/lib/mockgun/_threads.py +226 -0
  45. shotgun_api3/lib/mockgun/_thumbnails.py +146 -0
  46. shotgun_api3/lib/mockgun/_transport.py +145 -0
  47. shotgun_api3/lib/mockgun/_uploads.py +417 -0
  48. shotgun_api3/lib/mockgun/_wire.py +120 -0
  49. shotgun_api3/lib/mockgun/mockgun.py +14 -0
  50. shotgun_api3/lib/sgtimezone.py +24 -1
  51. sg_python_api-0.1.2.dist-info/RECORD +0 -31
  52. shotgun_api3/_signatures.py +0 -53
  53. shotgun_api3/lib/mockgun/_async.py +0 -315
  54. shotgun_api3/lib/mockgun/_mockgun.py +0 -1666
  55. {sg_python_api-0.1.2.dist-info → sg_python_api-0.2.0.dist-info}/WHEEL +0 -0
  56. {sg_python_api-0.1.2.dist-info → sg_python_api-0.2.0.dist-info}/licenses/LICENSE +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: sg-python-api
3
- Version: 0.1.2
3
+ Version: 0.2.0
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.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.
47
+ `3.10.5`. 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.2.0/docs/migration-guide.md) walks
49
+ through the switch, and the [compatibility reference](https://github.com/dactylo/sg-python-api/blob/v0.2.0/COMPATIBILITY.md) lists the differences.
50
50
 
51
51
  ## Installation
52
52
 
@@ -55,7 +55,7 @@ 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.2/docs/migration-guide.md#install-the-replacement) to replace it.
58
+ the [migration steps](https://github.com/dactylo/sg-python-api/blob/v0.2.0/docs/migration-guide.md#install-the-replacement) to replace it.
59
59
 
60
60
  From a checkout, install into the Python environment that runs your application:
61
61
 
@@ -126,39 +126,36 @@ asyncio.run(main())
126
126
  ```
127
127
 
128
128
  The output matches the synchronous example. The `async with` block closes the client even when an
129
- operation fails. Without the `async` extra, importing `AsyncShotgun` raises `ImportError`.
130
-
131
- Share an `AsyncShotgun` only among tasks on one event loop, and cancel its work by cancelling the
132
- task. A cancelled write may already have reached the server, so check its outcome before repeating
133
- it. The [async reference](https://github.com/dactylo/sg-python-api/blob/v0.1.2/COMPATIBILITY.md#async-extension-surfaces) covers shutdown and
134
- cancellation in detail.
129
+ operation fails. Share an `AsyncShotgun` only among tasks on one event loop. See the
130
+ [async reference](https://github.com/dactylo/sg-python-api/blob/v0.2.0/COMPATIBILITY.md#async-extension-surfaces) for lifecycle and cancellation
131
+ details.
135
132
 
136
133
  ## Documentation
137
134
 
138
- | If you want to... | Read |
139
- | ----------------------------------------------------- | ---------------------------------------------------------------------------------- |
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) |
135
+ | If you want to... | Read |
136
+ | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |
137
+ | Replace Autodesk's client in an existing application | [Migration guide](https://github.com/dactylo/sg-python-api/blob/v0.2.0/docs/migration-guide.md) |
138
+ | Check what behaves differently from Autodesk's client | [Compatibility](https://github.com/dactylo/sg-python-api/blob/v0.2.0/COMPATIBILITY.md) |
139
+ | Tune pooling, TCP keepalive, or page prefetch, or observe requests | [Configuration extensions](https://github.com/dactylo/sg-python-api/blob/v0.2.0/COMPATIBILITY.md#configuration-and-observer-extensions) |
140
+ | Confirm which client loads and run a smoke test | [Testing an installation](https://github.com/dactylo/sg-python-api/blob/v0.2.0/docs/testing.md) |
141
+ | Compare measured latency and transfer memory | [Benchmarks](https://github.com/dactylo/sg-python-api/blob/v0.2.0/docs/benchmarks.md) |
142
+ | See changes by version | [Changelog](https://github.com/dactylo/sg-python-api/blob/v0.2.0/CHANGELOG.md) |
146
143
 
147
144
  ## Development
148
145
 
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.
146
+ See the [development guide](https://github.com/dactylo/sg-python-api/blob/v0.2.0/docs/development.md) for the required tools, CI, and dependency locks.
150
147
  With those tools installed, run:
151
148
 
152
149
  ```sh
153
150
  make setup
154
- make check
151
+ make check TEST_FLAGS="-m 'not live'"
155
152
  ```
156
153
 
157
- `make check` also runs the live-site tests, which create and delete records, whenever the
158
- `SG_TEST_*` variables described in the development guide are set.
154
+ See [live-site tests](https://github.com/dactylo/sg-python-api/blob/v0.2.0/docs/development.md#live-site-tests) to configure tests that create and
155
+ retire records on a disposable site.
159
156
 
160
157
  ## License
161
158
 
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
159
+ sg-python-api is available under the [MIT License](https://github.com/dactylo/sg-python-api/blob/v0.2.0/LICENSE). It is an independent project and is
163
160
  not affiliated with or endorsed by Autodesk. Flow Production Tracking is a product of Autodesk,
164
161
  Inc.
@@ -0,0 +1,58 @@
1
+ shotgun_api3/__init__.py,sha256=5LuBfBg1jRyKl7bBZq91mHAqO36BZ1HVQSAVdmen0qQ,2158
2
+ shotgun_api3/_async_client.py,sha256=gFHMzwdCarGHiZolG7ky7MGmS11Hm72DqkYlndtJ07c,117928
3
+ shotgun_api3/_async_driver.py,sha256=UNAo6YgE51l8VCvErJcDNzP7WMdq_XZBFC6OXqEX5wM,30882
4
+ shotgun_api3/_async_httpx2.py,sha256=dlLiy3ge2CKqVSoMhOqlh_HWipwKm6HZZ060MtmgGNk,25267
5
+ shotgun_api3/_async_transport.py,sha256=jd7iaY9HBEk99sBcr2d9qhFkPhYax_xXfBH5x3Arvro,5942
6
+ shotgun_api3/_capabilities.py,sha256=0ti2ZlR7jK8yan79BZfb3DrNOKsYFCmpph0yAbLBVNQ,5649
7
+ shotgun_api3/_client.py,sha256=68JzXABh3cT9CnnnMtuXvC5oNe5zIJm-ivmSHeHdkBU,100608
8
+ shotgun_api3/_config.py,sha256=PnUe4FDVuwLDL7ARCFd2Q4rVxIdrs5V4hmIec_4C75M,59937
9
+ shotgun_api3/_connections.py,sha256=SY99FJGWxnSgirQbrv7JL3yM11GAyxQim2bicT5ERzc,4910
10
+ shotgun_api3/_crud.py,sha256=ud7ihBDh9jaZEtBaScYvwsN1shBGh220L5zC6gNBJYo,23331
11
+ shotgun_api3/_driver.py,sha256=O8oym5j2wo46clasnUvK_EoG_WxIeRM7_8BlMTIvlDw,28280
12
+ shotgun_api3/_errors.py,sha256=fk7v3XbmZK63M272r5wDwF_GgI-4RynPfAWv1P-J-GI,1480
13
+ shotgun_api3/_execution.py,sha256=oq8H10iY4U94dDY3VV4o3TxFG8UfNf1J2YYoto4Br-0,8194
14
+ shotgun_api3/_files.py,sha256=3MCuPWwe1ifOQWoLGnoXzW9KuJI9YiqIGIBlTgZWoRM,39500
15
+ shotgun_api3/_methods.py,sha256=KO9MAlnej0rpMx51JAuaXd7qjPCQkjppBMqCB3iUV5c,26724
16
+ shotgun_api3/_protocol.py,sha256=6odVr5rXeh2B9pi3GPBzIWtINi_Sl6ciptg15EdTIYI,41343
17
+ shotgun_api3/_sentinel.py,sha256=KAQzQjJVhTTZPLFY1f88-_vP7U06i2g6ZS7KJcn4vIA,116
18
+ shotgun_api3/_sg_timezone.py,sha256=yr7Wdln9fwfTVGMQSFsgO-eduuTHQ5EbSY5xEVQ2tYw,115
19
+ shotgun_api3/_transport.py,sha256=SzWDJsKQvC2qxZkdxLJzDJxJw640Za2iAOMt66RXVWI,18209
20
+ shotgun_api3/_version.py,sha256=Kntr-Fc4z1GSr9l4HBbklZmC6oxNDLiCQPs7d8wpAUw,288
21
+ shotgun_api3/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
+ shotgun_api3/shotgun.py,sha256=X7PLlCC-gR8dJgY_uLYXw_LWN8mz5MsQsSYJldtavTk,1706
23
+ shotgun_api3/lib/__init__.py,sha256=4WGYod6xHcj23rapx5bTDGdjT52H1CAQNMz4BmzNmn0,55
24
+ shotgun_api3/lib/sgtimezone.py,sha256=hpoe4ATObNXU6mFMXxgzeiBRzPwgGf3LTL7CMCuv0bI,8163
25
+ shotgun_api3/lib/mockgun/__init__.py,sha256=fNcVbMUKk1uKOtqXB1eFRICck7gpCx0kbNsoCHhDL6s,1490
26
+ shotgun_api3/lib/mockgun/_activity.py,sha256=MK09A1FERRN9Tg2sl2tCtu7n7Gebi-qJKAlE-knn-88,19769
27
+ shotgun_api3/lib/mockgun/_async_client.py,sha256=UqsoACBDzjkCY191E09grBWAGBm-E8nUhytSJRBATOo,7411
28
+ shotgun_api3/lib/mockgun/_dates.py,sha256=d0lAIM-SaKjj-vtwe7qg5OXHwgGk42N8OQtxYQ8GWnE,6682
29
+ shotgun_api3/lib/mockgun/_errors.py,sha256=LL8WI7Sv-p51pEe92k1UsNGygTHXmVki1N0ntJMVnj0,620
30
+ shotgun_api3/lib/mockgun/_events.py,sha256=DPi7RrGqg8pz5fbf9fh8goGu5ss0bG7QXW8zJXSGbBI,36800
31
+ shotgun_api3/lib/mockgun/_follows.py,sha256=TeSRhlWWYKukz7ZOFa5KDfwMl7zGdQwqHzR7i24ej2E,8401
32
+ shotgun_api3/lib/mockgun/_handlers.py,sha256=f4UorkMrqhERWp0r7A8d7CUemyYOlmScroYisnKsF_Y,23642
33
+ shotgun_api3/lib/mockgun/_links.py,sha256=eSEYlZ20ZQ-FkX7jbV20acQPni1ODGUoqAhEFK2j0jQ,17158
34
+ shotgun_api3/lib/mockgun/_new_client.py,sha256=M9qzuT910xQDW1GwIxhZ8cCfdeMucT0FpAe4CVPmZ-U,2981
35
+ shotgun_api3/lib/mockgun/_presets.py,sha256=R8CAWg-sPGj6OX2yWfivJ1g5YNKIuU7D9LyAXxR2hFo,20339
36
+ shotgun_api3/lib/mockgun/_query.py,sha256=Z2c1cforUL0ULFKHdDuG8gJDj4SSW5ewwJzeJPik2lQ,90432
37
+ shotgun_api3/lib/mockgun/_retirement.py,sha256=TuiElPOyktDBP-eaKBoJ2pVLDNsxMbkx1bBEx9je3eU,14049
38
+ shotgun_api3/lib/mockgun/_schema.py,sha256=MJokdscaJP1zVlNtZR679Z3eW3r3PuMvAtYmiLtg9So,7069
39
+ shotgun_api3/lib/mockgun/_schema_writes.py,sha256=lxxrtCDK6FG2_RpikYYerdMlD9YcH16fHGqUcv4CDoo,16781
40
+ shotgun_api3/lib/mockgun/_search.py,sha256=xhTD_5nILWHs7jfXnJKAJZVQS4CQAYN0DwTBf4izoj8,14507
41
+ shotgun_api3/lib/mockgun/_server.py,sha256=7EP43FnaXvlwijc6gKeZXimerRIY6brYEAW_iLSxMng,6546
42
+ shotgun_api3/lib/mockgun/_sessions.py,sha256=3p4PL-5eNypS8WwdhKX5RNLWKM_alhqN2pDDqitCA3g,8825
43
+ shotgun_api3/lib/mockgun/_site.py,sha256=cj3HeblefYV0jX-4P8ginh5EvVG1thUEaxSV4dN_Q_I,6107
44
+ shotgun_api3/lib/mockgun/_site_data.py,sha256=Dkivld3zuCqcpC-R4QhMAxUrhsT3Sqkm7UP6fP6v4lA,23470
45
+ shotgun_api3/lib/mockgun/_storage.py,sha256=OLE09uaO0GoYj_SsUoVCu2MeTl0qW_cDIwlYMXh7EIk,7780
46
+ shotgun_api3/lib/mockgun/_store.py,sha256=JrNRaa0eHM3ILTSEg8C7V6ut-_JaJpoSoCfnDuhaenk,60853
47
+ shotgun_api3/lib/mockgun/_summaries.py,sha256=HE7ljsMijG3BTWQhhoU3sFpB2hz3skNgnUk_9jQt8SE,40565
48
+ shotgun_api3/lib/mockgun/_sync_client.py,sha256=Vo-3rm9dxp4_4ulnFN2tf3xCDUCmw_v1OcE8-8UKtRI,7276
49
+ shotgun_api3/lib/mockgun/_threads.py,sha256=Q0vu0J6_bGYXV_R3bOryIveIGRyDjAQnerYhTz0MBdw,9718
50
+ shotgun_api3/lib/mockgun/_thumbnails.py,sha256=VG1d4OJCBowtJIhmps8d-DlOCLFNcEyl6fdEG8ylOEU,6169
51
+ shotgun_api3/lib/mockgun/_transport.py,sha256=o4pOjwek9BVVLZYCVRy0ega1qYOnsFipaxGV7sPwKoM,5174
52
+ shotgun_api3/lib/mockgun/_uploads.py,sha256=aUzptrzj4fiMgVQCu_vaiXAsfsmds_YuVeRSz1-5ZH4,16711
53
+ shotgun_api3/lib/mockgun/_wire.py,sha256=OC2B1AziX1y0ugQuso4fQXiK4sAdy_lAF_E5ktvjxFc,4123
54
+ shotgun_api3/lib/mockgun/mockgun.py,sha256=OQaZbVxuAtYdBkO0ItV_KpJ6XsnbbYWA1Oti8Wm51Io,522
55
+ sg_python_api-0.2.0.dist-info/METADATA,sha256=PdPF2YfKAvN9yyM6sus9sJOuXSUsHH2R6TO2d4s5JK4,7530
56
+ sg_python_api-0.2.0.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
57
+ sg_python_api-0.2.0.dist-info/licenses/LICENSE,sha256=V3moMsQxKDchTd3mtXl5J-ODaNBDvFrapOf1DK7Nx_U,1082
58
+ sg_python_api-0.2.0.dist-info/RECORD,,
shotgun_api3/__init__.py CHANGED
@@ -4,6 +4,10 @@ Import `Shotgun` directly from this package. Import `AsyncShotgun` explicitly
4
4
  after installing the `async` extra; it is loaded lazily and excluded from star
5
5
  imports.
6
6
 
7
+ Import initializes the compatibility logger and reads
8
+ `SHOTGUN_API_DISABLE_ENTITY_OPTIMIZATION`; the value `1` disables entity-link
9
+ optimization.
10
+
7
11
  Close synchronous clients with `close()`. Use asynchronous clients through an
8
12
  async context manager or call `await close()`. The public `sg_timezone` object
9
13
  is the shared timezone configuration used for datetime conversion.