Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,20 @@

- By default `credsmash put` will check if the value of a secret has changed. Use `--version` or `--no-compare` to
avoid this comparison.

- `credsmash` has a straight-forward API for pythonic access.

```py
import credsmash
# Auto-configure a session from your
# /etc/credsmash.cfg or CREDSMASH_CONFIG environment variable
session = credsmash.get_session()
# or, provide options directly-
session = credsmash.get_session(table_name='my-dynamodb-table', key_id='my-key')

# Access a secret
plaintext = session.get_one('my_secret')
# search for secrets
secret_name, plaintext = session.find_one('s3_prod_*')
secrets = session.find_many('s3_*')
```
6 changes: 3 additions & 3 deletions credsmash/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# Copyright 2015 Luminal, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -13,5 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import pkg_resources
__version__ = pkg_resources.resource_string(__name__, 'VERSION')
__version__ = __import__('pkg_resources').resource_string(__name__, 'VERSION')

from .core import get_session, Credsmash
8 changes: 0 additions & 8 deletions credsmash/api/__init__.py

This file was deleted.

20 changes: 0 additions & 20 deletions credsmash/api/delete.py

This file was deleted.

11 changes: 0 additions & 11 deletions credsmash/api/get.py

This file was deleted.

5 changes: 0 additions & 5 deletions credsmash/api/list.py

This file was deleted.

27 changes: 0 additions & 27 deletions credsmash/api/prune.py

This file was deleted.

Loading