🚨 Latest Research:Tanstack npm Packages Compromised in Ongoing Mini Shai-Hulud Supply-Chain Attack.Learn More
Socket
Book a DemoSign in
Socket

crossplane-function-sdk-python

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crossplane-function-sdk-python - pypi Package Compare versions

Comparing version
0.5.0
to
0.6.0
+1
-1
.github/workflows/ci.yml

@@ -123,3 +123,3 @@ name: CI

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@v1.10.3
uses: pypa/gh-action-pypi-publish@v1.12.3
with:

@@ -126,0 +126,0 @@ # Note that this is currently being pushed to the 'crossplane' PyPI

@@ -18,2 +18,2 @@ # Copyright 2023 The Crossplane Authors.

# This is set at build time, using "hatch version"
__version__ = "0.5.0"
__version__ = "0.6.0"

@@ -41,3 +41,11 @@ # Copyright 2023 The Crossplane Authors.

case pydantic.BaseModel():
r.resource.update(source.model_dump(exclude_defaults=True, warnings=False))
data = source.model_dump(exclude_defaults=True, warnings=False)
# In Pydantic, exclude_defaults=True in model_dump excludes fields
# that have their value equal to the default. If a field like
# apiVersion is set to its default value 's3.aws.upbound.io/v1beta2'
# (and not explicitly provided during initialization), it will be
# excluded from the serialized output.
data['apiVersion'] = source.apiVersion
data['kind'] = source.kind
r.resource.update(data)
case structpb.Struct():

@@ -114,6 +122,6 @@ # TODO(negz): Use struct_to_dict and update to match other semantics?

if "status" not in resource:
if not resource or "status" not in resource:
return unknown
if "conditions" not in resource["status"]:
if not resource["status"] or "conditions" not in resource["status"]:
return unknown

@@ -154,5 +162,5 @@

empty = Credentials(type="data", data={})
if "credentials" not in req:
if not req or "credentials" not in req:
return empty
if name not in req["credentials"]:
if not req["credentials"] or name not in req["credentials"]:
return empty

@@ -159,0 +167,0 @@ return Credentials(

@@ -1,4 +0,4 @@

Metadata-Version: 2.3
Metadata-Version: 2.4
Name: crossplane-function-sdk-python
Version: 0.5.0
Version: 0.6.0
Summary: The Python SDK for Crossplane composition functions

@@ -17,3 +17,3 @@ Project-URL: Documentation, https://github.com/crossplane/function-sdk-python#readme

Requires-Dist: grpcio==1.*
Requires-Dist: protobuf==5.27.2
Requires-Dist: protobuf==5.29.3
Requires-Dist: pydantic==2.*

@@ -20,0 +20,0 @@ Requires-Dist: structlog==24.*

@@ -22,3 +22,3 @@ [build-system]

"grpcio-reflection==1.*",
"protobuf==5.27.2",
"protobuf==5.29.3",
"pydantic==2.*",

@@ -42,3 +42,3 @@ "structlog==24.*",

path = ".venv-default"
dependencies = ["ipython==8.28.0"]
dependencies = ["ipython==8.31.0"]

@@ -49,3 +49,3 @@ [tool.hatch.envs.generate]

path = ".venv-generate"
dependencies = ["grpcio-tools==1.66.2"]
dependencies = ["grpcio-tools==1.69.0"]

@@ -68,3 +68,3 @@ [tool.hatch.envs.generate.scripts]

[tool.hatch.envs.hatch-static-analysis]
dependencies = ["ruff==0.6.9"]
dependencies = ["ruff==0.9.0"]
config-path = "none" # Disable Hatch's default Ruff config.

@@ -71,0 +71,0 @@

@@ -93,3 +93,7 @@ # Copyright 2023 The Crossplane Authors.

resource=resource.dict_to_struct(
{"spec": {"forProvider": {"region": "us-west-2"}}}
{
"apiVersion": "s3.aws.upbound.io/v1beta2",
"kind": "Bucket",
"spec": {"forProvider": {"region": "us-west-2"}},
}
),

@@ -96,0 +100,0 @@ ),

@@ -762,7 +762,7 @@ # generated by datamodel-codegen:

class Bucket(BaseModel):
apiVersion: Optional[str] = None
apiVersion: Optional[str] = 's3.aws.upbound.io/v1beta2'
"""
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
"""
kind: Optional[str] = None
kind: Optional[str] = 'Bucket'
"""

@@ -769,0 +769,0 @@ Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds