Library to interface to low level linux features
Project description
Butter is a library to integrate some of Linux’s low level features into python eg signalfd, eventfd and timerfd. most of these functions are handy if you are looking into creating non-blocking servers, anything using select/poll and derivatives or writing server code
Whats Available
inotify (Complete support)
seccomp (Limited support)
fanotify (Limited support)
splice
tee
vmsplice
Whats Coming
Most of these exist in v0.2 as ctypes code. these are currently being rewritten to use cffi for speed and compatibility with pypy
signalfd
eventfd
timerfd
posix/linux aio (scatter/gather read writes with a completion based API instead of a ‘ready’ based interface, eg similar to IOCP on windows)
Design
The ‘fd’ apis have been designed first as thin wrappers around the underlying kernel syscalls. A File-like object that then uses these syscalls is then made available that obeys the ‘event like’ interface and is based on the interface provided by File and friends. They are intended to be drop in replacements and be used with the select module
Event-like objects
Event like objects are identical to filelike objects except they have the following extra methods to replace the disabled read/readline/write/writeline functionality
read_event: Return a single event
read_events: Return all cached events OR read all events from the kernel
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.