sg-mockgun
sg-mockgun replaces shotgun_api3.lib.mockgun with an in-memory Flow Production Tracking mock that
answers as a live site answers over api3.
Install
pip install sg-mockgun
Requires Python 3.9 or later and shotgun-api3 3.10.5 or later.
Quick start
from sg_mockgun import Shotgun, schemas
Shotgun.set_schema_paths(*schemas.paths())
sg = Shotgun("https://mock.example.com", script_name="x", api_key="y")
sg.create("Project", {"name": "Demo"})
Docs
The site is sg-mockgun.vercel.app. Its source is site/.
- Install and migrate from shotgun_api3's mockgun
- Testing with pytest
- HTTP server
- What is modelled
- Coverage: each api3 call the conformance suite checks.
- api3 answers: what a live site answered, per probe.
- Changelog
Develop
uv sync
uv run pytest
Credits
Behaviour in sg-mockgun was measured on a live site, not copied. These upstream changes cover the same ground:
- Patrick Wolf, python-api#466: currency, timecode, uuid, color, password, image and jsonb fields.
- Patrick Wolf, python-api#467: default values in the types the server returns.
- Patrick Wolf, python-api#468:
limitandpageinfind. - Patrick Wolf, python-api#469:
upload. - Patrick Wolf, python-api#470:
download_attachment. - Alex Hughes, python-api#197: loading data from a production site.
- Kevin Sallee, tk-core#963: mockgun filter comparison fixes.
License
BSD-3-Clause, as upstream. src/sg_mockgun/ started as shotgun_api3/lib/mockgun from
shotgun_api3 3.10.5, Copyright (c) 2009-2011 Shotgun Software Inc. tests/test_upstream_mockgun.py
and tests/fixtures/upstream/ are upstream's tests and test schema, with import paths changed.
Metadata
Release files for sg-mockgun 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sg_mockgun-1.0.0.tar.gz | 729.2 kB | With provenance | Details for sg_mockgun-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sg_mockgun-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for sg_mockgun-1.0.0-py3-none-any.whl |
Total release size: 1.1 MB
Release files / sg_mockgun-1.0.0.tar.gz
| Download URL | sg_mockgun-1.0.0.tar.gz |
|---|---|
| Size | 729.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fc772f45cada174989173d4f3f06308206ea0e65f16fcd91d60c0a77950863cf
|
|
BLAKE2b-256 checksum How to use checksums |
84d33815ead63f802ee8c2184f7bc46f5c4ebd7a00179b816cabcaa352714e26
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.
Transparency logRelease files / sg_mockgun-1.0.0-py3-none-any.whl
| Download URL | sg_mockgun-1.0.0-py3-none-any.whl |
|---|---|
| Size | 397.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ecf8f552874fe79708e59c9246d366675782df61f79974e85428de8ef8447227
|
|
BLAKE2b-256 checksum How to use checksums |
64eca2211dc2b888a734a10f68c6e434beeff52a99f7175e2c811503aa988863
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.
Transparency logSecurity for sg-mockgun 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for sg_mockgun-1.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.