Client for uploading and managing Functions in CIM Database Cloud.
Project description
Functions-Client
This CLI tool is used for uploading and managing Functions in CIM Database Cloud.
Installation
$ pip install contactsoftware-functions-client
Login
Before you can create environments or deploy Functions you need to login using your client-id and secret. Obtain your client credentials via the CONTACT Portal.
$ cfc login --client-id <client_id> --client-secret <client_secret>
Usage
First you need to have an environment that you can deploy your code into.
Check if you already have environments available:
$ cfc env list
or create a new one:
$ cfc env create <environment_name>
You need to create an environment.yaml
file that lists the Functions your environment should contain:
runtime: python3.10
version: v1
functions:
- name: my_function
entrypoint: main.my_function
and of course the code of your Function:
# main.py
def my_function(metadata, event, service):
...
[!NOTE] You can specify extra requirements your code has in a requirements.txt.
[!IMPORTANT] The python3.10 runtime requires you to add contactsoftware-functions to the requirements.txt unless you specify your own main_entrypoint handler. (see documentation)
Now you can deploy your code into an environment:
$ cfc env deploy <environment_name>
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
Hashes for contactsoftware_functions_client-0.4.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9fa2bfc3e12afdb8ed18c7e072034ebd16983fcbedf386dce1fb4583770ad3de |
|
MD5 | fe1c9c1e4cb13d4f2454fdced21f6d86 |
|
BLAKE2b-256 | 452663e3df3521bfc36fb28d42794abaa2ed2b8778faa0a829bc3bcf0e37adfd |
Hashes for contactsoftware_functions_client-0.4.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf90e6f440a4a45349df4574226a6547567907d92a482bda9f85b1171d4b13d1 |
|
MD5 | 7a573d30fe7b7bc1414aab0b3097d0a2 |
|
BLAKE2b-256 | a44412d969e2624708832efa99d7e07189460b385bf37745177aabb74bff6339 |