Intermediate Tutorials#

Welcome to the Intermediate Tutorials!

Ready to take your Panel skills to the next level? Dive into these tutorials to explore advanced features, best practices, and techniques for building robust and scalable apps with Panel. Whether you’re aiming for better code organization, improved performance, or exploring additional topics, we’ve got you covered!

Prerequisites#

Before delving into the intermediate tutorials, ensure you have a solid understanding of Panel basics. If not, refer to our Basic Tutorial to get started.

Please execute the following command to install the dependencies required by the basic tutorials:

pip install altair hvplot numpy pandas panel pytest watchfiles
conda install -y -c conda-forge altair hvplot numpy pandas panel pytest watchfiles

Important

Is Panel installed together with JupyterLab/Jupyter Notebook in your working environment? If not, you need to make sure that panel is also installed in the same environment as JupyterLab/Jupyter Notebook (pip install panel or conda install panel).

Mastering Intermediate Panel Techniques#

Ready to transition from being a basic to an intermediate Panel user? Let’s uncover techniques for constructing reusable components and structuring your projects with maintainability in mind:

  • Reactive Parameters: Discover why Panel is built on top of Reactive Parameters and how to effectively utilize them.

  • Create Reusable Components: Develop reusable Panel components using the Viewer class.

  • Advanced Interactivity: Harness the power of Parameters and parameter dependencies to infuse interactivity.

  • Introduce Side Effects: Infuse your apps with additional functionality using .watch and watch=True.

  • Structuring with DataStore: Employ the DataStore pattern to organize larger applications efficiently.

  • Organize your Project: Maintain orderliness in larger applications by compartmentalizing them into multiple modules and folders.

Enhancing Performance#

Supercharge your app’s performance through asynchronous programming, threaded operations, and efficient task scheduling:

  • Schedule Tasks: Leverage functionalities such as pn.state.onload, pn.state.schedule_task, pn.state.add_periodic_callback, pn.state.on_session_created, pn.state.on_session_destroyed, async generators, and pn.state.execute.

  • Concurrent Execution: Unleash the full potential of Panel by embracing threads and async operations to execute tasks concurrently.

Exploring Additional Topics#

Embark on a deeper exploration of supplementary topics to further hone your Panel development prowess:

Projects#

Now that you’ve mastered the more advanced concepts of Panel, it’s time to put your skills to the test:

  • Create an Interactive Report: Elevate the interactivity of your reports through embedding.

  • Create a Todo App: Create a Todo App using a class based approach.

  • Test a Todo App: Learn how to test a class based Panel app.

  • Serve Apps without a Server: Explore the realm of WASM to serve your apps without traditional servers.

  • Build a Server Video Stream: Utilize threading to set up a video stream from a camera connected to a server without blocking the UI.

Community Tutorials#