Tapyr 0.2 Update: Package Management with uv and Shiny for Python Testing API
This article is originally published at https://appsilon.com
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).
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!
The post appeared first on appsilon.com/blog/.
Thanks for visiting r-craft.org
This article is originally published at https://appsilon.com
Please visit source website for post related comments.