Welcome to your workspace for developing Cloud Functions for the IXON Cloud. Note that creating Cloud Functions requires you to be able to write Python code.
This workspace will contain all of your different web hosted functions. You can download this repository as a ZIP file, and check it into your preferred versioning system.
- Python 3.10 or higher (Functions are run in production with Python 3.10).
- zip for building a bundle.
- curl for deploying to IXON Cloud.
- Docker for setting up a DocumentDB for development
To get started, download this project as a ZIP, and extract it to your desired location.
To run the project, no additional commands are required, as this is automatically sets up your virtual environment and installs dependencies.
make run
This project already includes an example function, which you can find in this file. Please see Developing Cloud Functions to find out how you can run and test your function.
The deployment requires a company ID and a page-component-template ID. Authorisation is also required on the endpoints used. Please refer to the Getting Started on our developer website how to obtain these (step 4., 5., and 6.) Do not forget to contact [email protected] in step 5. to set the correct Access Scopes for your Cloud Function, if it makes use of the API Client
This command creates a bundle and deploys it to IXON Cloud.
make deploy
This command requires two additional files to be created in the root of the project:
.env
, containing the company and template id. This file can be checked into version control..accesstoken
, containing a valid access token, this is the string of 32 characters that can be found in theAuthorization
header of an API call with the network inspector while browsing the IXON Portal. This file should not be checked into version control.
Example .env
file:
IXON_API_COMPANY_ID=1111-2222-3333-4444-5555
IXON_API_TEMPLATE_ID=a1b2c3d4e5f6
Example .accesstoken
file:
hAeD80dCreaZanlUkzh4nPuPpBaop3ku
Some other commands that may come in handy.
This commands sets up your virtual python environment without starting the ixoncdkingress.
make py-venv-dev
This commands cleans up your virtual python environment setup for this project.
make py-distclean
This project contains a client that can interface with a Document Store. When booting up the workspace a Docker container with a Document Store is automatically created. Every time you restart your function, the container will be removed and your document store reset.
To read more about how to use the document store please refer to: Using the Document Store