MCPcopy
hub / github.com/Avaiga/taipy

github.com/Avaiga/taipy @4.1.2-gui sqlite

repository ↗ · DeepWiki ↗ · release 4.1.2-gui ↗
5,958 symbols 30,664 edges 1,181 files 815 documented · 14%
README

Hacktoberfest_clickable

<img alt="Taipy" src="https://github.com/Avaiga/taipy/assets/100117126/4df8a733-d8d0-4893-acf0-d24ef9e8b58a" width="300" />

Build Python Data & AI web applications

From simple pilots to production-ready web applications in no time.

No more compromise on performance, customization, and scalability.

Go beyond existing libraries

📚 Explore the docs 🫱🏼‍🫲🏼 Discord support 👀 Demos & Examples

 

⭐️ What's Taipy?

Taipy is designed for data scientists and machine learning engineers to build data & AI web applications.  

⭐️ Enables building production-ready web applications.

⭐️ No need to learn new languages. Only Python is needed.

⭐️ Concentrate on Data and AI algorithms without development and deployment complexities.

 

Taipy is a Two-in-One Tool for UI Generation and Scenario/Data Management

User Interface Generation Scenario and Data Management
Interface Animation Back-End Animation

 

✨ Key Features

Scenario Banner Back-End Animation Back-End Animation

 

⚙️ Quickstart

To install the Taipy stable release run:

pip install taipy

Ready to Install Taipy? 🚀

Get everything set up in no time! Whether you're using a Conda environment or installing from source, follow our Installation Guide for step-by-step instructions.

Excited to Dive In? 💡

Start building with Taipy today! Our [Getting Started Guide]https://docs.taipy.io/en/develop/tutorials/getting_started/) is the perfect place to begin your journey and unlock the full potential of Taipy.

 

🔌 Scenario and Data Management

Let's create a scenario in Taipy that allows you to filter movie data based on your chosen genre.

This scenario is designed as a straightforward pipeline.

Every time you change your genre selection, the scenario runs to process your request.

It then displays the top seven most popular movies in that genre.

⚠️ Keep in mind, in this example, we're using a very basic pipeline that consists of just one task. However,

Taipy is capable of handling much more complex pipelines 🚀

Below is our filter function. This is a typical Python function and it's the only task used in this scenario.

def filter_genre(initial_dataset: pd.DataFrame, selected_genre):
    filtered_dataset = initial_dataset[initial_dataset['genres'].str.contains(selected_genre)]
    filtered_data = filtered_dataset.nlargest(7, 'Popularity %')
    return filtered_data

This is the execution graph of the scenario we are implementing

Taipy Studio

You can use the Taipy Studio extension in Visual Studio Code to configure your scenario with no code

Your configuration is automatically saved as a TOML file.

Check out Taipy Studio Documentation

For more advanced use cases or if you prefer coding your configurations instead of using Taipy Studio,

Check out the movie genre demo scenario creation with this Demo.

TaipyStudio

 

User Interface Generation and Scenario & Data Management

This simple Taipy application demonstrates how to create a basic film recommendation system using Taipy.

The application filters a dataset of films based on the user's selected genre and displays the top seven films in that genre by popularity. Here is the full code for both the front-end and back-end of the application.

import taipy as tp
import pandas as pd
from taipy import Config, Scope, Gui

# Defining the helper functions

# Callback definition - submits scenario with genre selection
def on_genre_selected(state):
    scenario.selected_genre_node.write(state.selected_genre)
    tp.submit(scenario)
    state.df = scenario.filtered_data.read()

## Set initial value to Action
def on_init(state):
    on_genre_selected(state)

# Filtering function - task
def filter_genre(initial_dataset: pd.DataFrame, selected_genre):
    filtered_dataset = initial_dataset[initial_dataset["genres"].str.contains(selected_genre)]
    filtered_data = filtered_dataset.nlargest(7, "Popularity %")
    return filtered_data

# The main script
if __name__ == "__main__":
    # Taipy Scenario & Data Management

    # Load the configuration made with Taipy Studio
    Config.load("config.toml")
    scenario_cfg = Config.scenarios["scenario"]

    # Start Taipy Orchestrator
    tp.Orchestrator().run()

    # Create a scenario
    scenario = tp.create_scenario(scenario_cfg)

    # Taipy User Interface
    # Let's add a GUI to our Scenario Management for a full application

    # Get the list of genres
    genres = [
        "Action", "Adventure", "Animation", "Children", "Comedy", "Fantasy", "IMAX"
        "Romance", "Sci-FI", "Western", "Crime", "Mystery", "Drama", "Horror", "Thriller", "Film-Noir", "War", "Musical", "Documentary"
    ]

    # Initialization of variables
    df = pd.DataFrame(columns=["Title", "Popularity %"])
    selected_genre = "Action"

    # User interface definition
    my_page = """
# Film recommendation

## Choose your favorite genre
<|{selected_genre}|selector|lov={genres}|on_change=on_genre_selected|dropdown|>

## Here are the top seven picks by popularity
<|{df}|chart|x=Title|y=Popularity %|type=bar|title=Film Popularity|>
    """

    Gui(page=my_page).run()

And the final result:

 

⚒️ Contributing

Want to help build Taipy? Check out our Contributing Guide.

🪄 Code of conduct

Want to be part of the Taipy community? Check out our Code of Conduct

🪪 License

Copyright 2021-2024 Avaiga Private Limited

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Apache License

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Extension points exported contracts — how you extend this code

ChildrenProps (Interface)
(no doc)
frontend/taipy-gui/test-config/markdown.tsx
ScenarioDict (Interface)
(no doc)
frontend/taipy/src/ScenarioSelector.tsx
ColoredLabelProps (Interface)
(no doc)
doc/gui/extension/example_library/front-end/src/ColoredLabel.tsx
MultipleUpdatePayload (Interface)
(no doc)
frontend/taipy-gui/base/src/wsAdapter.ts
ScenarioSelectorProps (Interface)
(no doc)
frontend/taipy/src/ScenarioSelector.tsx
AlertMessage (Interface)
(no doc)
frontend/taipy-gui/base/src/wsAdapter.ts
ScenarioEditDialogProps (Interface)
(no doc)
frontend/taipy/src/ScenarioSelector.tsx
VarData (Interface)
(no doc)
frontend/taipy-gui/base/src/dataManager.ts

Core symbols most depended-on inside this repo

get
called by 1007
taipy/gui/utils/types.py
_get
called by 442
taipy/core/_manager/_manager.py
_build_manager
called by 409
taipy/core/_manager/_manager_factory.py
read
called by 396
tests/core/utils/named_temporary_file.py
_get_all
called by 353
taipy/core/_manager/_manager.py
_set
called by 327
taipy/core/_manager/_manager.py
append
called by 305
taipy/core/data/data_node.py
write
called by 290
taipy/core/data/data_node.py

Shape

Method 2,871
Function 2,252
Class 621
Interface 170
Route 34
Enum 10

Languages

Python90%
TypeScript10%

Modules by API surface

taipy/gui/gui.py171 symbols
taipy/core/exceptions/exceptions.py91 symbols
tests/core/test_taipy.py59 symbols
taipy/gui/_renderers/builder.py56 symbols
frontend/taipy-gui/src/context/taipyReducers.ts55 symbols
taipy/core/job/job.py54 symbols
taipy/gui_core/_adapters.py53 symbols
taipy/core/scenario/scenario.py52 symbols
taipy/core/data/data_node.py50 symbols
taipy/gui_core/_context.py48 symbols
taipy/gui/utils/types.py48 symbols
tests/core/scenario/test_scenario_manager.py44 symbols

Dependencies from manifests, versioned

@emotion/react11.10.0 · 1×
@emotion/styled11.10.0 · 1×
@mui/icons-material6.0.1 · 1×
@mui/material6.0.1 · 1×
@mui/x-date-pickers7.0.0 · 1×
@mui/x-tree-view7.0.0 · 1×
@projectstorm/react-diagrams7.0.2 · 1×
@testing-library/jest-dom6.1.3 · 1×
@testing-library/react16.0.0 · 1×
@testing-library/user-event14.2.1 · 1×
@types/css-mediaquery0.1.1 · 1×
@types/jest29.0.1 · 1×

Datastores touched

(mysql)Database · 1 repos
(mongodb)Database · 1 repos
taipyDatabase · 1 repos

For agents

$ claude mcp add taipy \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact