Metadata-Version: 2.1
Name: crossplane-function-sdk-python
Version: 0.1.0
Summary: The Python SDK for Crossplane composition functions
Project-URL: Documentation, https://github.com/crossplane/function-sdk-python#readme
Project-URL: Issues, https://github.com/crossplane/function-sdk-python/issues
Project-URL: Source, https://github.com/crossplane/function-sdk-python
Author-email: Crossplane Maintainers <info@crossplane.io>
License-Expression: Apache-2.0
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.11
Requires-Dist: grpcio-reflection==1.*
Requires-Dist: grpcio==1.*
Requires-Dist: structlog==23.*
Description-Content-Type: text/markdown

# function-sdk-python
[![CI](https://github.com/crossplane/function-sdk-python/actions/workflows/ci.yml/badge.svg)](https://github.com/crossplane/function-sdk-python/actions/workflows/ci.yml) ![GitHub release (latest SemVer)](https://img.shields.io/github/release/crossplane/function-sdk-python)

The [Python][python] SDK for writing [composition functions][functions].

This SDK is currently a beta. We try to avoid breaking changes, but it will not
have a stable API until it reaches v1.0.0. It follows the same [contributing
guidelines] as Crossplane.

To learn how to use this SDK:

* [Learn about how composition functions work][functions]
* [Learn about Python code generated from protocol buffers][python-protobuf]

The `RunFunctionRequest` and `RunFunctionResponse` types provided by this SDK
are generated from a proto3 protocol buffer schema. Their fields behave
similarly to built-in Python types like lists and dictionaries, but there are
some differences. Read the generated code documentation to familiarize yourself
with the the differences.

## Contributing

This project follows the Crossplane [contributing guidelines], where applicable
to Python. It is linted, tested, and built using [Hatch][hatch].

Some useful commands:

```shell
# Generate gRPC stubs.
hatch run generate:protoc

# Lint the code.
hatch run lint:check

# Run unit tests.
hatch run test:unit

# Build an sdist and wheel.
hatch build
```

[python]: https://python.org
[functions]: https://docs.crossplane.io/latest/concepts/composition-functions
[python-protobuf]: https://protobuf.dev/reference/python/python-generated/
[contributing guidelines]: https://github.com/crossplane/crossplane/tree/master/contributing
[hatch]: https://github.com/pypa/hatch
