Home » Python » Page 4

Python

Better Unbound Python Descriptors

Welcome back from another hiatus! This post is a facepalm post because I recently realized that I’ve been an idiot for so long. I have a tendency to make things more complicated than they need to be, as can be seen in my articles about instance properties. I’ve briefly mentioned unbound attributes (Class.attr returns a function that you pass an ...

Read More »

Top 5 Python Web Development Frameworks for Programmers

Hello guys, I am a Java developer and have been writing about Java for a long time. Initially I wasn’t interested in Python but eventually, I had to join the Python wagon when I started exploring Machine Learning and Data Science. There is no doubt that Python is the #1 programming language and it’s heavily used in areas like automation ...

Read More »

Top 5 Python Frameworks For Test Automation In 2019

After being voted as the best programming language in the year 2018, Python still continues rising up the charts and currently ranks as the 3rd best programming language just after Java and C, as per the index published by Tiobe. With the increasing use of this language, the popularity of test automation frameworks based on Python is increasing as well. ...

Read More »

OPA for HTTP Authorization

Open Policy Agent[1] is a promising, light weight and very generic policy engine to govern authorization is any type of domain. I found this comparion[2] very attractive in evaluating OPA for a project I am currently working on, where they demonstrate how OPA can cater same functionality defined in RBAC, RBAC with Seperation of Duty, ABAC and XACML.   Here are ...

Read More »

Python Operators: Arithmetic, Comparison, Logical and more

Operators refer to special symbols in Python that carry out arithmetic or logical computation. An operand is generally a variable or a value on which we operate. 1. Python Operators There different types of python operators and we will discuss some of them below. Python Arithmetic Operator Python Comparison Operator Python Logical Operator Python Identity Operator Python Bitwise Operator Python ...

Read More »

Using Python to Make Art With Math

Math can be intimidating. Depending on the teacher and how it is taught, it can be an infuriating combination of inscrutable and boring. But, there’s a beauty to math—a symmetry to the intelligence and logic behind numbers. I love math, and I want other people to love it too. One neat way to make math more approachable and show its beauty ...

Read More »

Boto3 – Amazon S3 As Python Object Store

Use Amazon Simple Storage Service(S3) as an object store to manage Python data structures. 1.Introduction Amazon S3 is extensively used as a file storage system to store and share files across the internet.  Amazon S3 can be used to store any type of objects, it is a simple key value store.  It can be used to store objects created in ...

Read More »

Invoking Ansible Inside Python Flask

Pasting sample code that can be used as is to run ansible inside python flask app. This would be a very useful base implementation when devops need to control system over the web or someone tries to control systems over internet without cli. Prerequisites Install Python3 #PYTHON3 ( Assuming Centos7 or RHEL Flavor). Change accordingly for your env yum -y ...

Read More »