Skip to content

Installing and managing dependencies

A Lime CRM project has a number of first and third party dependencies. To install and manage them we use a tool called Poetry.

Poetry is a tool for managing dependencies and virtual environments, as well as building and publishing your Python packages. It serves as a modern replacement for pip, making the development experience easier. This quick start guide provides the basics of using poetry for working with Lime packages and solutions.

The official documentation for poetry lives here:

pyproject.toml file

Poetry uses a single standardized pyproject.toml file to replace, requirements.txt, setup.cfg,, and Pipfile.

This file is used to store all your metadata and dependency declarations.

Dependencies and dev-dependencies are declared in their corresponding sections tool.poetry.dependencies and of the pyproject.toml file.

For newly created solutions using lime-project, the file will look similar to this:

requires      = ['poetry-core>=1.3']
build-backend = 'poetry.core.masonry.api'

display_name  = 'test'
package_name  = 'solution-test'
lib_name      = 'solution_test'

name        = 'solution-test'
version     = '0.1.0'
description = 'Lime CRM solution'
authors     = ['Author <[email protected]>']

name = 'lime'
url  = ''

'solution-test' = 'solution_test'

python = '^3.7'
lime-crm = '^2.457.0'

autopep8 = '>=1'
pytest = '>=6.2.3'
flake8 = '^3.7'
black = '^22.1.0'
isort = '^5.0.0'

project_version = '1.189.2'
project_type    = 'solution'

project_target  = 'cloud'
project_imagebaker_version = '2.38.1'
project_autoupdate = true
project_autoupdate_env = "production"

minversion = '6.0'
norecursedirs = [
faulthandler_timeout = 300

include = '\.pyi?$'
exclude = '''
  | \.venv
  | frontend
  | poetry.lock

profile = "black"
multi_line_output = 3

The lime-crm dependency

Each project always has a dependency on lime-crm, the underlying library for Lime CRM. A package should keep as broad range of versions as its dependencies, while a solution should narrow it down.

Adding dependencies

Dependencies are added running

$ poetry add [dependency]

For more information regarding options and dependency specification please see Poetry's documentation

Managing dependencies

Project dependencies must be locked in a file called poetry.lock before your project is published to the remote repo. This is done by running:

$ poetry lock

Once dependencies are lock, all following installs will use the lock-file to install dependencies. To update any dependency run:

$ poetry update [dependency]


Without the poetry.lock file will fail to build when pushed to the master branch.

Dependencies can be installed from the poetry.lock file by running:

$ poetry install


If you don't have a lock-file, running poetry install will create one

For more info on managing dependencies, refer to