
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
contactsoftware-functions
Advanced tools
Supply Chain Security
Vulnerability
Quality
Maintenance
License
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Unpopular package
QualityThis package is not very popular.
Found 1 instance in 1 package
This SDK provides the csfunctions library for developing Functions with Python.
Functions are deeply integrated in the CIM Database Cloud Webhooks technology. They are designed to work seamlessly together. The goal is to allow implementing custom business logic in a CIM Database Cloud SaaS application without leaving the CONTACT Cloud and without the need to create and maintain a separate infrastructure.
Documentation: https://cslab.github.io/functions-sdk-python/
Source code: https://github.com/cslab/functions-sdk-python
Python 3.10+
csfunctions is build with Pydantic 2
Install using pip:
pip install contactsoftware-functions
Folder content of a minimal example for a Function implementation:
my_example_functions/
├── environment.yaml
├── mymodule.py
└── requirements.txt
Code for a Function:
import requests
import json
from csfunctions import MetaData, Service
from csfunctions.events import DocumentReleaseEvent
def send_doc_to_erp(metadata: MetaData, event: DocumentReleaseEvent, service: Service):
# iterate over the documents contained in the event
for document in event.data.documents:
# create the payload for our (fictional ERP system)
payload = json.dumps({
"document_number": document.z_nummer,
"document_index": document.z_index,
"document_title": document.titel
})
res = requests.post("https://example.com", data=payload)
if res.status_code != 200:
return ValueError(f"Failed to upload document to ERP. Got response code {res.status_code}")
Environment file to define runtime and Function entrypoints:
runtime: python3.10
version: v1
functions:
- name: send_doc_to_erp
entrypoint: mymodule.send_doc_to_erp
Define requirements:
contactsoftware-functions
To deploy the Code you first need to install the contactsoftware-functions-client and retrieve developer credentials in the CONTACT Portal.
Install client:
pip install contactsoftware-functions-client
Login:
cfc login
Create a new environment:
cfc env create myenv
Upload code into new environment:
cfc env deploy myenv
FAQs
Library for creating Functions for CIM Database Cloud.
We found that contactsoftware-functions demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.