Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

A Python library and command line interface for 1Password

Project Description

A command line interface (and Python library) for reading passwords from 1Password.

Command line usage

To get a password:

1pass mail.google.com

By default this will look in ~/Dropbox/1Password.agilekeychain. If that’s not where you keep your keychain:

1pass --path ~/whatever/1Password.agilekeychain mail.google.com

Or, you can set your keychain path as an enviornment variable:

export ONEPASSWORD_KEYCHAIN=/path/to/keychain

1pass mail.google.com

The name you pass on the command line must exactly match the name of an item in your 1Password keychain.

Python usage

The interface is very simple:

from onepassword import Keychain

my_keychain = Keychain(path="~/Dropbox/1Password.agilekeychain")
my_keychain.unlock("my-master-password")
my_keychain.item("An item's name").password

An example of real-world use

I wrote this so I could add the following line to my .muttrc file:

set imap_pass = "`1pass 'Google: personal'`"

Now, whenever I start mutt, I am prompted for my 1Password Master Password and not my Gmail password.

Contributors

License

1pass is licensed under the MIT license. See the license file for details.

While it is designed to read .agilekeychain bundles created by 1Password, 1pass isn’t officially sanctioned or supported by AgileBits. I do hope they like it though.

Release History

Release History

History Node

0.2.1

History Node

0.2.0

History Node

0.1.8

This version
History Node

0.1.7

History Node

0.1.6

History Node

0.1.5

History Node

0.1.4

History Node

0.1.3

History Node

0.1.2

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
1pass-0.1.7.tar.gz (4.3 kB) Copy SHA256 Checksum SHA256 Source Apr 17, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting