datetime contains functions and classes for working with dates and times, separately and together.
Read more…
This post is part of the Python Module of the Week series for Python 3. See PyMOTW.com for more articles from the series.
The OpenStack Release Management team has been focusing a lot on automation during the Mitaka release cycle. At the start of the cycle we set out our goals, and we’re making good progress toward completing them. We’ve made quite a few supporting changes to the release process, with considerable help from the Infrastructure team.
Standard Release Models We have standardized projects on one of three different release “models”, describing the frequency of releases.
Abstract base classes are a form of interface checking more strict than individual hasattr() checks for particular methods. By defining an abstract base class, a common API can be established for a set of subclasses. This capability is especially useful in situations where someone less familiar with the source for an application is going to provide plug-in extensions, but can also help when working on a large team or with a large code-base where keeping track of all of the classes at the same time is difficult or not possible.
The csv module can be used to work with data exported from spreadsheets and databases into text files formatted with fields and records, commonly referred to as comma-separated value (CSV) format because commas are often used to separate the fields in a record.
Read more…
This post is part of the Python Module of the Week series for Python 3. See PyMOTW.com for more articles from the series.
The array module defines a sequence data structure that looks very much like a list , except that all of the members have to be of the same primitive type. The types supported are all numeric or other fixed-size primitive types such as bytes.
Read more…
This post is part of the Python Module of the Week series for Python 3. See PyMOTW.com for more articles from the series.
The Fraction class implements numerical operations for rational numbers based on the API defined by Rational in the numbers module.
Read more…
This post is part of the Python Module of the Week series for Python 3. See PyMOTW.com for more articles from the series.
Even though the glob API is small, the module packs a lot of power. It is useful in any situation where a program needs to look for a list of files on the file system with names matching a pattern. To create a list of filenames that all have a certain extension, prefix, or any common string in the middle, use glob instead of writing custom code to scan the directory contents.
The asyncio module provides tools for building concurrent applications using coroutines. While the threading module implements concurrency through application threads and multiprocessing implements concurrency using system processes, asyncio uses a single-threaded, single-process approach in which parts of an application cooperate to switch tasks explicitly at optimal times. Most often this context switching occurs when the program would otherwise block waiting to read or write data, but asyncio also includes support for scheduling code to run at a specific future time, to enable one coroutine to wait for another to complete, for handling system signals, and for recognizing other events that may be reasons for an application to change what it is working on.