Skip to content

Commit

Permalink
Merge branch 'prepare-for-pypi' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
nnevala committed Apr 6, 2015
2 parents 42432f8 + b7a1040 commit e4a1a52
Show file tree
Hide file tree
Showing 18 changed files with 183 additions and 78 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ __pycache__/
.coverage
.coverage.*
build/
dist/
63 changes: 0 additions & 63 deletions README.md

This file was deleted.

109 changes: 109 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
blimey
======

A Python library for interacting with 1Password's AgileKeychain password storage. Supports keychains created with 1Password 3 through 5.

Features

* Unlocking/locking the keychain
* Iterating over the keychain contents
* Creating new keychain items
* Editing keychain items

Planned

* Removing keychain items with support for the trash functionality
* Support for other password managers

Development status
------------------

Stable (master)

* .. image:: https://secure.travis-ci.org/openpassword/blimey.png?branch=master
:alt: Build status
:target: https://travis-ci.org/openpassword/blimey

* .. image:: https://scrutinizer-ci.com/g/openpassword/blimey/badges/quality-score.png?b=master
:alt: Quality
:target: https://scrutinizer-ci.com/g/openpassword/blimey/?branch=master

* .. image:: https://scrutinizer-ci.com/g/openpassword/blimey/badges/coverage.png?b=master
:alt: Coverage
:target: https://scrutinizer-ci.com/g/openpassword/blimey/?branch=master

Unstable (develop)

* .. image:: https://secure.travis-ci.org/openpassword/blimey.png?branch=develop
:alt: Build status
:target: https://travis-ci.org/openpassword/blimey

* .. image:: https://scrutinizer-ci.com/g/openpassword/blimey/badges/quality-score.png?b=develop
:alt: Quality
:target: https://scrutinizer-ci.com/g/openpassword/blimey/?branch=develop

* .. image:: https://scrutinizer-ci.com/g/openpassword/blimey/badges/coverage.png?b=develop
:alt: Coverage
:target: https://scrutinizer-ci.com/g/openpassword/blimey/?branch=develop

License
-------

.. image:: http://b.repl.ca/v1/License-MIT-blue.png
:alt: MIT License
:target: http://opensource.org/licenses/MIT

Usage
-----

.. code-block:: python
from blimey import AgileKeychain
# Construct a keychain with either a path to an existing keychain,
# or the path to where you want your keychain created
agilekeychain = AgileKeychain('path/to/keychain.agilekeychain')
# If the keychain doesn't exist, initialise it with a master password
agilekeychain.initialise('super-secret-password')
# Existing (and newly crated) keychains are unlocked by calling the unlock method
agilekeychain.unlock('super-secret-password')
# You can change the master password by calling set_password
agilekeychain.set_password('even-more-secret-password')
# Call create_item to initialise a new item
item = agilekeychain.create_item()
# Some boilerplate is put in place automatically
print(item)
# AgileKeychainItem({'encrypted': {}, 'title': 'Untitled', 'createdAt': 1422404797.4550807,
# 'typeName': 'passwords.Password', 'keyID': 'ED7D542C2EA24479407D3D5CB35637D2', 'location': '',
# 'uuid': 'CBA45A598A4A63D4DDD3C78E2CC11666', 'locationKey': ''})
# The item behaves like any dictionary
item['title'] = 'Usage Example'
# Anything stored under 'encrypted' key will be encrypted on save
item['encrypted'] = {
'username': 'patrick',
'password': 'correct horse battery staple'
}
# To save an item, pass it to the save_item method
agilekeychain.save_item(item)
# To access keychain items, you can iterate over the keychain, ...
for item in agilekeychain:
print(item['title'])
# AgileKeychainItem({'encrypted': {}, 'title': 'Untitled', 'createdAt': 1422404797.4550807,
# 'typeName': 'passwords.Password', 'keyID': 'ED7D542C2EA24479407D3D5CB35637D2', 'updatedAt': 1422404900,
# 'location': '', 'uuid': 'CBA45A598A4A63D4DDD3C78E2CC11666', 'locationKey': ''})
# ... or access them directly by their UUID
print(agilekeychain['905B51856FD59A3C3AEF42A9FCE47E87'])
# When you are done you can lock the keychain by calling the lock method
agilekeychain.lock()
2 changes: 1 addition & 1 deletion bin/tests
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ rm -f .coverage && \
rm -f .coverage.* && \

echo "### Specs" && \
nosetests spec && \
nosetests specs && \
mv .coverage .coverage.spec && \

echo "### Integration tests" && \
Expand Down
19 changes: 19 additions & 0 deletions blimey.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Metadata-Version: 1.1
Name: blimey
Version: 0.9.4
Summary: A password management library with AgileKeychain (1Password) support
Home-page: https://github.com/openpassword/blimey
Author: Open Password Team
Author-email: [email protected]
License: MIT
Description: UNKNOWN
Keywords: password management 1password agilekeychain
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Security
Classifier: Topic :: Security :: Cryptography
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
15 changes: 14 additions & 1 deletion MANIFEST → blimey.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# file GENERATED by distutils, do NOT edit
README.rst
setup.cfg
setup.py
blimey/__init__.py
blimey/_keychain.py
blimey/exceptions.py
blimey.egg-info/PKG-INFO
blimey.egg-info/SOURCES.txt
blimey.egg-info/dependency_links.txt
blimey.egg-info/requires.txt
blimey.egg-info/top_level.txt
blimey/abstract/__init__.py
blimey/abstract/data_source.py
blimey/abstract/item.py
Expand All @@ -17,3 +22,11 @@ blimey/agile_keychain/_manager/__init__.py
blimey/agile_keychain/_manager/_file_system_manager.py
blimey/agile_keychain/_manager/_item_manager.py
blimey/agile_keychain/_manager/_key_manager.py
blimey/agile_keychain/template/1password.keys.template
specs/__init__.py
specs/openpassword/__init__.py
specs/openpassword/keychain_spec.py
specs/openpassword/agile_keychain/__init__.py
specs/openpassword/agile_keychain/crypto_spec.py
specs/openpassword/agile_keychain/data_source_spec.py
specs/openpassword/agile_keychain/item_spec.py
1 change: 1 addition & 0 deletions blimey.egg-info/dependency_links.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

3 changes: 3 additions & 0 deletions blimey.egg-info/requires.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pbkdf2
pycrypto
jinja2
1 change: 1 addition & 0 deletions blimey.egg-info/top_level.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blimey
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
setuptools
twine
wheel
spec
nose
pep8
Expand Down
44 changes: 31 additions & 13 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,32 @@
from distutils.core import setup
from setuptools import setup, find_packages

setup(name='blimey',
version='0.9.2',
description='Library for reading AgileKeychain files',
author='openpassword',
url='https://github.com/openpassword/blimey',
packages=[
'blimey',
'blimey.abstract',
'blimey.agile_keychain',
'blimey.agile_keychain._manager',
'blimey.agile_keychain.template',
])

setup(
name='blimey',
version='0.9.4',
description='A password management library with AgileKeychain (1Password) support',
author='Open Password Team',
author_email='[email protected]',
url='https://github.com/openpassword/blimey',
license='MIT',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Topic :: Software Development :: Libraries',
'Topic :: Security',
'Topic :: Security :: Cryptography',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4'
],
keywords='password management 1password agilekeychain',
packages=find_packages(exclude=['specs*']),
package_data={
'blimey': ['agile_keychain/template/*.template']
},
install_requires=[
'pbkdf2',
'pycrypto',
'jinja2'
]
)
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit e4a1a52

Please sign in to comment.