Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos in docs #1

Merged
merged 8 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Functions are deeply integrated in the CIM Database Cloud Webhooks technology. T

**Documentation:** https://cslab.github.io/functions-sdk-python/

**Source code:** https://github.com/cslab/functions-sdk-python

## Requirements

Python 3.10+
Expand Down
11 changes: 7 additions & 4 deletions docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pip install contactsoftware-functions
A minimal Function implementation consists of three files:

- `environment.yaml` describes the environment and the Functions contained in it
- `requirements.txt` contains the dependencies of you Functions (usually only contactsoftware-functions)
- `requirements.txt` contains the dependencies of your Functions (usually only contactsoftware-functions)
- `mymodule.py` a Python file containing the code of your Functions (feel free to pick a different name)

Here is the complete structure:
Expand All @@ -37,7 +37,7 @@ def send_doc_to_erp(metadata: MetaData, event: DocumentReleaseEvent, service: Se
```

While you don't have to use type annotations, it is highly recommended because it enables autocomplete in your IDE and helps you spot mistakes faster.
For our example we only need the DocumentReleaseEvent. It contains a list of documents that were released. Typically this will only be a single document, however it is best practices to iterate over all of the documents.
For our example we only need the [DocumentReleaseEvent](reference/events.md/#documentreleaseevent). It contains a list of documents that were released. Typically this will only be a single document, however it is best practices to iterate over all of the documents.

``` python title="mymodule.py"
import requests
Expand All @@ -61,6 +61,9 @@ def send_doc_to_erp(metadata: MetaData, event: DocumentReleaseEvent, service: Se

```

Here we send a payload, containing a few attributes from the released document, to [example.com](https://example.com). This is just for illustration purposes!
Please refer to the documentation of your ERP system on how the request needs to be formatted and which endpoint and credentials to use.

### Register the Function

The Function needs to be registered in the `environment.yaml`:
Expand Down Expand Up @@ -113,6 +116,6 @@ Upload code into new environment:
cfc env deploy myenv
```

### Test the function
To test your function you need to connect the Function to an event in your CIM Database Cloud instance.
### Test the Function
To test your Function you need to connect the Function to an event in your CIM Database Cloud instance.
Please refer to the Webhooks CIM Database Cloud documentation on how to do that.
4 changes: 2 additions & 2 deletions docs/reference/runtime.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
This section is aimed at developers that want to build their own Functions-SDK.
If are building Functions with **csfunctions** you can skip this part.
If you are building Functions with **csfunctions** you can skip this part.

## Architecture
Function environment are docker containers that run in AWS-lambda. The Python runtime utilizes awslambdaric to handle the requests. The Python runtime is part of the CIM Database Cloud Functions infrastructure and currently cannot be customized.
Expand Down Expand Up @@ -38,4 +38,4 @@ The return value of the execute method is the json encoded response payload.

## Payloads

The Request and response payloads are described in the CIM Database Cloud documentation. The functions-sdk-python GitHub repository also contains the complete JSON-schema files.
The Request and response payloads are described in the CIM Database Cloud documentation. The [functions-sdk-python](https://github.com/cslab/functions-sdk-python) GitHub repository also contains the complete [JSON-schema files](https://github.com/cslab/functions-sdk-python/tree/main/json_schemas).
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ authors = [
"Jens Kürten <[email protected]>"
]
description = "Library for creating Functions for CIM Database Cloud."
repository = "https://github.com/cslab/functions-sdk-python"
documentation = "https://cslab.github.io/functions-sdk-python/"

packages = [
{ include = "csfunctions"}
Expand Down
Loading