taipy.core
package
The Taipy core
package provides powerful, customized, data-driven back-end functionalities.
It provides the tools to help data scientists and Python developers transform their algorithms
into a complete back-end application. In particular, it helps with:
- Data Integration
- Task Orchestration
- What-if Analysis
- Version management
More details on the Core functionalities are available in the user manual.
To use such functionalities, the first step consists of setting up the Taipy configuration to design
your application's characteristics and behaviors. Use the Config
singleton class (from taipy.common.config
)
to configure your application. Please refer to the
data nodes,
tasks,
and scenarios pages.
Once your application is configured, import module import taipy as tp
so you can use any function described
in the following section on Function. 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 provides a runnable service, Orchestrator
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 Orchestrator
service is automatically run when 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.ScenarioId
: Type that holds aScenario
identifier.SequenceId
: Type that holds aSequence
identifier.SubmissionId
: Type that holds aSubmission
identifier.TaskId
: Type that holds aTask
identifier.Edit
: Type that holds aDataNode
edit information.
Functions¶
can_create()
: Indicate if a config section can be used to instantiate a scenario or a data node.cancel_job()
: Cancel a job and set the status of the subsequent jobs to ABANDONED.clean_all_entities()
: Deletes all entities associated with the specified version. This function cleans all entities, including jobs, submissions, scenarios, cycles, sequences, tasks, and data nodes.compare_scenarios()
: Compare the data nodes of several scenarios.create_global_data_node()
: Create and return a new GLOBAL data node from a data node configuration.create_scenario()
: Create and return a new scenario based on a scenario configuration.delete()
: Delete an entity and its nested entities.delete_job()
: Delete a job.delete_jobs()
: Delete all jobs.exists()
: Check if an entity with the specified identifier exists.get()
: Retrieve an entity by its unique identifier.get_cycles()
: Return the list of all existing cycles.get_cycles_scenarios()
: Get the scenarios grouped by cycles.get_data_nodes()
: Return all the existing data nodes.get_entities_by_config_id()
: Get the entities by its config id.get_jobs()
: Return all the existing jobs.get_latest_job()
: Return the latest job of a task.get_latest_submission()
: Return the latest submission of a scenario, sequence or task.get_parents()
: Get the parents of an entity from itself or its identifier.get_primary()
: Retrieve the primary scenario associated with a cycle.get_primary_scenarios()
: Retrieve a list of all primary scenarios.get_scenarios()
: Retrieve a list of existing scenarios filtered by cycle or tag.get_sequences()
: Return all existing sequences.get_submissions()
: Return all the existing submissions.get_tasks()
: Retrieve a list of all existing tasks.is_deletable()
: Check if aScenario
, aJob
or aSubmission
can be deleted.is_editable()
: Indicate if an entity can be edited.is_promotable()
: Determine if a scenario can be promoted to become a primary scenario.is_readable()
: Indicate if an entity can be read.is_submittable()
: Indicate if an entity can be submitted.set()
: Save or update an entity.set_primary()
: Promote a scenario as the primary scenario of its cycle.submit()
: Submit a scenario, sequence or task entity for execution.subscribe_scenario()
: Subscribe a function to be called on job status change.subscribe_sequence()
: Subscribe a function to be called on job status change.tag()
: Add a tag to a scenario.unsubscribe_scenario()
: Unsubscribe a function that is called when the status of aJob
changes.unsubscribe_sequence()
: Unsubscribe a function that is called when the status of a Job changes.untag()
: Remove a tag from a scenario.
Classes¶
Cycle
: An iteration of a recurrent work pattern.DataNode
: Reference to a dataset.Job
: Execution of aTask
.MongoDefaultDocument
: The default class for "custom_document" property to configure aMongoCollectionDataNode
.Orchestrator
: The Taipy Orchestrator service.Scenario
: Instance of a Business case to solve.Sequence
: A subset of scenario tasks grouped to be executed together independently of the others.Status
: Execution status of aJob
.Submission
: Submission of a submittable entity:Task
, aSequence
or aScenario
.SubmissionStatus
: Execution status of aSubmission
.Submittable
: Instance of an entity that can be submitted for execution.Task
: Hold a user function that will be executed, its parameters and the results.