python

Article Thumbnail
Article

Build your first application using native Python on RHEL 6 or RHEL 7

mguerett

Get started developing with Python on Red Hat Enterprise Linux in under 10 minutes. Introduction and Prerequisites In this tutorial, you will see how to get started with Python development on Red Hat Enterprise Linux by creating a simple Hello World application. The tutorial should take 5 to 10 minutes to complete. On Red Hat Enterprise Linux, Python is installed by default. You can skip directly to Hello Word and your first application , or continue reading to learn more...

Article Thumbnail
Article

Build your first application using Python with Red Hat Container Development Kit (CDK)

MGuerette

Get started building Python applications in docker formatted containers using the Red Hat Container Development CDK (CDK) 2 Introduction and Prerequisites In this tutorial, you will learn how to start building Python 3 applications in docker formatted containers using the Red Hat Container Development Kit (CDK) 2 on Red Hat Enterprise Linux. You need to have CDK 2 installed and should have downloaded the Red Hat Enterprise Linux vagrant box for your system. See the CDK 2 Installation Guide for...

RedHat Shadowman Logo
Article

Red Hat Software Collections 2.3 now beta

Mike Guerette

Today, Red Hat announced the beta availability of Red Hat Software Collections 2.3 , Red Hat’s newest installment of open source web development tools, dynamic languages, and databases. Delivered on a separate lifecycle from Red Hat Enterprise Linux with a more frequent release cadence, Red Hat Software Collections bridges developer agility and production stability by helping to accelerate the creation of modern applications that can then be more confidently deployed into production. New additions to Red Hat Software Collections 2.3...

Article Thumbnail
Article

A microservices example: writing a simple to-do application

Saurabh Badhwar

Microservices are becoming a new trend, thanks to the modularity and granularity they provide on top of advantages like releasing applications in a continuous manner. There are various platforms and projects that are rising which aims to make writing and managing microservices easy. Keeping that in mind, I thought, why not make a demo application that can give an example of how microservices are built and how they interact. In this article, I will be building a small application using...

Article Thumbnail
Article

Keeping track of my subscriptions using the Red Hat Content Delivery Network API

John Herr

In a previous post, where-have-all-my-subscriptions-gone , I mentioned that you can access the Red Hat Content Delivery Network (CDN) using its API --- allowing you to query CDN for subscriptions and their usage, registered hosts, and more as well as unregistering hosts, and more. I wanted to do some analysis for my own subscription usage, so I wrote some scripts that let me more easily tell where my subscriptions are being used. Since Python scripting is still fairly new to...

Article Thumbnail
Article

The Hypothesis Testing Library for Python: An Introduction

Anne Mulhern

Hypothesis is a Python library for creating tests which are simple to write and powerful when run, finding cases in your code you wouldn't have thought to look for. It is stable, powerful and easy to add to an existing test suite. It works by letting you write tests that assert that something should be true for every case, not just the ones you happen to think of. Think of a normal unit test as being something like the following...

Article Thumbnail
Article

Node.js 4.4, Python 3.5, and Ruby 2.3 Get Started guides on developers.redhat.com

Rob Terzi

On developers.redhat.com you can find short, focused guides to help you start developing with a number of Red Hat technologies. With the recent release of Red Hat Software Collections (RHSCL) 2.2 , a number of Get Started guides have been updated to use the newest software collections, such as Node.js 4.4, Python 3.5, and Ruby 2.3. These guides give you the steps you need to install the software and get to a simple "Hello, World" in a few minutes. The...

Red Hat Logo
Article

Important code snippet for Python (and other) developers

Mike Guerette

Special thanks to Red Hat's Petr Viktorin for sharing this bit of clever code. #! /usr/bin/python3 -O # finite_function_recursion:lazy_runtime_recoding:raw_unicode_escape from functools import partial def main(): """Print an encouraging message to stdout""" print() for m in get_strings(): print(m) print() def get_strings(c=0): """Return list of strings to display to the user""" I = L = C = s = 0 S = o( 41825590960378124374546057353963710973031568, 1128197075877756693608173239149061571294131523370094467240707291316, 28634919999905333837375431815649071658638057502987522288563421, 365227113932356026740958928599365475099366847504156564532, 10832, 9648, 1547030252077890721054968240874293402, 6848886034432315113697, 1026545237296201918476380, 136341829649174, 3484359852033570050171, 10968655762475855182, 39478210171221680, 3160248663052126290380, 3160029950901936033378, ) z, Z =...

Article Thumbnail
Article

You had me at Hello, World

Mike Guerette

Our Red Hat Developers program team has just concluded a "Time to Hello World" project to reduce the time it takes you to download and install a new technology, and then get to your first "hello world" application. By utilizing multiple resources from Red Hat engineering, UX, evangelists, docs, testing, and yes, even customers, this is just one of many Red Hat activities underway to minimize speed bumps when trying a new Red Hat technology. So, is 6 minutes quick...

A Practical Introduction to Docker Container Terminology
Article

Red Hat Software Collections 2.0 Docker images, Beta release

Joe Orton

I'm very happy to announce that Docker images based on collections from Red Hat Software Collections (RHSCL) 2.0 are in beta testing. The images are available from the Red Hat Container Registry , and we've got the set of collections for language, databases and web servers covered - a complete list is below. If you've not tried out the Docker package from RHEL7 Extras, you need to enable the Extras channel, install the docker page, and start the docker service...

Article Thumbnail
Article

Maintain Software Collections easily on thousands of machines using scl register

Honza Horak

Here is a problem. Let's have a company with dozens of developer workstations, while we need to maintain the same development environment on all of them. We know the Software Collections, which store files from RPMs into /opt and thus allow us to install multiple versions of various software on the same machine, even on an enterprise platform like Red Hat Enterprise Linux 7. Installing packages in different versions could break things, so it is wise to use the Software...

Software Collections logo
Article

Red Hat Software Collections 2 - now generally available

Mike Guerette

Excellent news - Red Hat has announced the general availability of Red Hat Software Collections 2. You'll see considerable additions to support multiple language versions. For example, it includes updates to "Python 2.7, continues to support Python 3.3 and also adds Python 3.4 – providing a fully-supported language library and blending developer agility with production stability." New Collections B uild ing upon an already robust selection of the latest, stable developer tools, Red Hat Software Collections 2 adds more than...

Software Collections feature image
Article

Software Collections 2.0 now in BETA - new and shiny

Mike Guerette

It seems like just a few months ago when we introduced Red Hat Software Collections 1.0 (RHSCL), followed by 1.1 and 1.2 will lots of additions and updates. Today, Red Hat has announced Red Hat Software Collections 2.0 with a truck load of important languages, tools, databases and web servers - including the addition of a new component: Passenger. Here's the list: Python 3.4 – the latest stable, major release of Python 3 and includes a number of additional utilities...

Article Thumbnail
Article

Using Mock to build Python27 Software Collections packages for RHEL6

Tim Bielawa

Have you wanted to use software collections but found packaging has kept you at bay? Tried rebuilding a package only to find it give you weird errors you've not seen before? In this blog post we'll learn how to configure and use mock to build RPM packages for the Python 2.7 Software Collection. Along the way we'll learn why we can't use standard mock configurations, and what makes Software Collections (SCL) mock configurations different. For readers unfamiliar with mock, I'll...

Article Thumbnail
Article

Our 5 most popular developer posts in 2014

Mike Guerette

Here are five most read articles on developerblog.redhat.com in 2014 - be sure to read them: A Practical Introduction to Docker Containers, by Scott McCarty - 25,000 views Comprehensive Overview of Storage Scalability in Docker, by Jeremy Eder - 19,000 Why Python 4.0 won’t be like Python 3.0, by Nick Coghlan - 14,000 Red Hat Enterprise Linux 7 now Generally Available, 13,000 GCC Undefined Behavior Sanitizer – ubsan, by Marek Polacek, 10,000

Python logo
Article

How to add packages to Python 2.7 Software Collection

Bohuslav Kabrda +1

As Software Collections are getting popular, there are more and more people asking how they can build their own collections and/or extend collections in RHSCL. In this article, I will demonstrate how to extend python27 collection from RHSCL 1.2, adding a simple Python extension library. (Note that the same steps can be applied to the python33 collection.) I'm going to work on a RHEL 6 machine throughout this whole tutorial. I'm assuming that readers have basic knowledge of RPM building...

Article Thumbnail
Article

Red Hat Developer Newsletter - October 2014

Mike Guerette

Welcome to the Red Hat® Developer Newsletter.You may remember from last month that we planned to discuss coding and pumpkins, but we've forgotten what we intended to cover. :( Was it cooking and pumpkins? Or was it about planting pumpkins in Minecraft? So, we put on our thinking caps and came up with the most logical answer for a developer newsletter: coding with pumpkin beer. :) Enjoy the season. And enjoy the coding using Red Hat developer tools. On the...

Python logo
Article

Because Red Hatters are Pythonistas, too

Mike Guerette

At Red Hat, we're big supporters of Python. We code in Python and provide great tools to get your Python applications up and running. We also offer you—the Python developer—projects you can get involved in to further hone your Python skills. Read on to learn how: We use Python in Red Hat Enterprise Linux OpenStack Platform. We support your Python coding with Red Hat Software Collections. You can get your applications up and running in the cloud with OpenShift by...

Python logo
Article

Why Python 4.0 won't be like Python 3.0

Nick Coghlan

Newcomers to python-ideas occasionally make reference to the idea of "Python 4000" when proposing backwards incompatible changes that don't offer a clear migration path from currently legal Python 3 code. After all, we allowed that kind of change for Python 3.0, so why wouldn't we allow it for Python 4.0? I've heard that question enough times now (including the more concerned phrasing "You made a big backwards compatibility break once, how do I know you won't do it again?"), that...

Python logo
Article

The transition to multilingual programming with Python

Nick Coghlan

A recent thread on python-dev prompted me to summarise the current state of the ongoing industry-wide transition from bilingual to multilingual programming as it relates to Python's cross-platform support. It also relates to the reasons why Python 3 turned out to be more disruptive than the core development team initially expected. A good starting point for anyone interested in exploring this topic further is the "Origin and development" section of the Wikipedia article on Unicode, but I'll hit the key...

Article Thumbnail
Article

Automated deployment of RPM-packaged django applications with Red Hat Software Collections

Tomas Tomecek

Introduction There has been already two ( first and second ) guides which covered installing django using Red Hat Software Collections (RHSCL). While very popular, none of them went far enough to show a real world deployment example. This guide will try to provide full guidance together with sample project. I chose django 1.7 (as of time writing this guide, it's still in RC) because in a couple of months, it will be used by many and in a year...

Article Thumbnail
Article

Using STOMP for testing Red Hat Message Servers (Part 1 - HornetQ)

Jason Marley

On my latest engagement we were asked to setup and configure JBoss Fuse Service Works, which can either be configured with HornetQ (out of box) or ActiveMQ message servers. At the moment ActiveMQ requires the Karaf container and we couldn't convince ourselves it was right approach for this client. Anyhow, for Part 1, I wanted to focus on HornetQ and how easy it is to test your message server with STOMP (in part 2, I plan similar fun with ActiveMQ)...

Article Thumbnail
Article

EuroPython Red Hat sessions

Mike Guerette

Red Hat is one of the EuroPython sponsors this year and it's already less than 2 weeks away! I'm looking forward to meeting many Pythonistas and see the great city of Berlin for the first time. The organizers have assembled an informative agenda for Pythonistas, both young and not-so-young. ;) Be sure to attend these great Red Hat sessions: Julie Pichon - Training: Making your first contribution to OpenStack Location: A05/A06 Day/Time: Tuesday, July 22, 2014 from 10:00 – 13:00...