Skip to content

Installation

Installation

kyoslib_py package is published to and can be installed from PyPI. The advantage of this approach is that it allows a developer to ensure the same Prototype model behavior and result on the KYOS server as on their local computer. The reason is that the virtual environment created by the KYOS server to run a Prototype model is 100% reproducible on the local environment.

The desired version of kyoslib_py can be included in the project's dependencies file. Bellow the instructions for installing the package with either poetry or pipenv package manager, or using pip.

Poetry

For example, if the desired package version is 4.0.2, then the content of the Poetry pyproject.toml is:

[tool.poetry]
name = "my_project"
version = "0.1.0"
description = ""
authors = ["Jane Doe <janedoe@example.com>"]

[tool.poetry.dependencies]
python = ">=3.7,<3.10"
kyoslib_py = "^4.0.2"
pandas = "^1.0.5"

[tool.poetry.dev-dependencies]

[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"

If the model is run locally first with such dependencies, then the generated poetry.lock file can be uploaded in the Prototype profile definition, to ensure faster build times.

Pipenv

Similarly, the same can be done using pipenv with the following Pipfile:

[[source]]
url = 'https://pypi.python.org/simple'
verify_ssl = true
name = 'pypi'

[requires]
python_version = '3.7'

[packages]
pandas = '==1.0.5'
kyoslib_py = "==4.0.2"

If the model is run locally first with such dependencies, then the generated Pipfile.lock file can be uploaded in the Prototype profile definition, to ensure faster build times.

Pip

To install kyoslib_py using pip, add the following 2 lines in your requirements.txt:

kyoslib_py==4.0.2

To install from command line, you can run:

pip install kyoslib_py