Code packages
Add code packages to Middle to streamline your coding
Last updated
Add code packages to Middle to streamline your coding
Last updated
Code Packages and Helper Functions
When writing your scripts for Records and Actions, you may want to import certain Python libraries or helper functions. Middle can support two import methods: code packages and upload mode.
Code Packages
The Code Packages section of your Middle app is useful when you want to upload Python code that can be accessed by all actions and scripts. You could upload your own Python file that has helper functions for your syncs, or you can upload helper libraries for the app you are integrating with.
To create a Code Package, click + Create next to Code Packages on the navigation bar.
Configure a code package with a name and description to explain its purpose. The Live boolean should be switched on when you want your scripts to access the package (all scripts must be re-saved to access it).
A code package must be uploaded as a zip archive. The Python files within the package can be accessed by using an import statement within your action and poll sync scripts.