Want to share your content on R-bloggers? click here if you have a blog, or here if you don’t.
Are you an R/Shiny user looking to leverage the incredible capabilities of Shiny for Python without sacrificing the familiarity and comfort of your existing tools?
Introducing Tapyr—our Shiny for Python framework. It brings Rhino-like capabilities from the R world and more to the Shiny for Python ecosystem, helping you build enterprise-ready applications with ease.
Curious about Shiny for Python from an R Shiny dev’s perspective? Check out this blog post to learn more.
Tapyr is designed as a lightweight template repository for PyShiny projects that offers tools similar to Rhino for R/Shiny. For instance, Tapyr introduces poetry
, which handles project dependencies much like renv
in R. This ensures that R users can smoothly adapt to Python without tackling a steep learning curve while adhering to best practices from day 0.
Key Features of Tapyr
- Leverage Python Tools: Tapyr takes advantage of Python’s ecosystem tools, including ruff, pytest, and others.
- Enterprise-Ready Applications, Made Easy: The framework is tailored for building robust, scalable, and production-ready applications.
- Comprehensive Testing with Playwright: Say goodbye to the hassle of juggling multiple languages for end-to-end testing. Tapyr leverages Playwright, integrated with pytest, allowing you to write all tests in Python – a streamlined approach that keeps your coding practices consistent and efficient.
- Static Type Checking with PyRight: Improve code quality and reduce bugs with PyRight, a static type checking feature not available in R. This proactive error detection ensures your applications are reliable, before you even start them.
Complementing Existing Resources
While Posit’s PyShiny templates cater to exploratory data analysis, Tapyr serves a distinct, complementary role by providing a structured repository designed to kickstart your projects. This approach focuses on developing comprehensive, scalable and future-proof applications.
This not only expands the tools available to data scientists and developers but also helps you to tackle larger, more complex projects effectively.
Tapyr is ideal for data scientists (transitioning from R to Python), developers familiar with Shiny and Rhino building projects in PyShiny, and academic researchers and enterprise professionals requiring enterprise-level dashboard frameworks.
Getting Started with Tapyr
Using Devcontainer
We recommend using the Dev Container configuration with Visual Studio Code (VS Code) or DevPod to ensure a consistent development experience across different computers and environments. It may sound complicated, but it is as easy as a breeze!
The Dev Container is like a virtual environment with everything you need to work on the project, including all the required software and dependencies.
- Install Dev Containers extension if you don’t have it already.
- Clone the repository and start the dev container: You can clone the Tapyr repository from GitHub or download the source code. some text
- Navigate to the project directory and open the project in VS Code.
- Select “Reopen in Container” when prompted.
- If you’re prompted to “Reopen in Container,” select that option. If not, you can open the Command Palette (
Ctrl+Shift+P
on Windows/Linux, orCmd+Shift+P
on Mac) and choose “Remote-Containers: Reopen in Container.” - If you’re using DevPod, follow their instructions to start the Devcontainer.
- Activate the virtual environment: Once the Dev Container is running, you’ll need to activate the virtual environment (creating a special workspace where all the project’s dependencies are installed). Run the following command:
poetry shell
- Run the application: Now you’re ready to run the application! Use this command:
shiny run app.py --reload
This will start the application and automatically reload it whenever you make changes to the code.
- Execute tests: To run tests and ensure everything is working correctly, use this command:
poetry run pytest
If you prefer to run this locally, you can do so using Poetry.
Struggling with Quality Assurance for your Shiny for Python Dashboards? Check out this blog post to learn more about leveraging Playwright.
Get Started Today
Dive into Tapyr and start building your enterprise-level applications today!
Download Tapyr, check out the documentation, explore its functionalities, and join the community of innovators expanding their PyShiny skillsets.
We value your feedback, so please share your experiences and suggestions to help us improve Tapyr in our Shiny community.
Want to stay up to date with Tapyr and other packages? Join 4.2k explorers and get the Shiny Weekly Newsletter into your mailbox.
FAQs
Q: Is there a community or support available for Tapyr users?
A: You can create a pull request, open an issue, follow our documentation, and engage with other users in our community to get support, share insights, and contribute to the project’s development.
Q: How is Tapyr different from Posit’s PyShiny templates?
A: While Posit’s PyShiny templates focus on exploratory data analysis, Tapyr is a framework focused on building comprehensive, scalable PyShiny applications.
Q: How does Tapyr compare to other tools like reticulate?
A: While reticulate allows you to call Python from R, Tapyr takes a different approach by providing a streamlined framework for building enterprise-ready applications using Shiny for Python. Since all the code is written in Python, it offers features like static type checking, comprehensive testing with Playwright, and seamless integration with Python ecosystems.
The post appeared first on appsilon.com/blog/.
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you’re looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don’t.
Continue reading: Introducing Tapyr: Create and Deploy Enterprise-Ready PyShiny Dashboards with Ease
Future Implications and Developments of Tapyr
With the introduction of Tapyr, R/Shiny users can leverage the capabilities of Shiny for Python without sacrificing the comfort of their existing tools. This framework allows users to build robust, enterprise-ready applications with ease. In the future, such solutions may revolutionize the way data scientists and developers work, providing a more streamlined, efficient approach to coding. Here are the potential long-term implications and future advancements of this technology.
The Future of Enterprise Applications
Tapyr is geared for building robust, scalable, and production-ready applications, which are essential features for enterprise solutions. Not only does this framework ensure the reliability of your applications with static type checking, but it also simplifies the testing process with integrated technologies such as Playwright and Pytest. As a result, we could see more businesses adopting Shiny for Python with Tapyr for creating reliable and scalable enterprise applications.
A New Era for Data Scientists and Developers
With Tapyr serving a distinct, complementary role by providing a structured repository designed to kickstart projects, this not only expands the tools available to data scientists and developers but also helps to tackle larger, more complex projects effectively. This sets the stage for greater productivity and efficiency among data scientists and developers who are transitioning from R to Python or who are familiar with Shiny and Rhino.
Promising Future Developments
There are also exciting possibilities for future developments. As Tapyr continues to evolve based on user feedback and technological advancements, we may witness the integration of more sophisticated features and capabilities. Furthermore, there may be advancements in the way Tapyr handles project dependencies to give developers an even smoother transition from R to Python.
Actionable Advice Based on Insights
Given these potential future developments and implications, here are some actionable steps to consider:
- For developers and data scientists using R/Shiny, it could be worthwhile to familiarize oneself with Tapyr and its possibilities. The capabilities of this framework may significantly streamline your work process.
- If you are transitioning from R to Python, consider using Tapyr as it offers a smooth transition with its tools like poetry that manage project dependencies similar to renv in R.
- Business owners and solutions architects in the enterprise should explore the possibility of using Shiny for Python with Tapyr to build scalable, robust, and production-ready applications. This includes leveraging Tapyr’s Devcontainer setup for a consistent development experience across different devices and environments.
- Take advantage of the Tapyr community, including opening a pull request, engaging with other users, and sharing insights to contribute to the project’s development and improvement.
In conclusion, Tapyr, Shiny for Python, offers a promising foundation for building enterprise-ready applications, and its future advancements could further revolutionize the field of data science and development.
Read the original article