Login
Back to bricks list
Introduction Version

Pip env live task

TASK
Typing name :  TASK.gws_core.PyPipenvLiveTask Brick :  gws_core v

Live task to run Python snippets in a pipenv shell environment.

Pipenv-based Python live tasks allow to execute Python snippets on the fly in isolated Pipenv environments.

Live tasks are fast and efficient tools to develop, test, use and share code snippets.

Warning: It is recommended to use code snippets comming from trusted sources.

Here is the general documentation for live task (including how to use the parameters): https://constellab.community/bricks/gws_core/latest/doc/developer-guide/live-task/getting-started

Here is the documentation of the live task: https://constellab.community/bricks/gws_core/latest/doc/developer-guide/live-task/env-live-task

Input

File or folder
Optional

Output

File or folder

Configuration

params

Optional

Please give one parameter definition per line (https://constellab.community/bricks/gws_core/latest/doc/developer-guide/live-task/getting-started#parameters)

Type : listDefault value : 

env

Optional

Pipenv configuration

Type : python_code_paramDefault value : [[source]] url = 'https://pypi.python.org/simple' verify_ssl = true name = 'pypi' [requires] python_version = '3.8' [packages] pandas = '==1.5.2'

code

Optional

The code snippet to execute using shell command

Type : python_code_paramDefault value : # This is a snippet template for a Python live task. import pandas # Do the job here ... data = pandas.read_csv(source_paths[0], header=0, index_col=0, sep=',') # transform the data result = data.transpose() # Write the output file in the target folder result_path = "result.csv" result.to_csv(result_path, index=True) target_paths = [result_path]