Personal tools
Skip to content. | Skip to navigation
gevent is a Python networking library that uses greenlet to provide synchronous API on top of libevent event loop. Features include: * Fast event loop based on libevent. * Lightweight execution units based on greenlet. * Familiar API that re-uses concepts from the Python standard library. * Cooperative sockets with ssl support. * DNS queries performed through libevent-dns. * Ability to use standard library and 3rd party modules written for standard blocking sockets * Fast WSGI server based on libevent-http. gevent is inspired by eventlet but features more consistent API, simpler implementation and better performance. Read why others use gevent and check out the list of the open source projects based on gevent. gevent is written and maintained by Denis Bilenko and is licensed under MIT license.
This project is the python equivalent of google-gflags, a Google commandline flag implementation for C++. It is intended to be used in situations where a project wants to mimic the command-line flag handling of a C++ app that uses google-gflags, or for a Python app that, via swig or some other means, is linked with a C++ app that uses google-gflags. The gflags package contains a library that implements commandline flags processing. As such it's a replacement for getopt(). It has increased flexibility, including built-in support for Python types, and the ability to define flags in the source file in which they're used. (This last is its major difference from OptParse.)
gocept python module
This package provides base classes for defining Munin graphs and a main function to handle munin-typical symlinked scripts. Munin plugin scripts ==================== A single plugin file defines (multiple) graphs by subclassing the bases as mentioned in the next section. The main function uses the called script's filename to determine which of the defined graphs is relevant. Data for each graph is determined by retrieving a text file from a URL (with possibly given basic authentication data). The format for the data is plain/text wich each line having key/value pairs split by ':'. The values are expected to be floats. All graph bases expect two environment variables to be set: URL The URL at which to retrieve data from. Must include a '%s' which encodes the graph name. AUTH HTTP basic authentication information. Either empty or in the form of 'username:password'. The environment variables can be configured using munin's `plugin-conf.d` like this: The plugin is called `prefix_something_1`:: [prefix_*] env.URL http://foo:8900/myapp/munin?data=%s env.AUTH admin:admin Graph bases =========== The following base classes are currently defined: SimpleGraph A simple graph with a single value that is plotted as an absolute value. SimpleMultiGraph Multiple absolute values plotted on the same graph and scale. more bases will be added as needed. Main function ============= The main function handles munin-typical `type_option_index` symlink scripts by looking at the name from which the main script was called. Example script ============== Here's a sample script that you could symlink into the `plugins` directory:: from gocept.munin.client import SimpleGraph, main class people(SimpleGraph): name = key = 'people' title = 'How many people are there?' category = 'Office' main() [root@mistress gocept.munin-0.1]# cat README.txt ========================================== Utilities for writing munin client scripts ========================================== This package provides base classes for defining Munin graphs and a main function to handle munin-typical symlinked scripts. Munin plugin scripts ==================== A single plugin file defines (multiple) graphs by subclassing the bases as mentioned in the next section. The main function uses the called script's filename to determine which of the defined graphs is relevant. Data for each graph is determined by retrieving a text file from a URL (with possibly given basic authentication data). The format for the data is plain/text wich each line having key/value pairs split by ':'. The values are expected to be floats. All graph bases expect two environment variables to be set: URL The URL at which to retrieve data from. Must include a '%s' which encodes the graph name. AUTH HTTP basic authentication information. Either empty or in the form of 'username:password'. The environment variables can be configured using munin's `plugin-conf.d` like this: The plugin is called `prefix_something_1`:: [prefix_*] env.URL http://foo:8900/myapp/munin?data=%s env.AUTH admin:admin Graph bases =========== The following base classes are currently defined: SimpleGraph A simple graph with a single value that is plotted as an absolute value. SimpleMultiGraph Multiple absolute values plotted on the same graph and scale. more bases will be added as needed. Main function ============= The main function handles munin-typical `type_option_index` symlink scripts by looking at the name from which the main script was called. Example script ============== Here's a sample script that you could symlink into the `plugins` directory:: from gocept.munin.client import SimpleGraph, main class people(SimpleGraph): name = key = 'people' title = 'How many people are there?' category = 'Office' main()
The greenlet package is a spin-off of Stackless, a version of CPython that supports micro-threads called "tasklets". Tasklets run pseudo-concurrently (typically in a single or a few OS-level threads) and are synchronized with data exchanges on "channels".
Lightweight in-process concurrent programming
Hachoir project Hachoir is a Python library used to represent of a binary file as a tree of Python objects. Each object has a type, a value, an address, etc. The goal is to be able to know the meaning of each bit in a file. Why using slow Python code instead of fast hardcoded C code? Hachoir has many interesting features: * Autofix: Hachoir is able to open invalid / truncated files * Lazy: Open a file is very fast since no information is read from file, data are read and/or computed when the user ask for it * Types: Hachoir has many predefined field types (integer, bit, string, etc.) and supports string with charset (ISO-8859-1, UTF-8, UTF-16, ...) * Addresses and sizes are stored in bit, so flags are stored as classic fields * Endian: You have to set endian once, and then number are converted in the right endian * Editor: Using Hachoir representation of data, you can edit, insert, remove data and then save in a new file.
hachoir-metadata extracts metadata from multimedia files: music, picture, video, but also archives. It supports most common file formats: * Archives: bzip2, gzip, zip, tar * Audio: MPEG audio ("MP3"), WAV, Sun/NeXT audio, Ogg/Vorbis (OGG), MIDI, AIFF, AIFC, Real audio (RA) * Image: BMP, CUR, EMF, ICO, GIF, JPEG, PCX, PNG, TGA, TIFF, WMF, XCF * Misc: Torrent * Program: EXE * Video: ASF format (WMV video), AVI, Matroska (MKV), Quicktime (MOV), Ogg/Theora, Real media (RM) It tries to give as much information as possible. For some file formats, it gives more information than libextractor for example, such as the RIFF parser, which can extract creation date, software used to generate the file, etc. But hachoir-metadata cannot guess informations. The most complex operation is just to compute duration of a music using frame size and file size. hachoir-metadata has three modes: * classic mode: extract metadata, you can use --level=LEVEL to limit quantity of information to display (and not to extract) * --type: show on one line the file format and most important informations * --mime: just display file MIME type The command 'hachoir-metadata --mime' works like 'file --mime', and 'hachoir-metadata --type' like 'file'. But today file command supports more file formats then hachoir-metadata.
Desktop ui for hachoir-metadata command line
README updated. s a package of most common file format parsers written for Hachoir framework. Not all parsers are complete, some are very good and other are poor: only parser first level of the tree for example. A perfect parser have no "raw" field: with a perfect parser you are able to know each bit meaning. Some good (but not perfect ;-)) parsers: * Matroska video * Microsoft RIFF (AVI video, WAV audio, CDA file) * PNG picture * TAR and ZIP archive What's new in hachoir-parser 1.2.1? * Improve OLE2 and MS Office parsers: - support small blocks - fix the charset of the summary properties - summary property integers are unsigned - use TimedeltaWin64 for the TotalEditingTime field - create minimum Word document parser * Python parser: support magic numbers of Python 3000 with the keyword only arguments * Create Apple/NeXT Binary Property List (BPLIST) parser * MPEG audio: reject file with no valid frame nor ID3 header * Skip subfiles in JPEG files * Create Apple/NeXT Binary Property List (BPLIST) parser by Robert Xiao