Tapyr 0.2 Update: Package Management with uv and Shiny for Python Testing API

Reading time:
time
min

We're thrilled to announce the release of Tapyr 0.2, a major update that incorporates valuable feedback from the Shiny for Python developer community. 

Learn how Tapyr enhances Shiny for Python in our Open Source Spotlight. See how it simplifies deployment for Shiny apps.

This version focuses on improving the developer experience by refining package management, enhancing testing capabilities, and updating documentation.

Switching to uv for Package Management

In this release, we’ve replaced poetry with uv as the primary tool for package management. Although poetry remains a solid option, we found uv to be better suited for the needs of data scientists, offering a more streamlined workflow.

  • Why uv?
    uv aligns better with typical data science use cases, simplifying dependency management and reducing time spent on configuration.
  • Performance Comparison
    With uv, resolving Tapyr environment is significantly faster, clocking in at 4.9 seconds compared to 103 seconds (!) while using poetry (times without .lock files).
speed comparison, 4.9s vs 103s of tapyr template environment recreation

We encourage new projects to adopt uv for a more efficient experience. 

However, existing projects can continue using poetry without issues. For more insights, explore the direct comparison between uv and poetry.

Seamless Testing with Shiny for Python API

With the Shiny for Python 1.0 release, developers now have access to a new, user-friendly Testing API. Built on top of Playwright, this API simplifies interaction with UI components like buttons, sliders, and text inputs, making automated testing more intuitive.

  • Transitioning from Playwright
    Since Tapyr already leverages Playwright, the transition to the new Testing API was seamless. This shift allowed us to reduce dependencies and streamline our codebase.
  • Improved Startup Tests
    In this release, we introduced new startup tests to verify that the application launches error-free.
Explore more about the Testing API and Playwright transition.

Improved Documentation for Developers

Our documentation has received several enhancements to make Tapyr easier to use. Key improvements include:

  • Instructions for adding external dependencies to devcontainer.
  • Options for using Tapyr without devcontainer, uv, or poetry.
  • Best practices for leveraging pydantic-settings for configuration management.

These updates ensure that whether you are a new user or a seasoned developer, you’ll have all the tools and information needed to get the most out of Tapyr.

Check out our guide to deploying Tapyr-built Shiny for Python apps to Posit Connect. Here's how it can simplify your deployment. 

Summing Up Tapyr 0.2 Update

Tapyr 0.2 is a step toward our Tapyr 1.0 release. The improvements in package management and testing API make it easier than ever to build and maintain applications using Tapyr. 

We look forward to continuing this journey with the community and delivering even more features in future releases.

Learn more about our other open-source packages in the Rhinoverse. Create powerful Shiny apps with a dependable set of tools by your side! 

Have questions or insights?

Engage with experts, share ideas and take your data journey to the next level!

Is Your Software GxP Compliant?

Download a checklist designed for clinical managers in data departments to make sure that software meets requirements for FDA and EMA submissions.

Sign up for ShinyWeekly

Join 4,2k explorers and get the Shiny Weekly Newsletter into your mailbox
for the latest in R/Shiny and Data Science.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Explore Possibilities

Share Your Data Goals with Us

From advanced analytics to platform development and pharma consulting, we craft solutions tailored to your needs.

Talk to our Experts
open source
python