Package: taipy
Welcome to TaipyTurns Data and AI algorithms into full web applications in no time.How? Taipy GUI with Taipy Core pops out as a 360° platform to build production-ready web applicationsOpen Source, 100% Python📊 We make both ends meet ⚙️TAIPY GUI - the frond-endTAIPY Core - the back-endInstallationOpen a terminal and run:$pipinstalltaipyYou're all set! All aboard the Taipy journey 🚂CommunityJoin ourDiscordto give us feedback, share your creations or just to have a chat with us.Ready, Set, GUITiny Taipy GUI DemofromtaipyimportGuiexcitement_page="""# Welcome to Taipy## Getting started with Taipy GUI### How excited are you to try Taipy?<|{excitement}|slider|min=1|max=100|>My excitement level: <|{excitement}|text|>"""excitement=100Gui(page=excitement_page).run()RUN🏃🏽‍♀️🎊 TA-DA! 🎊Find out moreCheck out ourGetting StartedandDocumentationEN-CORE?Let's create a back-end execution, also calledscenariousing Taipy Core. Our scenario will filter movie data based on the genre you choose. This scenario will be submitted (i.e., executed) each time the genre selection changes and output the seven most popular movies of that genre.Here is our filter function: a standard Python function that is used by the unique task in the scenariodeffilter_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 %')returnfiltered_dataThis is the execution graph of the scenario we are implementingTaipy Studio - The easy peasy wayYou can use the Taipy Studio extension in VSCode to configure your sequence with no codeYour configuration is automatically saved as a TOML fileFind out moreCheck out ourGetting StartedandDocumentationTaipy Core - a walk on the code sideFor more advanced use cases or if you prefer coding your configurations instead of using Taipy Studio, Taipy has your back!Check out the movie genre demo scenario creation with thisDemoFind out moreCheck out ourGetting StartedandDocumentationFront-end ➕ Back-endNow, let's load this configuration and add a user interface on top for a 🎉FULL APPLICATION🎉importtaipyastpimportpandasaspdfromtaipyimportConfig,Scope,Gui# TAIPY Core# Filtering function - taskdeffilter_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 %')returnfiltered_data# Load the configuration made with Taipy StudioConfig.load('config.toml')scenario_cfg=Config.scenarios['scenario']# Start Taipy Core servicetp.Core().run()# Create a scenarioscenario=tp.create_scenario(scenario_cfg)# TAIPY GUI# Let's add Taipy GUI to our Taipy Core for a full application# Callback definition - submits scenario with genre selectiondefon_genre_selected(state):scenario.selected_genre_node.write(state.selected_genre)tp.submit(scenario)state.df=scenario.filtered_data.read()# Get list of genresgenres=['Action','Adventure','Animation','Children','Comedy','Fantasy','IMAX''Romance','Sci-FI','Western','Crime','Mystery','Drama','Horror','Thriller','Film-Noir','War','Musical','Documentary']# Initialization of variablesdf=pd.DataFrame(columns=['Title','Popularity %'])selected_genre=None# User interface definitionmy_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()RUN🏃🏽‍♀️🎊TA-DA!🎊Contributing ⚒⚒Want to help buildTaipy? Check out ourCONTRIBUTING.mdfile.Code of conductWant to be part of theTaipycommunity? Check out ourCODE_OF_CONDUCT.mdfile.LicenseCopyright 2023 Avaiga Private LimitedLicensed 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 athttp://www.apache.org/licenses/LICENSE-2.0Unless 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.