Dependencies
Leverage existing solutions. The software development ecosystem offers a wealth of powerful libraries that can significantly enhance your development process and productivity.
To incorporate these libraries into your YepCode processes, simply specify the package name and version in the dedicated editor accessible through your team settings. This streamlined approach allows you to effortlessly integrate and utilize external dependencies:
We allow to use any npmjs packages, that must be provided with the package.json
format.

We allow to use any Pypi packages, that must be provided with the requirements.txt
format.

When you perform a dependency change, YepCode proceeds to install them, but process executions will use the previous version until we ensure that the installation has been successfully completed.
Dependencies scope
Section titled “Dependencies scope”Dependencies will be global for your team by default, but if you need to use process scoped dependencies, you may do that enabling the flag under process dependencies settings.

Dependencies guessing
Section titled “Dependencies guessing”YepCode tries to guess the dependencies you use in your process and modules. You’ll see an alert if we detect that you’re using a dependency that is not installed on your team:

Just clicking the alert will open the dependencies editor where you can add the missing dependencies, and if you use the ‘Add’ button, we’ll use the last available version of the dependency.
Use @add-package comment
Section titled “Use @add-package comment”Sometimes, the dependencies guessing is not enough. You can use the @add-package
comment to manually add a dependency to your process. You can even set the version of the dependency with the syntax @add-package <package-name>=<version>
.
Some samples about how to use it:
// @add-package openaiconst OpenAI = require('openai');
const client = new OpenAI({ apiKey: yepcode.env.OPENAI_API_KEY,});
async function main() { const chatCompletion = await client.chat.completions.create({ messages: [{ role: 'user', content: 'Say this is a test' }], model: 'gpt-4o', });}
main();
// @add-package openai=4.79.1const OpenAI = require('openai');
...
# @add-package openaifrom openai import OpenAI
client = OpenAI( api_key=yepcode.env.OPENAI_API_KEY)
chat_completion = client.chat.completions.create( messages=[ { "role": "user", "content": "Say this is a test", } ], model="gpt-4o",)
# @add-package openai=1.59.8from openai import OpenAI
client = OpenAI( api_key=yepcode.env.OPENAI_API_KEY)
...