Code Monkey home page Code Monkey logo

passlib's Introduction

The Passlib Python Library

Welcome

Passlib is a password hashing library for Python 2 & 3, which provides cross-platform implementations of over 30 password hashing algorithms, as well as a framework for managing existing password hashes. It's designed to be useful for a wide range of tasks, from verifying a hash found in /etc/shadow, to providing full-strength password hashing for multi-user application.

  • See the documentation for details, installation instructions, and examples.
  • See the changelog for a description of what's new in Passlib.
  • Visit PyPI for the latest stable release. All releases are signed with the gpg key 4D8592DF4CE1ED31.
  • Additional questions about usage or features? Feel free to post on our mailing list.

Usage

A quick example of using passlib to integrate into a new application:

>>> # import the context under an app-specific name (so it can easily be replaced later)
>>> from passlib.apps import custom_app_context as pwd_context

>>> # encrypting a password...
>>> hash = pwd_context.hash("somepass")
>>> hash
'$6$rounds=36122$kzMjVFTjgSVuPoS.$zx2RoZ2TYRHoKn71Y60MFmyqNPxbNnTZdwYD8y2atgoRIp923WJSbcbQc6Af3osdW96MRfwb5Hk7FymOM6D7J1'

>>> # verifying a password...
>>> ok = pwd_context.verify("somepass", hash)
True
>>> ok = pwd_context.verify("letmein", hash)
False

For more details and an extended set of examples, see the full documentation; This example barely touches on the range of features available.

Online Resources

Source

Passlib's source repository uses Mercurial. When building Passlib from an hg clone, note that there are two main branches: default and stable.

  • default is the bleeding edge of the next major release. It may sometimes be of alpha quality.
  • stable is the latest released version plus any pending bugfixes, and should be safe to use in production.

passlib's People

Contributors

eli-collins avatar yuvallanger avatar darrelclute avatar offby1 avatar bikeshedder avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.