🐦 drongo
Mock Google Cloud Platform services in your tests - the moto for GCP.
drongo lets you test code that talks to Google Cloud without touching the
network, running an emulator, or paying for real resources. It stands up an
in-memory, in-process fake of GCP service APIs and transparently intercepts the
requests your google-cloud client libraries make.
If you've used moto for AWS, drongo will
feel immediately familiar - that's on purpose.
Installation
pip install drongo
drongo does not depend on the google-cloud client libraries - you bring your
own (google-cloud-storage, google-cloud-secret-manager, …). It mocks
whatever you already use.
Quickstart
from drongo import mock_gcp
@mock_gcp
def test_upload_download():
from google.cloud import storage
client = storage.Client(project="my-project")
bucket = client.create_bucket("my-bucket")
bucket.blob("hello.txt").upload_from_string("hello drongo")
assert bucket.blob("hello.txt").download_as_text() == "hello drongo"
assert [b.name for b in client.list_blobs("my-bucket")] == ["hello.txt"]
No credentials, no network, no emulator. storage.Client() works with or without
arguments - drongo supplies anonymous credentials and a default project while a
mock scope is active. It also works as a called decorator, a context manager, a
class decorator, or a unittest.TestCase mixin, and ships an auto-registered
drongo pytest fixture - see the
Quickstart guide.
Features
- 🎯 One decorator -
@mock_gcppatches every supported service, just like@mock_aws. - 🔌 Flexible - decorator, context manager, class decorator, or
unittest.TestCasemixin. - 🧠 In-memory & fast - no Docker, no emulators, no sockets; tests run in milliseconds.
- 🧬 Default clients, unchanged - drongo handles gRPC-first services behind the scenes.
- 🏃 Runs your code - opt-in executable handlers actually run your Python when a job runs, a task dispatches, or a message publishes.
- 🌐 Standalone server -
drongo serverspeaks real HTTP so SDKs in any language can point at it. - 🧪 pytest-native - a
drongofixture is auto-registered on install. - 🧩 Extensible - adding a service is
models.py+responses.py+urls.py, the same shape as moto. - ✅ Typed - ships
py.typed, checked with mypy.
Supported services
| Service | Transport | Docs |
|---|---|---|
| Cloud Storage | JSON API (default) | guide |
| Secret Manager | gRPC (default, forced to REST) | guide |
| Pub/Sub | gRPC (default, via emulator) | guide |
| BigQuery | REST/JSON (default) | guide |
| Cloud Tasks | gRPC (default, forced to REST) | guide |
| Cloud Run Jobs | gRPC (default, forced to REST) | guide |
| Resource Manager | gRPC (default, forced to REST) | guide |
| Firestore | gRPC (default, via emulator) | guide |
| Datastore | gRPC (default, via emulator) | guide |
| Bigtable | gRPC (default, via emulator) | guide |
| IAM & Service Accounts | gRPC only (via injected transport) | guide |
| Cloud Logging | gRPC only (via injected transport) | guide |
| Cloud KMS | gRPC (default, forced to REST) | guide |
| Cloud Scheduler | gRPC (default, forced to REST) | guide |
| Cloud Functions | gRPC (default, forced to REST) | guide |
| Memorystore (Redis) | gRPC (default, forced to REST) | guide |
Full capability matrix: Supported services. You can also fill the mocks with realistic Faker data, or run drongo as a standalone HTTP server for non-Python SDKs.
How it works
drongo mirrors moto's architecture, adapted from AWS/botocore to GCP's
REST+JSON APIs: HTTP services ship a models.py / responses.py / urls.py
trio behind the responses
interception layer, gRPC-first services run against an in-process emulator or a
forced-REST transport, and state is sharded through a BackendDict keyed by
project. See the
Architecture tour for the full
picture.
Roadmap
Available (8 services): Cloud Storage, Secret Manager, Pub/Sub, BigQuery, Cloud Tasks, Cloud Run Jobs, Resource Manager, Firestore - plus executable handlers, Faker seeding, and a standalone server.
Next up: Cloud Logging, Cloud KMS, IAM / Service Accounts, Cloud Scheduler, Cloud Functions, Datastore mode. See the full, tiered roadmap (services + capabilities, and how drongo compares to moto).
Want one sooner? Open an issue or contribute it.
Contributing
Contributions are very welcome! Adding a service is a great first PR. Start with
CONTRIBUTING.md and the
contributing-a-service guide.
git clone https://github.com/proxyroot/drongo
cd drongo
make install # editable install + dev tools
make check # ruff + mypy + pytest
License
Apache License 2.0 - the same license as moto.
Acknowledgements
drongo is heavily inspired by moto and owes
its design to that project. It is not affiliated with or endorsed by Google
or the moto maintainers.
Metadata
Release files for drongo 0.8.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 |
|---|---|---|---|---|
| drongo-0.8.0.tar.gz | 124.6 kB | With provenance | Details for drongo-0.8.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| drongo-0.8.0-py3-none-any.whl | Python 3 | none | any | Details for drongo-0.8.0-py3-none-any.whl |
Total release size: 272.5 kB
Release files / drongo-0.8.0.tar.gz
| Download URL | drongo-0.8.0.tar.gz |
|---|---|
| Size | 124.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
39957378cab24531dfc27d679e02b4682906be0222149222c9fb2c8786091077
|
|
BLAKE2b-256 checksum How to use checksums |
6423be12cb611920298dc3d66ea66fd09bc654c24861e2de25670321f0288619
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 12, 2026.
Transparency logRelease files / drongo-0.8.0-py3-none-any.whl
| Download URL | drongo-0.8.0-py3-none-any.whl |
|---|---|
| Size | 147.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ea1050da56fe009f4bc8e083351590ec6999c83cc9a78b53fcbc2c35cd22fa52
|
|
BLAKE2b-256 checksum How to use checksums |
3c9de638352cde5481e18f3354a4b2f1d59ec62e4e1a53a70f47d133d381d4f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 12, 2026.
Transparency logSecurity for drongo 0.8.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
All 2 files in this release have been uploaded with provenance metadata.
Attestation for drongo-0.8.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 Aug 12, 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.