Best of Python — October 2023
- 1
- 2
- 3
LambdaTest·3y
Debugging Selenium pytest Failures
This article explores common challenges in Selenium pytest failures, provides debugging techniques, and discusses best practices to prevent failures. Topics covered include flaky tests, dynamic web elements, synchronization, cross-browser compatibility, environment dependencies, and more. The article also introduces the Page Object Model (POM) design pattern for more maintainable test code.
- 4
Python in Plain English·3y
🐍 Python Backend Project Advanced Setup (FastAPI Example)
The article discusses the issues with the project structure layer in Python web frameworks, such as Django. It proposes a solution using a layered architecture and the repository pattern. The application structure is divided into different layers like presentation, application/operation, domain, and infrastructure. The repository pattern is implemented to provide a simple abstraction layer for database access.
- 5
Snyk·3y
Dependency injection in Python
Learn about the concept of dependency injection in Python, its benefits for code maintainability, modularity, and testability, and its limitations. Explore how dependency injection can be implemented in popular Python frameworks such as Flask, Django, and FastAPI. Also, discover the different Python dependency injection frameworks available and how they can contribute to your project. Finally, learn about the importance of keeping project dependencies secure with Snyk and how it integrates with Python development workflows.
- 6
- 7
LambdaTest·3y
How to Take Screenshots in Python Using Selenium
Python screenshots are valuable tools for software testing, documentation, and monitoring. They can be captured using libraries such as Selenium and Pillow. Benefits of screenshot testing with Python include easy implementation, versatility, integration with test automation, identifying UI issues, time and cost efficiency, better communication, A/B testing, and simplified debugging. To capture specific elements from a webpage, Selenium's WebDriver can be used. Automated screenshot capture can be achieved by using libraries like PyAutoGUI and PyGetWindow. Best practices for taking Python screenshots include organizing and storing screenshots, enhancing clarity through annotations and adjustments, optimizing image sizes, and automating the process using Python libraries and tools.
- 8
- 9
Stack Abuse·3y
Python-Specific Design Patterns
Learn about unique design patterns in Python, including the Global Object Pattern, Prebound Method Pattern, and Sentinel Object Pattern. These patterns address specific challenges and scenarios in Python programming, offering elegant solutions and leveraging the language's dynamic nature and object-oriented capabilities.
- 10
freeCodeCamp·3y
How to Automate Data Exports and Email Reports with Python – a Step-by-Step Guide
Learn how to automate data exports from a PostgreSQL database and send them as email attachments using Python. The tutorial covers setting up a virtual environment, extracting data from the database, converting data into an Excel sheet, and sending the sheet as an email attachment.
- 11
Planet Python·3y
Pattern Programs in Python (20) in 2023
Explore a collection of beginner-friendly Python pattern programs that are both fun to create and serve as a practical way to understand the basics of loops and logic in Python. The patterns include squares, rectangles, triangles, diamonds, numbers, Pascal's Triangle, arrows, and letter patterns. Start your coding journey and unleash your creativity!
- 12
- 13
AWS Tip·3y
EC2 Auto-shutdown with Lambda
Learn how to create an AWS Lambda function that automatically shuts down an EC2 instance when it's idle for more than 30 minutes. The article provides step-by-step instructions, including creating IAM policies and roles, setting up the Lambda function, creating triggers with Event Rule, identifying idle instances with a Python script, and testing and monitoring the lambda function.
- 14
AWS in Plain English·3y
Intro To DevOps III: How to Build a CI/CD Pipeline (Github Actions, AWS, Slack)in 2 Simple Steps
Learn how to build a CI/CD pipeline using GitHub Actions, AWS, and Slack in 2 simple steps. Divide your workflow into smaller jobs for easier debugging. View live logs and use the workflow visualizer to monitor your pipeline in real time.
- 15
- 16
Python in Plain English·3y
Easiest Backend Programming Languages That Pay Well [Beginners Guide]
This article explores the easiest and most popular programming languages for back-end development, including JavaScript, Python, and Rust. It explains the importance of the back-end in web development and the need to protect backend code against hackers.