Skip to main content

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
  • gethostname
  • sethostname
  • mount
  • umount
  • pivot_root
  • getpid (bypasses glibc caching)
  • getppid (bypasses glibc caching)

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

History Node

0.12.6

History Node

0.12.5

History Node

0.12.4

History Node

0.12.3

History Node

0.12.2

History Node

0.12.1

History Node

0.12

History Node

0.11.1

History Node

0.11

History Node

0.10

History Node

0.9.2

History Node

0.9.1

History Node

0.9

History Node

0.8

This version
History Node

0.7

History Node

0.6

History Node

0.5

History Node

0.4

History Node

0.3

History Node

0.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
butter-0.7.tar.bz2 (17.7 kB) Copy SHA256 hash SHA256 Source None Mar 16, 2014
butter-0.7.zip (26.2 kB) Copy SHA256 hash SHA256 Source None Mar 16, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page