GCP provider for Pragmatiks
Project description
gcp Provider
GCP provider for Pragmatiks
Resources
Define your resources in src/gcp_provider/resources.py:
from pragma_sdk import Resource, Config, Outputs, Field
from typing import ClassVar
class MyResourceConfig(Config):
name: Field[str]
size: Field[int] = 10
class MyResourceOutputs(Outputs):
url: str
created_at: str
class MyResource(Resource[MyResourceConfig, MyResourceOutputs]):
provider: ClassVar[str] = "gcp"
resource: ClassVar[str] = "my_resource"
async def on_create(self) -> MyResourceOutputs:
# Create the resource
return MyResourceOutputs(url="...", created_at="...")
async def on_update(self, previous_config: MyResourceConfig) -> MyResourceOutputs:
# Update the resource
return self.outputs
async def on_delete(self) -> None:
# Delete the resource
pass
Development
Testing
Test your resource lifecycle methods with ProviderHarness:
# Install dependencies
uv sync --dev
# Run tests
uv run pytest tests/
Writing Tests
Use ProviderHarness to test lifecycle methods:
from pragma_sdk.provider import ProviderHarness
from gcp_provider import ExampleResource, ExampleConfig
async def test_create():
harness = ProviderHarness()
result = await harness.invoke_create(
ExampleResource,
name="test",
config=ExampleConfig(name="my-resource", size=10),
)
assert result.success
assert result.outputs.url is not None
Deployment
Push your provider to Pragmatiks platform:
pragma provider push
The platform handles all runtime infrastructure - you just push your code.
Updating This Project
This project was created with Copier. To update to the latest template:
copier update
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pragmatiks_gcp_provider-0.1.0.tar.gz.
File metadata
- Download URL: pragmatiks_gcp_provider-0.1.0.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0452acb3aaeac7b1d03d1cd5885a357e8d1c149331fb9f529266e8fd6903e8a2
|
|
| MD5 |
8facfb4808cb182926cfcfab4ee99b45
|
|
| BLAKE2b-256 |
bec4b03acb359331e9ec62ff9f4b1dac1411469c93555121799d6a16c1e60c78
|
Provenance
The following attestation bundles were made for pragmatiks_gcp_provider-0.1.0.tar.gz:
Publisher:
publish.yaml on pragmatiks/providers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pragmatiks_gcp_provider-0.1.0.tar.gz -
Subject digest:
0452acb3aaeac7b1d03d1cd5885a357e8d1c149331fb9f529266e8fd6903e8a2 - Sigstore transparency entry: 816053851
- Sigstore integration time:
-
Permalink:
pragmatiks/providers@a149f8d2ccc7506293459f4be91b1084d4b399dd -
Branch / Tag:
refs/heads/main - Owner: https://github.com/pragmatiks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@a149f8d2ccc7506293459f4be91b1084d4b399dd -
Trigger Event:
push
-
Statement type:
File details
Details for the file pragmatiks_gcp_provider-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pragmatiks_gcp_provider-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b36c66ead5c6b605159e2e23359dcdf00f9f17f9d1e7af24601c82652a52027
|
|
| MD5 |
0dedd46291112f6c09ae21c210e28744
|
|
| BLAKE2b-256 |
2ccb4e7712ad132cfe93952f02aab2cfa3c7fd8a78f9222ce4b5afd2664663ee
|
Provenance
The following attestation bundles were made for pragmatiks_gcp_provider-0.1.0-py3-none-any.whl:
Publisher:
publish.yaml on pragmatiks/providers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pragmatiks_gcp_provider-0.1.0-py3-none-any.whl -
Subject digest:
3b36c66ead5c6b605159e2e23359dcdf00f9f17f9d1e7af24601c82652a52027 - Sigstore transparency entry: 816053904
- Sigstore integration time:
-
Permalink:
pragmatiks/providers@a149f8d2ccc7506293459f4be91b1084d4b399dd -
Branch / Tag:
refs/heads/main - Owner: https://github.com/pragmatiks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@a149f8d2ccc7506293459f4be91b1084d4b399dd -
Trigger Event:
push
-
Statement type: