codecraftai-restclient-google
A pure-Python client for the Google Cloud APIs, replacing google-auth, google-api-core and the google-cloud-* packages the provisioning venue used: Compute Engine, Cloud Storage, Cloud DNS and Cloud TPU.
One authenticated transport serves all four, since they are all JSON over HTTPS with a bearer token.
Design notes
Responses carry protobuf semantics, not JSON semantics. The generated clients returned messages whose unset fields read as TYPED ZERO VALUES — 0, "", False, [], {} — never None, and consumer code depends on it:
network_id = str(existing.id) if existing.id != 0 else gcp_name link = existing.self_link if len(existing.self_link) > 0 else fallback
Returning None would make str(None) the resource id and crash len(). So ProtoObject is deliberately the OPPOSITE of the None-for-absent convention the other clients in this fleet use.
Field types cannot be inferred from omitted JSON, so the non-string types are named explicitly in googleobject. Anything unnamed defaults to the string zero value — the most common case, and the one whose misuse fails loudly via len() rather than silently.
Wire names are matched by normalising both sides (removing underscores, lowercasing), so self_link finds selfLink and size_gb finds sizeGb. 64-bit ids arrive as JSON strings and are coerced back to int, so existing.id != 0 is never handed "0".
Mutations answer with an operation, not the resource. The venue blocks on result() before reading the resource back — without that wait the follow-up get races the create and 404s. A DONE operation is not necessarily a successful one: Compute reports failures in the operation body with a 200 on the poll, so result() inspects it. A timeout raises a distinct type from a failure, because the operation may still be running.
DNS edits are changes, not writes. Cloud DNS applies a set of additions and deletions atomically. Replacing a record set is one change containing both — splitting it into two calls would leave the zone briefly without the record.
Buckets are active record, unlike Compute resources: the venue calls bucket.delete(force=True) on listed entries. force deletes the bucket’s objects first, because the API refuses to delete a non-empty bucket and a teardown would otherwise fail on any bucket ever written to.
Authentication. A service-account key self-signs an RS256 JWT and exchanges it for an access token; workload identity asks the metadata server. The RSA signing is why this package depends on cryptography — it is the only asymmetric crypto in these clients apart from the Oracle one.
NotFound keeps its google.api_core.exceptions name, because consumer code catches it to mean “absent”.
Metadata
Release files for codecraftai-restclient-google 1.2.1
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 | |
|---|---|---|---|---|
| codecraftai_restclient_google-1.2.1.tar.gz | 25.1 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| codecraftai_restclient_google-1.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 55.9 kB
Release files / codecraftai_restclient_google-1.2.1.tar.gz
| Download URL | codecraftai_restclient_google-1.2.1.tar.gz |
|---|---|
| Size | 25.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aaaa3f855650c95d07a7cee43dac8c2fb56464a6a19df8b94146df98e511a605
|
|
BLAKE2b-256 checksum How to use checksums |
0c0e88f21d60a1b4a71e79a9b6c1fe7753794e7b4c2cb12af18c478e18e646f1
|
| 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 Oct 20, 2026.
Transparency logRelease files / codecraftai_restclient_google-1.2.1-py3-none-any.whl
| Download URL | codecraftai_restclient_google-1.2.1-py3-none-any.whl |
|---|---|
| Size | 30.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8e50b3546f73307c19a855591906f26ec448e2f38933a5b550de67506f0ae2eb
|
|
BLAKE2b-256 checksum How to use checksums |
6f9feac1a456b3dd63f349308b3b4b50e507afade275b5f1b565ba7d97c54728
|
| 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 Oct 20, 2026.
Transparency logSecurity for codecraftai-restclient-google 1.2.1
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 codecraftai_restclient_google-1.2.1.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 Oct 20, 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.