#024 - Engineering with Python: 3 Practical Implementation Strategies
Python's versatility makes it an incredibly useful tool for engineers. Here's a breakdown of three common ways engineers leverage Python.
Today's discussion is succinct, focusing on the Python ecosystem's most beneficial aspects for engineers.
These days, we all work in a world of complexity and compressed timelines. Nobody has too much time. Outdated software and inefficient workflows can hold professionals back from their full potential.
Python offers a powerful solution, but effective implementation in an engineering context requires more than conventional programming instruction.
We all spin many plates. We need a clear path that makes sense.
Thatโs why Flocode is working towards a specialized learning environment focusing on practical application of Python, open-source solutions, and a collaborative community to help engineers transform their work.
The following are the three crucial areas where Python's application in engineering is most impactful. Each topic is deep but provides distinct utility once you understand the benefits.
1. Jupyter Notebooks: An Essential Tool for Engineering Innovation
Jupyter Notebooks provide a unique problem-solving environment that aligns perfectly with the way engineers think. Here's how they can augment your approach:
Understanding Through Iteration:ย Design solutions iteratively, testing assumptions/input and manipulating calculations for greater comprehension and reliable results. By tweaking and testing, you gain insight and โa feelโ.
Knowledge Sharing:ย Seamlessly combine Markdown text and LaTeX for detailed explanations, project documentation, and sharing valuable insights with your team/stakeholders. For me, the value lies in tracking my thought process. It can be easy to forget how or why youโve arrived somewhere. Notebooks are collaborative, and there are great cloud versions available to get started.
Google Colab: https://colab.research.google.com/
Kaggle: https://www.kaggle.com
GitHub Codespaces: https://github.com/features/codespaces
Comprehensive Analysis:ย Connect diverse file types and data sources to gain a holistic view of projects, facilitating well-informed decisions backed by consolidated data.
Problem-Focused Code:ย Structure projects into code cells that reflect real-world engineering problem-solving steps, making solutions easier to understand and debug.
Adaptable Workflows:ย Easily rearrange blocks of code and Markdown to experiment with different approaches, fostering a flexible process that encourages outside-the-box thinking.
To dig more deeply into Jupyter Notebooks, see my previous article ๐:
Key Takeaway: Jupyter Notebooks offer much more than running code snippets. They promote a mindset of exploration, ideal for complex engineering problems.
2. Scripting: Automating the Mundane, Connecting the Complex
Python scripting is essentially a series of instructions and logic written in Python. Itโs a powerful way to streamline engineering processes and bridge gaps between software tools. In my use cases, scripting often follows the exploratory and iterative steps developed in Jupyter Notebooks, once I have a specific process defined.
Here's how it empowers efficiency:
Focus on Outcomes:ย Automate straightforward, repetitive tasks to free up time for higher-level design and problem-solving.
Unifying Data:ย Extract outputs and data from various engineering software tools, eliminating error-prone manual data transfers and consolidating information.
Tool Integration:ย Control CAD, analysis software, and even web interfaces using Python scripts, creating a seamless and customized workflow across different platforms. My main integrations include SAP2000, Excel, ANSYS and Revit.
Tailored Processes:ย Script a wide range of engineering processes, ensuring your workflows function exactly as you need them to.
For more on automation, see ๐
#018 - Automation for Civil/Structural Engineers | Selenium
Key Takeaway: Python scripting is about creating interconnected engineering ecosystems that maximize your time and the capabilities of your existing tools.
3. App Development: Engineering Problem-Solving at Scale
This is a little more advanced but certainly 100X more approachable than it used to be. There are tools and platforms now that abstract away the vast majority of the development so that you can focus on engineering solutions.
Custom-built applications empower engineers to address specific challenges and share their innovations throughout the field. This opens possibilities for:
Impact Multiplication:ย Create tools that benefit not only you but also your colleagues and the wider engineering community, amplifying problem-solving potential.
Tailored Solutions:ย Solve niche problems with precision, where off-the-shelf software often falls short, leading to more effective outcomes.
Democratized Development:ย Streamlined app development platforms make building helpful tools accessible to engineers, driving progress from within the field. Some great examples include:
Streamlit:ย A tool that allows you to build data apps in Python.
Anvil: A platform for building full-stack web apps with nothing but Python.
Gradio: Create machine learning demos and share them with a simple UI, all in Python.
Solara: A framework for building reactive web apps with Python. Iโm a big fan of Solara. I write about it here.
Voila: Turn your Jupyter notebooks into standalone web applications.
Shiny for Python: Build interactive web apps with Python.
Viktor: Low-code platform for engineering web apps in Python and recently they added Excel integration. (Free and paid tiers)
CalcTree: Streamlined, web-based engineering calculation tool, like a combination of Notion + GitHub + Python + Excel. (Free in Beta)
Enhanced Collaboration:ย Deploy web-based apps for easy access and collaboration, promoting knowledge sharing and problem-solving at scale.
Key Takeaway: App development puts the power to create specialized engineering solutions directly in the hands of those who understand the problems most intimately.
Whether you already use all three methods in your work or you are just getting started, there is much to uncover with Python for engineering.
Building an Engineering-Centric Python Community
Flocode is working toward a community where engineers can connect, collaborate, and inspire each other to push the boundaries of their work. By fostering this knowledge-sharing environment, we aim to:
Break Down Silos
Accelerate Learning
Drive Innovation
Join the Community
I invite you to join Flocode and discover how Python can become a driving force in your engineering career. I will have more specifics coming soon regarding the Beta Program. For those that want a head start on applying, you can sign up below.
Weโre all in this together.
See you in the next one.
James ๐