Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from rstevens011/master
Initial Source Commit
- Loading branch information
Showing
24 changed files
with
1,481 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
*~ | ||
*# | ||
*.swp | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
*.egg-info/ | ||
/.coverage | ||
/.coverage.* | ||
/.cache | ||
/doc/_autosummary/ | ||
/build | ||
*.iml | ||
dist/ | ||
.eggs/ | ||
.pytest_cache/ | ||
.python-version | ||
.tox/ | ||
venv/ | ||
env/ | ||
version.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
[MASTER] | ||
|
||
[MESSAGES CONTROL] | ||
disable = I0011, # locally-disabled | ||
R0903 # too-few-public-methods | ||
|
||
[REPORTS] | ||
# Set the output format. Available formats are text, parseable, colorized, msvs | ||
# (visual studio) and html | ||
output-format=colorized | ||
|
||
|
||
[FORMAT] | ||
# Maximum number of characters on a single line. | ||
max-line-length=120 | ||
# Maximum number of lines in a module | ||
#max-module-lines=1000 | ||
|
||
[BASIC] | ||
good-names= | ||
i, | ||
e, | ||
logger | ||
|
||
[SIMILARITIES] | ||
# Minimum lines number of a similarity. | ||
min-similarity-lines=5 | ||
# Ignore comments when computing similarities. | ||
ignore-comments=yes | ||
# Ignore docstrings when computing similarities. | ||
ignore-docstrings=yes | ||
|
||
[VARIABLES] | ||
# Tells whether we should check for unused import in __init__ files. | ||
init-import=yes | ||
|
||
[LOGGING] | ||
# Apply logging string format checks to calls on these modules. | ||
logging-modules= | ||
logging | ||
|
||
[TYPECHECK] | ||
ignored-modules= | ||
distutils |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
AWS Secrets Manager Python caching client | ||
Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
AWS Secrets Manager Python Caching Client | ||
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
pytest<3.8.0 | ||
pytest-cov | ||
pytest-sugar | ||
codecov>=1.4.0 | ||
pylint>1.9.4 | ||
isort>=4.3.4 | ||
sphinx>=1.8.4 | ||
setuptools_scm>=3.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{{ fullname }} | ||
{{ underline }} | ||
|
||
.. automodule:: {{ fullname }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
from datetime import datetime | ||
from setuptools_scm import get_version | ||
import os | ||
import shutil | ||
|
||
version = get_version(root='..') | ||
project = u'AWS Secrets Manager Python Caching Client' | ||
|
||
# If you use autosummary, this ensures that any stale autogenerated files are | ||
# cleaned up first. | ||
if os.path.exists('_autosummary'): | ||
print("cleaning up stale autogenerated files...") | ||
shutil.rmtree('_autosummary') | ||
|
||
# Add any Sphinx extension module names here, as strings. They can be extensions | ||
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. | ||
extensions = [ | ||
'sphinx.ext.autodoc', | ||
'sphinx.ext.autosummary', | ||
'sphinx.ext.coverage', | ||
'sphinx.ext.doctest', | ||
'sphinx.ext.napoleon', | ||
'sphinx.ext.todo', | ||
] | ||
|
||
# Add any paths that contain templates here, relative to this directory. | ||
templates_path = ['_templates'] | ||
|
||
source_suffix = '.rst' # The suffix of source filenames. | ||
master_doc = 'index' # The master toctree document. | ||
|
||
copyright = u'%s, Amazon.com' % datetime.now().year | ||
|
||
# The full version, including alpha/beta/rc tags. | ||
release = version | ||
|
||
# List of directories, relative to source directory, that shouldn't be searched | ||
# for source files. | ||
exclude_trees = ['_build', '_templates'] | ||
|
||
pygments_style = 'sphinx' | ||
|
||
autoclass_content = "both" | ||
autodoc_default_flags = ['show-inheritance', 'members', 'undoc-members'] | ||
autodoc_member_order = 'bysource' | ||
|
||
html_theme = 'haiku' | ||
html_static_path = ['_static'] | ||
htmlhelp_basename = '%sdoc' % project | ||
|
||
# autosummary | ||
autosummary_generate = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
AWS Secrets Manager Python Caching Client | ||
========================================= | ||
|
||
This package provides a client-side caching implementation for AWS Secrets Manager | ||
|
||
Modules | ||
_______ | ||
|
||
.. autosummary:: | ||
:toctree: _autosummary | ||
|
||
.. Add/replace module names you want documented here | ||
aws_secretsmanager_caching | ||
|
||
|
||
|
||
Indices and tables | ||
__________________ | ||
|
||
* :ref:`genindex` | ||
* :ref:`modindex` | ||
* :ref:`search` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
botocore>=1.12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
[tool:pytest] | ||
xfail_strict = true | ||
addopts = | ||
--verbose | ||
--doctest-modules | ||
--cov aws_secretsmanager_caching | ||
--cov-fail-under 90 | ||
--cov-report term-missing | ||
test | ||
|
||
[aliases] | ||
test=pytest | ||
|
||
[metadata] | ||
description-file = README.md | ||
license_file = LICENSE | ||
|
||
[flake8] | ||
max-line-length = 120 | ||
select = C,E,F,W,B | ||
# C812, W503 clash with black | ||
ignore = C812,W503 | ||
exclude = venv,.venv,.tox,dist,doc,build,*.egg | ||
|
||
[isort] | ||
line_length = 120 | ||
multi_line_output = 5 | ||
include_trailing_comma = true | ||
force_grid_wrap = 0 | ||
combine_as_imports = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
from setuptools import setup, find_packages | ||
|
||
setup( | ||
name="aws_secretsmanager_caching", | ||
description="Client-side AWS Secrets Manager caching library", | ||
url="https://aws.amazon.com/secrets-manager/", | ||
author="Amazon Web Services", | ||
author_email="aws-secretsmanager-dev@amazon.com", | ||
packages=find_packages(where="src", exclude=("test",)), | ||
package_dir={"": "src"}, | ||
classifiers=[ | ||
'Development Status :: 5 - Stable', | ||
'Intended Audience :: Developers', | ||
'License :: OSI Approved :: Apache License', | ||
'Programming Language :: Python :: 3.6', | ||
'Programming Language :: Python :: 3.7' | ||
], | ||
keywords='secretsmanager secrets manager development cache caching client', | ||
use_scm_version={ | ||
'write_to': 'version.txt' | ||
}, | ||
python_requires='>3.5', | ||
install_requires=['botocore'], | ||
setup_requires=['pytest-runner', 'setuptools-scm'], | ||
tests_require=['pytest', 'pytest-cov', 'pytest-sugar', 'codecov'] | ||
|
||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"). You | ||
# may not use this file except in compliance with the License. A copy of | ||
# the License is located at | ||
# | ||
# http://aws.amazon.com/apache2.0/ | ||
# | ||
# or in the "license" file accompanying this file. This file is | ||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF | ||
# ANY KIND, either express or implied. See the License for the specific | ||
# language governing permissions and limitations under the License. | ||
"""High level AWS Secrets Manager caching client.""" | ||
from aws_secretsmanager_caching.config import SecretCacheConfig | ||
from aws_secretsmanager_caching.decorators import InjectKeywordedSecretString, InjectSecretString | ||
from aws_secretsmanager_caching.secret_cache import SecretCache | ||
|
||
__all__ = ["SecretCache", "SecretCacheConfig", "InjectSecretString", "InjectKeywordedSecretString"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"). You | ||
# may not use this file except in compliance with the License. A copy of | ||
# the License is located at | ||
# | ||
# http://aws.amazon.com/apache2.0/ | ||
# | ||
# or in the "license" file accompanying this file. This file is | ||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF | ||
# ANY KIND, either express or implied. See the License for the specific | ||
# language governing permissions and limitations under the License. | ||
"""Internal Implementation Details | ||
.. warning:: | ||
No guarantee is provided on the modules and APIs within this | ||
namespace staying consistent. Directly reference at your own risk. | ||
""" | ||
from aws_secretsmanager_caching.cache.items import SecretCacheItem, SecretCacheObject, SecretCacheVersion | ||
from aws_secretsmanager_caching.cache.lru import LRUCache | ||
|
||
__all__ = ["SecretCacheObject", "SecretCacheItem", "SecretCacheVersion", "LRUCache"] |
Oops, something went wrong.