Skip to main content
Help us improve Python packaging – donate today!

simple file encryption using pycrypto

Project Description

Easy file encryption using pycrypto


pip install beefish pycrypto


pip install -e git+git://



beefish can be used to encrypt and decrypt file-like objects:

from beefish import encrypt, decrypt

# encrypting
with open('secrets.txt') as fh:
    with open('secrets.enc', 'wb') as out_fh:
        encrypt(fh, out_fh, 'secret p@ssword')

# decrypting
with open('secrets.enc') as fh:
    with open('secrets.dec', 'wb') as out_fh:
        decrypt(fh, out_fh, 'secret p@ssword')

you can use a shortcut if you like:

# encrypting
encrypt_file('secrets.txt', 'secrets.enc', 'p@ssword')

# decrypting
decrypt_file('secrets.enc', 'secrets.dec', 'p@ssword')

you can use it from the command-line: -e secrets.txt secrets.enc -d secrets.enc secrets.dec

Release history Release notifications

This version
History Node


History Node


History Node


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
beefish-0.1.2.tar.gz (4.2 kB) Copy SHA256 hash SHA256 Source None Apr 11, 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