Package: taipy.core
¶
Taipy Core¶
The Taipy Core package is a Python library designed to build powerful, customized, data-driven back-end applications. It provides the tools to help Python developers transform their algorithms into a complete back-end application. More details on the Taipy Core functionalities are available in the user manual.
To build a Taipy Core application, the first step consists of setting up the Taipy configuration to design
your application's characteristics and behaviors.
Import Config
from the taipy.config
module, then use the various methods of the Config
singleton class to
configure your core application. In particular, configure the
data nodes, tasks,
and scenarios.
Please refer to the Core configuration user manual for more information and
detailed examples.
Once your application is configured, import module import taipy as tp
so you can use any function described
in the following function section. In particular, the most used functions are tp.create_scenario
,
tp.get_scenarios
, tp.get_data_nodes
, tp.submit
, used to get, create, and submit entities.
Note
Taipy Core provides a runnable service, Core
that runs as a service in a dedicated thread. The purpose is to
have a dedicated thread responsible for dispatching the submitted jobs to an available executor for their execution.
In particular, this Core
service is automatically run when Core is used with taipy-rest or taipy-gui. See the
running services page of the user manual for more details.
Types¶
CycleId
: Type that holds aCycle
identifier.DataNodeId
: Type that holds aDataNode
identifier.JobId
: Type that holds aJob
identifier.PipelineId
: Type that holds aPipeline
identifier.ScenarioId
: Type that holds aScenario
identifier.TaskId
: Type that holds aTask
identifier.Edit
: Type that holds aDataNode
edit information.
Functions¶
cancel_job()
: Cancel a job and set the status of the subsequent jobs to ABANDONED.clean_all_entities()
: Delete all entities from the Taipy data folder.clean_all_entities_by_version()
: Delete all entities belongs to a version from the Taipy data folder.compare_scenarios()
: Compare the data nodes of several scenarios.create_pipeline()
: Create and return a new pipeline from a pipeline configuration.create_scenario()
: Create and return a new scenario from a scenario configuration.delete()
: Delete an entity and its nested entities.delete_job()
: Delete a job.delete_jobs()
: Delete all jobs.export_scenario()
: Export all related entities of a scenario to a folder.get()
: Get an entity from its identifier.get_cycles()
: Return the list of all existing cycles.get_data_nodes()
: Return all the existing data nodes.get_jobs()
: Return all the existing jobs.get_latest_job()
: Return the latest job of a task.get_parents()
: Get the parents of an entity from itself or its identifier.get_pipelines()
: Return all existing pipelines.get_primary()
: Return the primary scenario of a cycle.get_primary_scenarios()
: Return the list of all primary scenarios.get_scenarios()
: Return the list of all existing scenarios filtered by a cycle or a tag.get_tasks()
: Return the list of all existing tasks.set()
: Save or update an entity.set_primary()
: Promote a scenario as the primary scenario of its cycle.submit()
: Submit an entity for execution.subscribe_pipeline()
: Subscribe a function to be called on job status change.subscribe_scenario()
: Subscribe a function to be called on job status change.tag()
: Add a tag to a scenario.unsubscribe_pipeline()
: Unsubscribe a function that is called when the status of a Job changes.unsubscribe_scenario()
: Unsubscribe a function that is called when the status of aJob
changes.untag()
: Remove a tag from a scenario.
Classes¶
Core
: Core serviceCycle
: An iteration of a recurrent work pattern.Job
: Execution of aTask
.Pipeline
: List ofTask
s and additional attributes representing a set of data processing elements connected as a direct acyclic graph.Scenario
: Instance of a Business case to solve.Status
: Execution status of aJob
.Task
: Hold a user function that will be executed, its parameters and the results.