├── beanstalkUI ├── README.md ├── cron.yaml ├── package.json └── app.js ├── .DS_Store ├── deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b ├── boto3 │ ├── resources │ │ └── __init__.py │ ├── s3 │ │ └── __init__.py │ ├── ec2 │ │ ├── __init__.py │ │ ├── deletetags.py │ │ └── createtags.py │ ├── dynamodb │ │ └── __init__.py │ ├── docs │ │ ├── client.py │ │ ├── base.py │ │ ├── __init__.py │ │ ├── attr.py │ │ ├── docstring.py │ │ └── method.py │ ├── examples │ │ └── cloudfront.rst │ ├── compat.py │ ├── utils.py │ └── __init__.py ├── greengrasssdk │ ├── utils │ │ ├── __init__.py │ │ └── testing.py │ ├── __init__.py │ └── client.py ├── boto3-develop │ ├── tests │ │ ├── unit │ │ │ ├── __init__.py │ │ │ ├── s3 │ │ │ │ └── __init__.py │ │ │ ├── resources │ │ │ │ └── __init__.py │ │ │ ├── data │ │ │ │ ├── examples │ │ │ │ │ ├── myservice.rst │ │ │ │ │ └── otherservice.rst │ │ │ │ └── todo │ │ │ │ │ └── 2015-04-01 │ │ │ │ │ ├── waiters-2.json │ │ │ │ │ └── resources-1.json │ │ │ ├── ec2 │ │ │ │ ├── __init__.py │ │ │ │ ├── test_deletetags.py │ │ │ │ └── test_createtags.py │ │ │ ├── dynamodb │ │ │ │ └── __init__.py │ │ │ ├── docs │ │ │ │ ├── test_subresource.py │ │ │ │ ├── test_utils.py │ │ │ │ ├── test_waiter.py │ │ │ │ ├── test_client.py │ │ │ │ └── test_attr.py │ │ │ └── test_utils.py │ │ ├── functional │ │ │ ├── __init__.py │ │ │ ├── dynamodb │ │ │ │ ├── __init__.py │ │ │ │ └── test_table.py │ │ │ ├── test_collection.py │ │ │ ├── docs │ │ │ │ ├── test_s3.py │ │ │ │ └── test_ec2.py │ │ │ ├── test_utils.py │ │ │ ├── test_session.py │ │ │ ├── test_resource.py │ │ │ ├── test_ec2.py │ │ │ ├── test_smoke.py │ │ │ └── test_dynamodb.py │ │ ├── integration │ │ │ ├── __init__.py │ │ │ ├── test_sqs.py │ │ │ ├── test_session.py │ │ │ └── test_collections.py │ │ └── __init__.py │ ├── boto3 │ │ ├── resources │ │ │ └── __init__.py │ │ ├── ec2 │ │ │ ├── __init__.py │ │ │ ├── deletetags.py │ │ │ └── createtags.py │ │ ├── s3 │ │ │ └── __init__.py │ │ ├── dynamodb │ │ │ └── __init__.py │ │ ├── docs │ │ │ ├── client.py │ │ │ ├── base.py │ │ │ ├── __init__.py │ │ │ ├── attr.py │ │ │ ├── docstring.py │ │ │ └── method.py │ │ ├── examples │ │ │ └── cloudfront.rst │ │ ├── compat.py │ │ └── utils.py │ ├── .coveragerc │ ├── readthedocs.yml │ ├── requirements-docs.txt │ ├── MANIFEST.in │ ├── .changes │ │ ├── 1.4.2.json │ │ ├── 0.0.13.json │ │ ├── 0.0.17.json │ │ ├── 0.0.3.json │ │ ├── 0.0.9.json │ │ ├── 1.4.7.json │ │ ├── 1.4.8.json │ │ ├── 1.5.11.json │ │ ├── 1.5.12.json │ │ ├── 1.5.8.json │ │ ├── 1.2.1.json │ │ ├── 1.5.14.json │ │ ├── 1.5.1.json │ │ ├── 1.5.20.json │ │ ├── 1.5.18.json │ │ ├── 1.5.7.json │ │ ├── 0.0.20.json │ │ ├── 1.4.5.json │ │ ├── 1.4.6.json │ │ ├── 1.2.5.json │ │ ├── 1.3.0.json │ │ ├── 1.1.0.json │ │ ├── 1.1.1.json │ │ ├── 0.0.21.json │ │ ├── 1.4.3.json │ │ ├── 1.1.3.json │ │ ├── 0.0.1.json │ │ ├── 0.0.16.json │ │ ├── 1.5.4.json │ │ ├── 1.5.19.json │ │ ├── 0.0.5.json │ │ ├── 1.5.17.json │ │ ├── 1.5.2.json │ │ ├── 1.5.15.json │ │ ├── 1.2.4.json │ │ ├── 0.0.22.json │ │ ├── 1.1.4.json │ │ ├── 0.0.19.json │ │ ├── 0.0.12.json │ │ ├── 1.5.9.json │ │ ├── 1.5.22.json │ │ ├── 1.5.26.json │ │ ├── 0.0.14.json │ │ ├── 1.5.10.json │ │ ├── 1.5.3.json │ │ ├── 1.4.1.json │ │ ├── 1.5.16.json │ │ ├── 0.0.15.json │ │ ├── 1.5.13.json │ │ ├── 0.0.18.json │ │ ├── 1.5.6.json │ │ ├── 1.5.23.json │ │ ├── 0.0.4.json │ │ ├── 1.1.2.json │ │ ├── 1.2.2.json │ │ ├── 1.5.24.json │ │ ├── 1.5.5.json │ │ ├── 1.3.1.json │ │ ├── 0.0.10.json │ │ ├── 0.0.11.json │ │ ├── 0.0.8.json │ │ ├── 0.0.2.json │ │ ├── 0.0.6.json │ │ ├── 1.2.0.json │ │ ├── 1.2.3.json │ │ ├── 1.5.0.json │ │ ├── 1.5.25.json │ │ ├── 0.0.7.json │ │ ├── 1.4.0.json │ │ └── 1.5.21.json │ ├── docs │ │ └── source │ │ │ ├── reference │ │ │ ├── core │ │ │ │ ├── index.rst │ │ │ │ ├── boto3.rst │ │ │ │ ├── session.rst │ │ │ │ ├── collections.rst │ │ │ │ └── resources.rst │ │ │ └── customizations │ │ │ │ ├── index.rst │ │ │ │ ├── s3.rst │ │ │ │ └── dynamodb.rst │ │ │ ├── _templates │ │ │ ├── globaltoc.html │ │ │ └── layout.html │ │ │ ├── guide │ │ │ ├── index.rst │ │ │ ├── session.rst │ │ │ ├── examples.rst │ │ │ ├── cw-examples.rst │ │ │ ├── sqs-examples.rst │ │ │ ├── ec2-examples.rst │ │ │ ├── new.rst │ │ │ ├── s3-examples.rst │ │ │ ├── iam-examples.rst │ │ │ ├── upgrading.rst │ │ │ ├── s3-example-download-file.rst │ │ │ ├── quickstart.rst │ │ │ └── s3-example-access-permissions.rst │ │ │ └── index.rst │ ├── setup.cfg │ ├── requirements.txt │ ├── tox.ini │ ├── .gitignore │ ├── .travis.yml │ ├── LICENSE │ ├── scripts │ │ └── ci │ │ │ ├── run-integ-tests │ │ │ ├── install │ │ │ └── run-tests │ ├── CONTRIBUTING.rst │ └── setup.py ├── greengrass_ipc_python_sdk │ ├── utils │ │ └── __init__.py │ └── __init__.py └── greengrass_common │ ├── __init__.py │ ├── env_vars.py │ ├── common_log_appender.py │ ├── function_arn_fields.py │ └── greengrass_message.py ├── images ├── image1.png └── sudoku-board-bare.jpg ├── recogFace-5df11a97-4041-4996-96a4-d27deacf10df ├── .DS_Store └── response │ └── detect-faces-response.json └── deepLensTestTrigger.txt /beanstalkUI/README.md: -------------------------------------------------------------------------------- 1 | DeepLens WebApp Service 2 | -------------------------------------------------------------------------------- /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssolkhan/deeplens-challenge/HEAD/.DS_Store -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3/resources/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/greengrasssdk/utils/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/tests/unit/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /images/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssolkhan/deeplens-challenge/HEAD/images/image1.png -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/boto3/resources/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/tests/unit/s3/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/tests/unit/resources/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/greengrass_ipc_python_sdk/utils/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /images/sudoku-board-bare.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssolkhan/deeplens-challenge/HEAD/images/sudoku-board-bare.jpg -------------------------------------------------------------------------------- /beanstalkUI/cron.yaml: -------------------------------------------------------------------------------- 1 | version: 1 2 | cron: 3 | - name: "task1" 4 | url: "/scheduled" 5 | schedule: "* * * * *" 6 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.coveragerc: -------------------------------------------------------------------------------- 1 | [run] 2 | branch = True 3 | include = 4 | boto3/* 5 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/readthedocs.yml: -------------------------------------------------------------------------------- 1 | formats: 2 | - none 3 | python: 4 | setup_py_install: true 5 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/tests/unit/data/examples/myservice.rst: -------------------------------------------------------------------------------- 1 | ** This is an example ** 2 | 3 | This is the contents! 4 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/tests/unit/data/examples/otherservice.rst: -------------------------------------------------------------------------------- 1 | **Other example** 2 | 3 | This is for another service 4 | -------------------------------------------------------------------------------- /recogFace-5df11a97-4041-4996-96a4-d27deacf10df/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssolkhan/deeplens-challenge/HEAD/recogFace-5df11a97-4041-4996-96a4-d27deacf10df/.DS_Store -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/requirements-docs.txt: -------------------------------------------------------------------------------- 1 | Sphinx>=1.1.3,<1.3 2 | guzzle_sphinx_theme>=0.7.10,<0.8 3 | -rrequirements.txt 4 | -------------------------------------------------------------------------------- /beanstalkUI/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "DeepLens-AIonedge", 3 | "version": "0.0.1", 4 | "private": true, 5 | "dependencies": {}, 6 | "scripts": { 7 | "start": "node app.js" 8 | } 9 | } -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include CONTRIBUTING.rst 2 | include README.rst 3 | include LICENSE 4 | include requirements.txt 5 | recursive-include boto3/data *.json 6 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.4.2.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "ec2", 4 | "description": "Update client to latest version", 5 | "type": "feature" 6 | } 7 | ] -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/0.0.13.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "Botocore", 4 | "description": "Update to Botocore 0.100.0.", 5 | "type": "feature" 6 | } 7 | ] 8 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/0.0.17.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "Botocore", 4 | "description": "Update to Botocore 0.107.0.", 5 | "type": "feature" 6 | } 7 | ] 8 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/0.0.3.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "Botocore", 4 | "description": "Update to Botocore 0.76.0.", 5 | "type": "feature" 6 | } 7 | ] 8 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/0.0.9.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "Botocore", 4 | "description": "Update to Botocore 0.92.0", 5 | "type": "feature" 6 | } 7 | ] 8 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/greengrass_ipc_python_sdk/__init__.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | 5 | from .ipc_client import IPCClient 6 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/docs/source/reference/core/index.rst: -------------------------------------------------------------------------------- 1 | Core References 2 | =============== 3 | 4 | .. toctree:: 5 | :maxdepth: 2 6 | :titlesonly: 7 | :glob: 8 | 9 | * 10 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.4.7.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "``botocore``", 4 | "description": "Raised minor version dependency for botocore", 5 | "type": "enhancement" 6 | } 7 | ] -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.4.8.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "``botocore``", 4 | "description": "Raised minor version dependency for botocore", 5 | "type": "enhancement" 6 | } 7 | ] -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.5.11.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "``ds``", 4 | "description": "[``botocore``] Update ds client to latest version", 5 | "type": "api-change" 6 | } 7 | ] -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.5.12.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "``kms``", 4 | "description": "[``botocore``] Update kms client to latest version", 5 | "type": "api-change" 6 | } 7 | ] -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.5.8.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "``rds``", 4 | "description": "[``botocore``] Update rds client to latest version", 5 | "type": "api-change" 6 | } 7 | ] -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/setup.cfg: -------------------------------------------------------------------------------- 1 | [bdist_wheel] 2 | universal = 1 3 | 4 | [metadata] 5 | requires-dist = 6 | botocore>=1.8.40,<1.9.0 7 | jmespath>=0.7.1,<1.0.0 8 | s3transfer>=0.1.10,<0.2.0 9 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/greengrasssdk/__init__.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | 5 | from .client import client 6 | from .Lambda import StreamingBody 7 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.2.1.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "setup.cfg", 4 | "description": "Fix issue in formatting that broke PyPI distributable", 5 | "type": "bugfix" 6 | } 7 | ] 8 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.5.14.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "``glue``", 4 | "description": "[``botocore``] Update glue client to latest version", 5 | "type": "api-change" 6 | } 7 | ] -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.5.1.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "``appstream``", 4 | "description": "[``botocore``] Update appstream client to latest version", 5 | "type": "api-change" 6 | } 7 | ] -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.5.20.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "``budgets``", 4 | "description": "[``botocore``] Update budgets client to latest version", 5 | "type": "api-change" 6 | } 7 | ] -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.5.18.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "``sagemaker``", 4 | "description": "[``botocore``] Update sagemaker client to latest version", 5 | "type": "api-change" 6 | } 7 | ] -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.5.7.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "``workspaces``", 4 | "description": "[``botocore``] Update workspaces client to latest version", 5 | "type": "api-change" 6 | } 7 | ] -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/docs/source/reference/customizations/index.rst: -------------------------------------------------------------------------------- 1 | Customization References 2 | ======================== 3 | 4 | .. toctree:: 5 | :maxdepth: 2 6 | :titlesonly: 7 | :glob: 8 | 9 | * 10 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/docs/source/reference/core/boto3.rst: -------------------------------------------------------------------------------- 1 | .. _ref_core_init: 2 | 3 | =============== 4 | Boto3 Reference 5 | =============== 6 | 7 | .. automodule:: boto3 8 | :members: 9 | :undoc-members: 10 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/0.0.20.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "ec2", 4 | "description": "Update resource model. (`issue 129 `__)", 5 | "type": "feature" 6 | } 7 | ] 8 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.4.5.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "s3", 4 | "description": "Add a LifecycleConfiguration resource to resolve issues with the existing Lifecycle resource.", 5 | "type": "enhancement" 6 | } 7 | ] -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.4.6.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "Logging", 4 | "description": "Switch log levels from INFO to DEBUG (`#1208 `__)", 5 | "type": "enhancement" 6 | } 7 | ] -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/docs/source/reference/core/session.rst: -------------------------------------------------------------------------------- 1 | .. _ref_core_session: 2 | 3 | ================= 4 | Session Reference 5 | ================= 6 | 7 | .. automodule:: boto3.session 8 | :members: 9 | :undoc-members: 10 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/greengrass_common/__init__.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | 5 | from .function_arn_fields import FunctionArnFields 6 | from .greengrass_message import GreengrassMessage 7 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.2.5.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "``S3``", 4 | "description": "Forward ``extra_args`` when using multipart downloads. (`issue 503 `__)", 5 | "type": "bugfix" 6 | } 7 | ] 8 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.3.0.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "``EC2``", 4 | "description": "Update resource model to include ``Route`` resources. (`issue 532 `__)", 5 | "type": "feature" 6 | } 7 | ] 8 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.1.0.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "``EC2.Vpc.filter``", 4 | "description": "Fix issue with clobbering of ``Filtering`` paramter. (`issue 154 `__)", 5 | "type": "bugfix" 6 | } 7 | ] 8 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.1.1.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "``EC2.ServiceResource.create_tags``", 4 | "description": "Fix issue when creating multiple tags. (`issue 160 `__)", 5 | "type": "bugfix" 6 | } 7 | ] 8 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/docs/source/reference/core/collections.rst: -------------------------------------------------------------------------------- 1 | .. _ref_core_collections: 2 | 3 | ===================== 4 | Collections Reference 5 | ===================== 6 | 7 | .. automodule:: boto3.resources.collection 8 | :members: 9 | :undoc-members: 10 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/0.0.21.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "Installation", 4 | "description": "Fix regression when installing via older versions of pip on python 2.6. (`issue 132 `__)", 5 | "type": "bugfix" 6 | } 7 | ] 8 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/requirements.txt: -------------------------------------------------------------------------------- 1 | -e git://github.com/boto/botocore.git@develop#egg=botocore 2 | -e git://github.com/boto/jmespath.git@develop#egg=jmespath 3 | -e git://github.com/boto/s3transfer.git@develop#egg=s3transfer 4 | nose==1.3.3 5 | mock==1.3.0 6 | wheel==0.24.0 7 | unittest2==0.5.1; python_version == '2.6' 8 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.4.3.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "``s3``", 4 | "description": "Add ability to disable thread use with ``use_threads`` option", 5 | "type": "feature" 6 | }, 7 | { 8 | "category": "Resource", 9 | "description": "Fix resource hashing.", 10 | "type": "bugfix" 11 | } 12 | ] -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.1.3.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "``aws storagegateway``", 4 | "description": "Add support for resource tagging.", 5 | "type": "feature" 6 | }, 7 | { 8 | "category": "timeouts", 9 | "description": "Add support for customizable timeouts.", 10 | "type": "feature" 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/0.0.1.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "Resources", 4 | "description": "Supports S3, EC2, SQS, SNS, and IAM resources", 5 | "type": "feature" 6 | }, 7 | { 8 | "category": "Clients", 9 | "description": "Supports low-level clients for most services", 10 | "type": "feature" 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/0.0.16.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "Packaging", 4 | "description": "Fix release sdist and whl files from 0.0.15.", 5 | "type": "bugfix" 6 | }, 7 | { 8 | "category": "Amazon Dynamodb", 9 | "description": "Add resource model for Amazon DynamoDB.", 10 | "type": "feature" 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/tox.ini: -------------------------------------------------------------------------------- 1 | [tox] 2 | envlist = py26,py27,py33,py34,py35,py36 3 | 4 | # Comment to build sdist and install into virtualenv 5 | # This is helpful to test installation but takes extra time 6 | skipsdist = True 7 | 8 | [testenv] 9 | commands = 10 | {toxinidir}/scripts/ci/install 11 | {toxinidir}/scripts/ci/run-tests {posargs} 12 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.5.4.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "``iot``", 4 | "description": "[``botocore``] Update iot client to latest version", 5 | "type": "api-change" 6 | }, 7 | { 8 | "category": "``config``", 9 | "description": "[``botocore``] Update config client to latest version", 10 | "type": "api-change" 11 | } 12 | ] -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.5.19.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "``glue``", 4 | "description": "[``botocore``] Update glue client to latest version", 5 | "type": "api-change" 6 | }, 7 | { 8 | "category": "``transcribe``", 9 | "description": "[``botocore``] Update transcribe client to latest version", 10 | "type": "api-change" 11 | } 12 | ] -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/0.0.5.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "Resources", 4 | "description": "Add support for batch actions on collections. (`issue 32 `__)", 5 | "type": "feature" 6 | }, 7 | { 8 | "category": "Botocore", 9 | "description": "Update to Botocore 0.78.0", 10 | "type": "feature" 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/greengrass_common/env_vars.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | 5 | import os 6 | 7 | AUTH_TOKEN = os.getenv('AWS_CONTAINER_AUTHORIZATION_TOKEN') 8 | MY_FUNCTION_ARN = os.getenv('MY_FUNCTION_ARN') 9 | SHADOW_FUNCTION_ARN = os.getenv('SHADOW_FUNCTION_ARN') 10 | ROUTER_FUNCTION_ARN = os.getenv('ROUTER_FUNCTION_ARN') 11 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.5.17.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "``ec2``", 4 | "description": "[``botocore``] Update ec2 client to latest version", 5 | "type": "api-change" 6 | }, 7 | { 8 | "category": "``autoscaling-plans``", 9 | "description": "[``botocore``] Update autoscaling-plans client to latest version", 10 | "type": "api-change" 11 | } 12 | ] -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.pyc 3 | __pycache__ 4 | dist 5 | build 6 | docs/build 7 | docs/source/reference/services 8 | tests/cover 9 | tests/.coverage 10 | *.egg-info 11 | 12 | # Test state / virtualenvs 13 | .tox 14 | .coverage 15 | coverage.xml 16 | nosetests.xml 17 | 18 | # Common virtualenv names 19 | venv 20 | env2 21 | env3 22 | 23 | # IntelliJ / PyCharm IDE 24 | .idea/ -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/docs/source/_templates/globaltoc.html: -------------------------------------------------------------------------------- 1 | 14 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.5.2.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "presigned-url", 4 | "description": "[``botocore``] Fixes a bug where content-type would be set on presigned requests for query services.", 5 | "type": "bugfix" 6 | }, 7 | { 8 | "category": "``cloudwatch``", 9 | "description": "[``botocore``] Update cloudwatch client to latest version", 10 | "type": "api-change" 11 | } 12 | ] -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.5.15.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "``lambda``", 4 | "description": "[``botocore``] Update lambda client to latest version", 5 | "type": "api-change" 6 | }, 7 | { 8 | "category": "cloudformation get_template template body ordering", 9 | "description": "[``botocore``] fixes boto/boto3`#1378 `__", 10 | "type": "enhancement" 11 | } 12 | ] -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.2.4.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "``Session``", 4 | "description": "Add ``region_name`` property on session. (`issue 414 `__)", 5 | "type": "feature" 6 | }, 7 | { 8 | "category": "``S3``", 9 | "description": "Fix issue with hanging downloads. (`issue 471 `__)", 10 | "type": "bugfix" 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/0.0.22.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "``s3.client.upload_file``", 4 | "description": "Fix double invocation of callbacks when using signature version 4. (`issue 133 `__)", 5 | "type": "bugfix" 6 | }, 7 | { 8 | "category": "", 9 | "description": "``s3.Bucket.load`` (`issue 128 `__)", 10 | "type": "bugfix" 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.1.4.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "Identifier", 4 | "description": "Make resource identifiers immutable. (`issue 246 `__)", 5 | "type": "bugfix" 6 | }, 7 | { 8 | "category": "S3", 9 | "description": "Both S3 Bucket and Object obtain upload_file() and download_file() (`issue 243 `__)", 10 | "type": "feature" 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | python: 3 | - "2.6" 4 | - "2.7" 5 | - "3.3" 6 | - "3.4" 7 | - "3.5" 8 | - "3.6" 9 | sudo: false 10 | before_install: 11 | - if [ "$TRAVIS_PULL_REQUEST" != "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then 12 | echo "No pull requests can be sent to the master branch" 1>&2; 13 | exit 1; 14 | fi 15 | install: 16 | - python scripts/ci/install 17 | script: python scripts/ci/run-tests 18 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/greengrasssdk/client.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | 5 | 6 | def client(client_type, *args): 7 | if client_type == 'lambda': 8 | from .Lambda import Client 9 | elif client_type == 'iot-data': 10 | from .IoTDataPlane import Client 11 | else: 12 | raise Exception('Client type {} is not recognized.'.format(repr(client_type))) 13 | 14 | return Client(*args) 15 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/0.0.19.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "Collections", 4 | "description": "Remove the ``page_count`` and ``limit`` arguments from ``all()``. Undocument support for the two arguments in the ``filter()`` method. (`issue 119 `__)", 5 | "type": "breakingchange" 6 | }, 7 | { 8 | "category": "DynamoDB", 9 | "description": "Add batch writer. (`issue 118 `__)", 10 | "type": "feature" 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/0.0.12.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "Resources", 4 | "description": "Add the ability to load resource data from a ``has`` relationship. This saves a call to ``load`` when available, and otherwise fixes a problem where there was no way to get at certain resource data. (`issue 74 `__,", 5 | "type": "feature" 6 | }, 7 | { 8 | "category": "Botocore", 9 | "description": "Update to Botocore 0.99.0", 10 | "type": "feature" 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.5.9.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "``ssm``", 4 | "description": "[``botocore``] Update ssm client to latest version", 5 | "type": "api-change" 6 | }, 7 | { 8 | "category": "``inspector``", 9 | "description": "[``botocore``] Update inspector client to latest version", 10 | "type": "api-change" 11 | }, 12 | { 13 | "category": "``snowball``", 14 | "description": "[``botocore``] Update snowball client to latest version", 15 | "type": "api-change" 16 | } 17 | ] -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.5.22.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "``mturk``", 4 | "description": "[``botocore``] Update mturk client to latest version", 5 | "type": "api-change" 6 | }, 7 | { 8 | "category": "``medialive``", 9 | "description": "[``botocore``] Update medialive client to latest version", 10 | "type": "api-change" 11 | }, 12 | { 13 | "category": "``devicefarm``", 14 | "description": "[``botocore``] Update devicefarm client to latest version", 15 | "type": "api-change" 16 | } 17 | ] -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.5.26.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "``lex-runtime``", 4 | "description": "[``botocore``] Update lex-runtime client to latest version", 5 | "type": "api-change" 6 | }, 7 | { 8 | "category": "``ec2``", 9 | "description": "[``botocore``] Update ec2 client to latest version", 10 | "type": "api-change" 11 | }, 12 | { 13 | "category": "``lex-models``", 14 | "description": "[``botocore``] Update lex-models client to latest version", 15 | "type": "api-change" 16 | } 17 | ] -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/0.0.14.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "Resources", 4 | "description": "Update to the latest resource models for", 5 | "type": "feature" 6 | }, 7 | { 8 | "category": "Amazon S3", 9 | "description": "Add an ``upload_file`` and ``download_file`` to S3 clients that transparently handle parallel multipart transfers.", 10 | "type": "feature" 11 | }, 12 | { 13 | "category": "Botocore", 14 | "description": "Update to Botocore 0.102.0.", 15 | "type": "feature" 16 | } 17 | ] 18 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.5.10.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "``route53``", 4 | "description": "[``botocore``] Update route53 client to latest version", 5 | "type": "api-change" 6 | }, 7 | { 8 | "category": "``discovery``", 9 | "description": "[``botocore``] Update discovery client to latest version", 10 | "type": "api-change" 11 | }, 12 | { 13 | "category": "``codedeploy``", 14 | "description": "[``botocore``] Update codedeploy client to latest version", 15 | "type": "api-change" 16 | } 17 | ] -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.5.3.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "``route53``", 4 | "description": "[``botocore``] Update route53 client to latest version", 5 | "type": "api-change" 6 | }, 7 | { 8 | "category": "``apigateway``", 9 | "description": "[``botocore``] Update apigateway client to latest version", 10 | "type": "api-change" 11 | }, 12 | { 13 | "category": "``mediastore-data``", 14 | "description": "[``botocore``] Update mediastore-data client to latest version", 15 | "type": "api-change" 16 | } 17 | ] -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.4.1.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "Session", 4 | "description": "Expose available_profiles property for Session (``#704 `__)", 5 | "type": "feature" 6 | }, 7 | { 8 | "category": "s3", 9 | "description": "Fix issue when transfers would not exit quickly from signals", 10 | "type": "bugfix" 11 | }, 12 | { 13 | "category": "``sqs.Queue``", 14 | "description": "Fix issue in DeadLetterSourceQueues collection", 15 | "type": "bugfix" 16 | } 17 | ] -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.5.16.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "``application-autoscaling``", 4 | "description": "[``botocore``] Update application-autoscaling client to latest version", 5 | "type": "api-change" 6 | }, 7 | { 8 | "category": "``autoscaling-plans``", 9 | "description": "[``botocore``] Update autoscaling-plans client to latest version", 10 | "type": "api-change" 11 | }, 12 | { 13 | "category": "``rds``", 14 | "description": "[``botocore``] Update rds client to latest version", 15 | "type": "api-change" 16 | } 17 | ] -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/docs/source/guide/index.rst: -------------------------------------------------------------------------------- 1 | .. _user_guides: 2 | 3 | +++++++++++ 4 | User Guides 5 | +++++++++++ 6 | 7 | Migration Guides 8 | ================ 9 | .. toctree:: 10 | 11 | new 12 | migration 13 | upgrading 14 | 15 | 16 | General Feature Guides 17 | ====================== 18 | 19 | .. toctree:: 20 | 21 | resources 22 | collections 23 | clients 24 | paginators 25 | session 26 | configuration 27 | events 28 | 29 | 30 | Service Feature Guides 31 | ====================== 32 | 33 | .. toctree:: 34 | 35 | dynamodb 36 | s3 37 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/0.0.15.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "Packaging", 4 | "description": "Fix an issue with the Amazon S3 ``upload_file`` and ``download_file`` customization. (`issue 85 `__)", 5 | "type": "bugfix" 6 | }, 7 | { 8 | "category": "Resource", 9 | "description": "Fix an issue with the Amazon S3 ``BucketNofitication`` resource.", 10 | "type": "bugfix" 11 | }, 12 | { 13 | "category": "Botocore", 14 | "description": "Update to Botocore 0.103.0.", 15 | "type": "feature" 16 | } 17 | ] 18 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2013-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"). You 4 | may not use this file except in compliance with the License. A copy of 5 | the License is located at 6 | 7 | http://aws.amazon.com/apache2.0/ 8 | 9 | or in the "license" file accompanying this file. This file is 10 | distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | ANY KIND, either express or implied. See the License for the specific 12 | language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/tests/unit/data/todo/2015-04-01/waiters-2.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "waiters": { 4 | "ToDoReady": { 5 | "delay": 20, 6 | "operation": "GetToDo", 7 | "maxAttempts": 25, 8 | "acceptors": [ 9 | { 10 | "expected": "READY", 11 | "matcher": "path", 12 | "state": "success", 13 | "argument": "ToDo.Status" 14 | }, 15 | { 16 | "expected": "DONE", 17 | "matcher": "path", 18 | "state": "success", 19 | "argument": "ToDo.Status" 20 | } 21 | ] 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3/s3/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/docs/source/_templates/layout.html: -------------------------------------------------------------------------------- 1 | {%- extends "!layout.html" %} 2 | 3 | {%- block breadcrumbs %} 4 | {{ super() }} 5 | 6 | {%- endblock %} 7 | 8 | 9 | {%- block footer %} 10 | {{ super() }} 11 | 12 | 20 | {%- endblock %} 21 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3/ec2/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3/dynamodb/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/boto3/ec2/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/boto3/s3/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/scripts/ci/run-integ-tests: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Don't run tests from the root repo dir. 3 | # We want to ensure we're importing from the installed 4 | # binary package not from the CWD. 5 | 6 | import os 7 | from subprocess import check_call 8 | 9 | _dname = os.path.dirname 10 | 11 | REPO_ROOT = _dname(_dname(_dname(os.path.abspath(__file__)))) 12 | os.chdir(os.path.join(REPO_ROOT, 'tests')) 13 | 14 | 15 | def run(command): 16 | return check_call(command, shell=True) 17 | 18 | 19 | run('nosetests --with-xunit --cover-erase --with-coverage ' 20 | '--cover-package boto3 --cover-xml -v integration') 21 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/boto3/dynamodb/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/tests/unit/ec2/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the 'License'). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the 'license' file accompanying this file. This file is 10 | # distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/tests/functional/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/tests/integration/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/tests/unit/dynamodb/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/tests/functional/dynamodb/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/scripts/ci/install: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import sys 4 | from subprocess import check_call 5 | import shutil 6 | 7 | _dname = os.path.dirname 8 | 9 | REPO_ROOT = _dname(_dname(_dname(os.path.abspath(__file__)))) 10 | os.chdir(REPO_ROOT) 11 | 12 | 13 | def run(command): 14 | return check_call(command, shell=True) 15 | 16 | run('pip install -r requirements.txt') 17 | run('pip install coverage') 18 | if os.path.isdir('dist') and os.listdir('dist'): 19 | shutil.rmtree('dist') 20 | run('python setup.py bdist_wheel') 21 | wheel_dist = os.listdir('dist')[0] 22 | run('pip install %s' % (os.path.join('dist', wheel_dist))) 23 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.5.13.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "``ssm``", 4 | "description": "[``botocore``] Update ssm client to latest version", 5 | "type": "api-change" 6 | }, 7 | { 8 | "category": "``elbv2``", 9 | "description": "[``botocore``] Update elbv2 client to latest version", 10 | "type": "api-change" 11 | }, 12 | { 13 | "category": "``rds``", 14 | "description": "[``botocore``] Update rds client to latest version", 15 | "type": "api-change" 16 | }, 17 | { 18 | "category": "``elb``", 19 | "description": "[``botocore``] Update elb client to latest version", 20 | "type": "api-change" 21 | } 22 | ] -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/0.0.18.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "DynamoDB", 4 | "description": "Add document level interface for Table resource (`issue 103 `__)", 5 | "type": "feature" 6 | }, 7 | { 8 | "category": "DynamoDB", 9 | "description": "Add ConditionExpression interface for querying and filtering Table resource. (`issue 103 `__)", 10 | "type": "feature" 11 | }, 12 | { 13 | "category": "Clients", 14 | "description": "Add support for passing of ``botocore.client.Config`` object to instantiation of clients.", 15 | "type": "feature" 16 | } 17 | ] 18 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.5.6.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "``ecs``", 4 | "description": "[``botocore``] Update ecs client to latest version", 5 | "type": "api-change" 6 | }, 7 | { 8 | "category": "``ec2``", 9 | "description": "[``botocore``] Update ec2 client to latest version", 10 | "type": "api-change" 11 | }, 12 | { 13 | "category": "``inspector``", 14 | "description": "[``botocore``] Update inspector client to latest version", 15 | "type": "api-change" 16 | }, 17 | { 18 | "category": "``sagemaker``", 19 | "description": "[``botocore``] Update sagemaker client to latest version", 20 | "type": "api-change" 21 | } 22 | ] -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/scripts/ci/run-tests: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Don't run tests from the root repo dir. 3 | # We want to ensure we're importing from the installed 4 | # binary package not from the CWD. 5 | 6 | import os 7 | import sys 8 | from subprocess import check_call 9 | 10 | _dname = os.path.dirname 11 | 12 | REPO_ROOT = _dname(_dname(_dname(os.path.abspath(__file__)))) 13 | os.chdir(os.path.join(REPO_ROOT, 'tests')) 14 | 15 | args = sys.argv[1:] 16 | if not args: 17 | args = ['unit/', 'functional/'] 18 | 19 | check_call(['nosetests', '--with-coverage', '--cover-erase', 20 | '--cover-package', 'boto3', '--with-xunit', '--cover-xml', 21 | '-v'] + args) 22 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.5.23.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "``cloud9``", 4 | "description": "[``botocore``] Update cloud9 client to latest version", 5 | "type": "api-change" 6 | }, 7 | { 8 | "category": "``acm``", 9 | "description": "[``botocore``] Update acm client to latest version", 10 | "type": "api-change" 11 | }, 12 | { 13 | "category": "``kinesis``", 14 | "description": "[``botocore``] Update kinesis client to latest version", 15 | "type": "api-change" 16 | }, 17 | { 18 | "category": "``opsworks``", 19 | "description": "[``botocore``] Update opsworks client to latest version", 20 | "type": "api-change" 21 | } 22 | ] -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/0.0.4.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "Botocore", 4 | "description": "Update to Botocore 0.77.0", 5 | "type": "feature" 6 | }, 7 | { 8 | "category": "EC2", 9 | "description": "Update `Amazon EC2 `__)", 20 | "type": "bugfix" 21 | } 22 | ] 23 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.1.2.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "``session.Session``", 4 | "description": "Add ``events`` property to access session's event emitter. (`issue 204 `__)", 5 | "type": "feature" 6 | }, 7 | { 8 | "category": "``Glacier.Account``", 9 | "description": "Fix issue with resource model. (`issue 196 `__)", 10 | "type": "bugfix" 11 | }, 12 | { 13 | "category": "``DynamoDB``", 14 | "description": "Fix misspelling of error class to ``DynamoDBOperationNotSupportedError``. (`issue 218 `__)", 15 | "type": "bugfix" 16 | } 17 | ] 18 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.2.2.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "Dependencies", 4 | "description": "Relax version constraint of ``futures`` to support version 3.x.", 5 | "type": "feature" 6 | }, 7 | { 8 | "category": "Resources", 9 | "description": "Allow ``config`` object to be provided when creating resources (`issue 325 `__)", 10 | "type": "feature" 11 | }, 12 | { 13 | "category": "Documentation", 14 | "description": "Add docstrings for resource collections and waiters (`issue 267 `__, `issue 261 `__)", 15 | "type": "feature" 16 | } 17 | ] 18 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.5.24.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "``servicediscovery``", 4 | "description": "[``botocore``] Update servicediscovery client to latest version", 5 | "type": "api-change" 6 | }, 7 | { 8 | "category": "``servicecatalog``", 9 | "description": "[``botocore``] Update servicecatalog client to latest version", 10 | "type": "api-change" 11 | }, 12 | { 13 | "category": "``ssm``", 14 | "description": "[``botocore``] Update ssm client to latest version", 15 | "type": "api-change" 16 | }, 17 | { 18 | "category": "``glue``", 19 | "description": "[``botocore``] Update glue client to latest version", 20 | "type": "api-change" 21 | } 22 | ] -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.5.5.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "``ec2``", 4 | "description": "[``botocore``] Update ec2 client to latest version", 5 | "type": "api-change" 6 | }, 7 | { 8 | "category": "Paginator", 9 | "description": "[``botocore``] Added paginator support for lambda list aliases operation.", 10 | "type": "enhancement" 11 | }, 12 | { 13 | "category": "``kinesisanalytics``", 14 | "description": "[``botocore``] Update kinesisanalytics client to latest version", 15 | "type": "api-change" 16 | }, 17 | { 18 | "category": "``codebuild``", 19 | "description": "[``botocore``] Update codebuild client to latest version", 20 | "type": "api-change" 21 | } 22 | ] -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.3.1.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "S3", 4 | "description": "Add custom load to ObjectSummary", 5 | "type": "feature" 6 | }, 7 | { 8 | "category": "Session", 9 | "description": "Add method to get session credentials", 10 | "type": "feature" 11 | }, 12 | { 13 | "category": "DynamoDB", 14 | "description": "Ensure batch writer never sends more than flush_amount (`#483 `__)", 15 | "type": "bugfix" 16 | }, 17 | { 18 | "category": "Resources", 19 | "description": "Add get_available_subresources to Resources (`#113 `__)", 20 | "type": "feature" 21 | } 22 | ] 23 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/0.0.10.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "Documentation", 4 | "description": "Name collisions are now handled at the resource model layer instead of the factory, meaning that the documentation now uses the correct names. (`issue 67 `__)", 5 | "type": "bugfix" 6 | }, 7 | { 8 | "category": "Session", 9 | "description": "Add a ``region_name`` option when creating a session. (`issue 69 `__, `issue 21 `__)", 10 | "type": "feature" 11 | }, 12 | { 13 | "category": "Botocore", 14 | "description": "Update to Botocore 0.94.0", 15 | "type": "feature" 16 | } 17 | ] 18 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/0.0.11.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "Resources", 4 | "description": "Add Amazon EC2 support for ClassicLink actions and add a delete action to EC2 ``Volume`` resources.", 5 | "type": "feature" 6 | }, 7 | { 8 | "category": "Resources", 9 | "description": "Add a ``load`` operation and ``user`` reference to AWS IAM's ``CurrentUser`` resource. (`issue 72 `__,", 10 | "type": "feature" 11 | }, 12 | { 13 | "category": "Resources", 14 | "description": "Add resources for AWS IAM managed policies. (`issue 71 `__)", 15 | "type": "feature" 16 | }, 17 | { 18 | "category": "Botocore", 19 | "description": "Update to Botocore 0.97.0", 20 | "type": "feature" 21 | } 22 | ] 23 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/0.0.8.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "Resources", 4 | "description": "Fix Amazon S3 resource identifier order. (`issue 62 `__)", 5 | "type": "bugfix" 6 | }, 7 | { 8 | "category": "Resources", 9 | "description": "Fix collection resource hydration path. (`issue 61 `__)", 10 | "type": "bugfix" 11 | }, 12 | { 13 | "category": "Resources", 14 | "description": "Re-enable service-level access to all resources, allowing e.g. ``obj = s3.Object('bucket', 'key')``. (`issue 60 `__)", 15 | "type": "bugfix" 16 | }, 17 | { 18 | "category": "Botocore", 19 | "description": "Update to Botocore 0.87.0", 20 | "type": "feature" 21 | } 22 | ] 23 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/0.0.2.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "Resources", 4 | "description": "Adds resources for `AWS CloudFormation `_ and `AWS OpsWorks `_.", 5 | "type": "feature" 6 | }, 7 | { 8 | "category": "Botocore", 9 | "description": "Update to Botocore 0.73.0 and JMESPath 0.5.0", 10 | "type": "feature" 11 | }, 12 | { 13 | "category": "Clients", 14 | "description": "Adds support for `AWS CodeDeploy `_, `AWS Config `_, `AWS KMS `_, `AWS Lambda `_.", 15 | "type": "feature" 16 | }, 17 | { 18 | "category": "UserAgent", 19 | "description": "Make requests with a customized HTTP user-agent", 20 | "type": "feature" 21 | } 22 | ] 23 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/0.0.6.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "Amazon SQS", 4 | "description": "Add ``purge`` action to queue resources", 5 | "type": "feature" 6 | }, 7 | { 8 | "category": "Waiters", 9 | "description": "Add documentation for client and resource waiters (`issue 44 `__)", 10 | "type": "feature" 11 | }, 12 | { 13 | "category": "Waiters", 14 | "description": "Add support for resource waiters (`issue 43 `__)", 15 | "type": "feature" 16 | }, 17 | { 18 | "category": "Installation", 19 | "description": "Remove dependency on the unused ``six`` module (`issue 42 `__)", 20 | "type": "bugfix" 21 | }, 22 | { 23 | "category": "Botocore", 24 | "description": "Update to Botocore 0.80.0", 25 | "type": "feature" 26 | } 27 | ] 28 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/greengrass_common/common_log_appender.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # this log appender is shared among all components of python lambda runtime, including: 5 | # greengrass_common/greengrass_message.py, greengrass_ipc_python_sdk/ipc_client.py, 6 | # greengrass_ipc_python_sdk/utils/exponential_backoff.py, lambda_runtime/lambda_runtime.py. 7 | # so that all log records will be emitted to local Cloudwatch. 8 | import logging.handlers 9 | 10 | from greengrass_common.local_cloudwatch_handler import LocalCloudwatchLogHandler 11 | 12 | # https://docs.python.org/2/library/logging.html#logrecord-attributes 13 | LOCAL_CLOUDWATCH_FORMAT = '[%(levelname)s]-%(filename)s:%(lineno)d,%(message)s' 14 | 15 | local_cloudwatch_handler = LocalCloudwatchLogHandler('GreengrassSystem', 'python_runtime') 16 | local_cloudwatch_handler.setFormatter(logging.Formatter(LOCAL_CLOUDWATCH_FORMAT)) 17 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/docs/source/guide/session.rst: -------------------------------------------------------------------------------- 1 | .. _guide_session: 2 | 3 | Session 4 | ======= 5 | A session manages state about a particular configuration. By default a 6 | session is created for you when needed. However it is possible and 7 | recommended to maintain your own session(s) in some scenarios. Sessions 8 | typically store: 9 | 10 | * Credentials 11 | * Region 12 | * Other configurations 13 | 14 | Default Session 15 | --------------- 16 | The ``boto3`` module acts as a proxy to the default session, which is 17 | created automatically when needed. Example default session use:: 18 | 19 | # Using the default session 20 | sqs = boto3.client('sqs') 21 | s3 = boto3.resource('s3') 22 | 23 | Custom Session 24 | -------------- 25 | It is also possible to manage your own session and create clients or 26 | resources from it:: 27 | 28 | # Creating your own session 29 | session = boto3.session.Session() 30 | 31 | sqs = session.client('sqs') 32 | s3 = session.resource('s3') 33 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/docs/source/reference/core/resources.rst: -------------------------------------------------------------------------------- 1 | .. _ref_core_resources: 2 | 3 | =================== 4 | Resources Reference 5 | =================== 6 | 7 | Resource Model 8 | -------------- 9 | 10 | .. automodule:: boto3.resources.model 11 | :members: 12 | :undoc-members: 13 | :inherited-members: 14 | 15 | Request Parameters 16 | ------------------ 17 | 18 | .. automodule:: boto3.resources.params 19 | :members: 20 | :undoc-members: 21 | 22 | Response Handlers 23 | ----------------- 24 | 25 | .. automodule:: boto3.resources.response 26 | :members: 27 | :undoc-members: 28 | 29 | Resource Actions 30 | ---------------- 31 | 32 | .. automodule:: boto3.resources.action 33 | :members: 34 | :undoc-members: 35 | 36 | Resource Base 37 | ------------- 38 | 39 | .. automodule:: boto3.resources.base 40 | :members: 41 | :undoc-members: 42 | 43 | Resource Factory 44 | ---------------- 45 | 46 | .. automodule:: boto3.resources.factory 47 | :members: 48 | :undoc-members: 49 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.2.0.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "Docstrings", 4 | "description": "Add docstrings for resource identifiers, attributes, references, and subresources. (`issue 239 `__)", 5 | "type": "feature" 6 | }, 7 | { 8 | "category": "``S3``", 9 | "description": "Add ability to configure host addressing style when making requests to Amazon S3. (`botocore issue 673 `__)", 10 | "type": "feature" 11 | }, 12 | { 13 | "category": "``IAM``", 14 | "description": "Fix model issue with attached groups, roles, and policies. (`issue 304 `__)", 15 | "type": "bugfix" 16 | }, 17 | { 18 | "category": "``EC2.ServiceResource.create_key_pair``", 19 | "description": "Fix model issue where creating key pair does not have a ``key_material`` on ``KeyPair`` resource. (`issue 290 `__)", 20 | "type": "bugfix" 21 | } 22 | ] 23 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.2.3.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "``CloudWatch``", 4 | "description": "Add resource model. (`issue 412 `__)", 5 | "type": "feature" 6 | }, 7 | { 8 | "category": "``S3``", 9 | "description": "Add a start_restore() on Object and ObjectSummary resources. (`issue 408 `__)", 10 | "type": "feature" 11 | }, 12 | { 13 | "category": "Documentation", 14 | "description": "Add examples for S3. (`issue 402 `__)", 15 | "type": "feature" 16 | }, 17 | { 18 | "category": "Collections", 19 | "description": "Fix regression where filters could not be chained. (`issue 401 `__)", 20 | "type": "bugfix" 21 | }, 22 | { 23 | "category": "``S3``", 24 | "description": "Progress callback will be triggered when rewinding stream. (`issue 395 `__)", 25 | "type": "bugfix" 26 | } 27 | ] 28 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/docs/source/guide/examples.rst: -------------------------------------------------------------------------------- 1 | .. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | 3 | This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 4 | International License (the "License"). You may not use this file except in compliance with the 5 | License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. 6 | 7 | This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 8 | either express or implied. See the License for the specific language governing permissions and 9 | limitations under the License. 10 | 11 | .. _aws-boto3-examples: 12 | 13 | ############# 14 | Code Examples 15 | ############# 16 | 17 | This section provides code examples that demonstrate common Amazon Web Services scenarios using the 18 | Amazon Web Services (AWS) SDK for Python. 19 | 20 | .. toctree:: 21 | :maxdepth: 1 22 | 23 | cw-examples 24 | ec2-examples 25 | iam-examples 26 | s3-examples 27 | sqs-examples 28 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/tests/functional/dynamodb/test_table.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | from tests import unittest, mock 14 | 15 | import boto3 16 | 17 | 18 | class TestTableResourceCustomizations(unittest.TestCase): 19 | 20 | maxDiff = None 21 | 22 | def setUp(self): 23 | self.resource = boto3.resource('dynamodb', 'us-east-1') 24 | 25 | def test_resource_has_batch_writer_added(self): 26 | table = self.resource.Table('mytable') 27 | self.assertTrue(hasattr(table, 'batch_writer')) 28 | -------------------------------------------------------------------------------- /recogFace-5df11a97-4041-4996-96a4-d27deacf10df/response/detect-faces-response.json: -------------------------------------------------------------------------------- 1 | {"FaceDetails": [{"BoundingBox": {"Width": 0.37220844626426697, "Top": 0.097087375819683075, "Height": 0.56011950969696045, "Left": 0.60049629211425781}, "Landmarks": [{"Y": 0.29746288061141968, "X": 0.74046933650970459, "Type": "eyeLeft"}, {"Y": 0.39010941982269287, "X": 0.85312539339065552, "Type": "eyeRight"}, {"Y": 0.43307429552078247, "X": 0.80672019720077515, "Type": "nose"}, {"Y": 0.51852452754974365, "X": 0.7020527720451355, "Type": "mouthLeft"}, {"Y": 0.56728619337081909, "X": 0.78770458698272705, "Type": "mouthRight"}], "Pose": {"Yaw": 25.503475189208984, "Roll": 27.584785461425781, "Pitch": 16.070867538452148}, "Quality": {"Sharpness": 140.0, "Brightness": 45.784263610839844}, "Confidence": 99.999870300292969}], "ResponseMetadata": {"RetryAttempts": 0, "HTTPStatusCode": 200, "RequestId": "5ec8d1f8-a853-11e6-ae5a-0f6c6597f701", "HTTPHeaders": {"date": "Fri, 11 Nov 2016 21:11:12 GMT", "x-amzn-requestid": "5ec8d1f8-a853-11e6-ae5a-0f6c6597f701", "content-length": "699", "content-type": "application/x-amz-json-1.1", "connection": "keep-alive"}}, "OrientationCorrection": "ROTATE_0"} 2 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/docs/source/reference/customizations/s3.rst: -------------------------------------------------------------------------------- 1 | .. _ref_custom_s3: 2 | 3 | ========================== 4 | S3 Customization Reference 5 | ========================== 6 | 7 | S3 Transfers 8 | ------------ 9 | 10 | .. note:: 11 | 12 | All classes documented below are considered public and thus will not be 13 | exposed to breaking changes. If a class from the ``boto3.s3.transfer`` 14 | module is not documented below, it is considered internal and users 15 | should be very cautious in directly using them because breaking changes may 16 | be introduced from version to version of the library. It is recommended to 17 | use the variants of the transfer functions injected into the S3 client 18 | instead. 19 | 20 | .. seealso:: 21 | :py:meth:`S3.Client.upload_file` 22 | :py:meth:`S3.Client.upload_fileobj` 23 | :py:meth:`S3.Client.download_file` 24 | :py:meth:`S3.Client.download_fileobj` 25 | 26 | 27 | 28 | .. autoclass:: boto3.s3.transfer.TransferConfig 29 | :members: 30 | :undoc-members: 31 | 32 | .. autoclass:: boto3.s3.transfer.S3Transfer 33 | :members: 34 | :undoc-members: 35 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.5.0.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "Filters", 4 | "description": "Fixes a bug where parameters passed to resource collections could be mutated after the collections were created.", 5 | "type": "bugfix" 6 | }, 7 | { 8 | "category": "``ses``", 9 | "description": "[``botocore``] Update ses client to latest version", 10 | "type": "api-change" 11 | }, 12 | { 13 | "category": "credentials", 14 | "description": "[``botocore``] Moved the JSONFileCache from the CLI into botocore so that it can be used without importing from the cli.", 15 | "type": "enhancement" 16 | }, 17 | { 18 | "category": "``botocore`` dependency", 19 | "description": "Update dependency strategy to always take a floor on the most recent version of ``botocore``. This means whenever there is a release of ``botocore``, ``boto3`` will release as well to account for the new version of ``botocore``.", 20 | "type": "feature" 21 | }, 22 | { 23 | "category": "``apigateway``", 24 | "description": "[``botocore``] Update apigateway client to latest version", 25 | "type": "api-change" 26 | } 27 | ] -------------------------------------------------------------------------------- /deepLensTestTrigger.txt: -------------------------------------------------------------------------------- 1 | { 2 | "Records": [ 3 | { 4 | "eventVersion": "2.0", 5 | "eventTime": "1970-01-01T00:00:00.000Z", 6 | "requestParameters": { 7 | "sourceIPAddress": "104.129.204.151" 8 | }, 9 | "s3": { 10 | "configurationId": "7902f566-23c7-4860-81b8-20ce3396cf7e", 11 | "object": { 12 | "eTag": "e63a7da06ce8c4e532340bc9c8fc85d7", 13 | "sequencer": "005A7E06C047C1640A", 14 | "key": "capturedFrame.jpg", 15 | "size": 5108 16 | }, 17 | "bucket": { 18 | "arn": "arn:aws:s3:::rekog-face", 19 | "name": "rekog-face", 20 | "ownerIdentity": { 21 | "principalId": "A2IA102JX7L3ZH" 22 | } 23 | }, 24 | "s3SchemaVersion": "1.0" 25 | }, 26 | "responseElements": { 27 | "x-amz-id-2": "SQ/YBAXlZDG49shbteEfsUVW8oAM+fEedmKiIkc1q6SsDdcVgPNJdKN9OIbeL6ElUlxiaOopwqA=", 28 | "x-amz-request-id": "B7F790371A4E9283" 29 | }, 30 | "awsRegion": "us-east-1", 31 | "eventName": "ObjectCreated:Put", 32 | "userIdentity": { 33 | "principalId": "A2IA102JX7L3ZH" 34 | }, 35 | "eventSource": "aws:s3" 36 | } 37 | ] 38 | } -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3/docs/client.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | from botocore.docs.client import ClientDocumenter 14 | 15 | 16 | class Boto3ClientDocumenter(ClientDocumenter): 17 | def _add_client_creation_example(self, section): 18 | section.style.start_codeblock() 19 | section.style.new_line() 20 | section.write('import boto3') 21 | section.style.new_line() 22 | section.style.new_line() 23 | section.write( 24 | 'client = boto3.client(\'{service}\')'.format( 25 | service=self._service_name) 26 | ) 27 | section.style.end_codeblock() 28 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/boto3/docs/client.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | from botocore.docs.client import ClientDocumenter 14 | 15 | 16 | class Boto3ClientDocumenter(ClientDocumenter): 17 | def _add_client_creation_example(self, section): 18 | section.style.start_codeblock() 19 | section.style.new_line() 20 | section.write('import boto3') 21 | section.style.new_line() 22 | section.style.new_line() 23 | section.write( 24 | 'client = boto3.client(\'{service}\')'.format( 25 | service=self._service_name) 26 | ) 27 | section.style.end_codeblock() 28 | -------------------------------------------------------------------------------- /beanstalkUI/app.js: -------------------------------------------------------------------------------- 1 | var port = process.env.PORT || 3000, 2 | http = require('http'), 3 | fs = require('fs'), 4 | html = fs.readFileSync('index.html'); 5 | 6 | var log = function(entry) { 7 | fs.appendFileSync('/tmp/sample-app.log', new Date().toISOString() + ' - ' + entry + '\n'); 8 | }; 9 | 10 | var server = http.createServer(function (req, res) { 11 | if (req.method === 'POST') { 12 | var body = ''; 13 | 14 | req.on('data', function(chunk) { 15 | body += chunk; 16 | }); 17 | 18 | req.on('end', function() { 19 | if (req.url === '/') { 20 | log('Received message: ' + body); 21 | } else if (req.url = '/scheduled') { 22 | log('Received task ' + req.headers['x-aws-sqsd-taskname'] + ' scheduled at ' + req.headers['x-aws-sqsd-scheduled-at']); 23 | } 24 | 25 | res.writeHead(200, 'OK', {'Content-Type': 'text/plain'}); 26 | res.end(); 27 | }); 28 | } else { 29 | res.writeHead(200); 30 | res.write(html); 31 | res.end(); 32 | } 33 | }); 34 | 35 | // Listen on port 3000, IP defaults to 127.0.0.1 36 | server.listen(port); 37 | 38 | // Put a friendly message on the terminal 39 | console.log('Server running at http://127.0.0.1:' + port + '/'); 40 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/docs/source/guide/cw-examples.rst: -------------------------------------------------------------------------------- 1 | .. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | 3 | This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 4 | International License (the "License"). You may not use this file except in compliance with the 5 | License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. 6 | 7 | This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 8 | either express or implied. See the License for the specific language governing permissions and 9 | limitations under the License. 10 | 11 | .. _aws-boto3-cw-examples: 12 | 13 | ########################## 14 | Amazon CloudWatch Examples 15 | ########################## 16 | 17 | You can use the following examples to access Amazon Cloudwatch (CloudWatch) by using Amazon Boto. For more 18 | information about ClodWatch, see the `CloudWatch Developer Guide `_. 19 | 20 | **Examples** 21 | 22 | .. toctree:: 23 | :maxdepth: 1 24 | 25 | cw-example-creating-alarms 26 | cw-example-using-alarms 27 | cw-example-metrics 28 | cw-example-events 29 | cw-example-subscription-filters 30 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3/ec2/deletetags.py: -------------------------------------------------------------------------------- 1 | # Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | from boto3.resources.action import CustomModeledAction 14 | 15 | 16 | def inject_delete_tags(event_emitter, **kwargs): 17 | action_model = { 18 | 'request': { 19 | 'operation': 'DeleteTags', 20 | 'params': [{ 21 | 'target': 'Resources[0]', 22 | 'source': 'identifier', 23 | 'name': 'Id' 24 | }] 25 | } 26 | } 27 | action = CustomModeledAction( 28 | 'delete_tags', action_model, delete_tags, event_emitter) 29 | action.inject(**kwargs) 30 | 31 | 32 | def delete_tags(self, **kwargs): 33 | kwargs['Resources'] = [self.id] 34 | return self.meta.client.delete_tags(**kwargs) 35 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/boto3/ec2/deletetags.py: -------------------------------------------------------------------------------- 1 | # Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | from boto3.resources.action import CustomModeledAction 14 | 15 | 16 | def inject_delete_tags(event_emitter, **kwargs): 17 | action_model = { 18 | 'request': { 19 | 'operation': 'DeleteTags', 20 | 'params': [{ 21 | 'target': 'Resources[0]', 22 | 'source': 'identifier', 23 | 'name': 'Id' 24 | }] 25 | } 26 | } 27 | action = CustomModeledAction( 28 | 'delete_tags', action_model, delete_tags, event_emitter) 29 | action.inject(**kwargs) 30 | 31 | 32 | def delete_tags(self, **kwargs): 33 | kwargs['Resources'] = [self.id] 34 | return self.meta.client.delete_tags(**kwargs) 35 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/docs/source/index.rst: -------------------------------------------------------------------------------- 1 | .. Boto3 documentation master file, created by 2 | sphinx-quickstart on Wed Sep 3 11:11:30 2014. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Boto 3 Documentation 7 | ==================== 8 | Boto is the Amazon Web Services (AWS) SDK for Python, which allows Python 9 | developers to write software that makes use of Amazon services like S3 and 10 | EC2. Boto provides an easy to use, object-oriented API as well as low-level 11 | direct service access. 12 | 13 | 14 | Quickstart 15 | ---------- 16 | 17 | .. toctree:: 18 | :maxdepth: 2 19 | 20 | guide/quickstart 21 | guide/sqs 22 | guide/examples 23 | 24 | User Guide 25 | ---------- 26 | 27 | .. toctree:: 28 | 29 | guide/index 30 | 31 | 32 | 33 | API Reference 34 | ------------- 35 | 36 | Services 37 | ~~~~~~~~ 38 | 39 | .. toctree:: 40 | :maxdepth: 3 41 | 42 | reference/services/index 43 | 44 | Core 45 | ~~~~ 46 | 47 | .. toctree:: 48 | :maxdepth: 3 49 | 50 | reference/core/index 51 | 52 | Customizations 53 | ~~~~~~~~~~~~~~ 54 | 55 | .. toctree:: 56 | :maxdepth: 3 57 | 58 | reference/customizations/index 59 | 60 | Indices and tables 61 | ================== 62 | 63 | * :ref:`genindex` 64 | * :ref:`modindex` 65 | * :ref:`search` 66 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.5.25.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "``ds``", 4 | "description": "[``botocore``] Update ds client to latest version", 5 | "type": "api-change" 6 | }, 7 | { 8 | "category": "``appstream``", 9 | "description": "[``botocore``] Update appstream client to latest version", 10 | "type": "api-change" 11 | }, 12 | { 13 | "category": "``medialive``", 14 | "description": "[``botocore``] Update medialive client to latest version", 15 | "type": "api-change" 16 | }, 17 | { 18 | "category": "``budgets``", 19 | "description": "[``botocore``] Update budgets client to latest version", 20 | "type": "api-change" 21 | }, 22 | { 23 | "category": "``gamelift``", 24 | "description": "[``botocore``] Update gamelift client to latest version", 25 | "type": "api-change" 26 | }, 27 | { 28 | "category": "``dynamodb``", 29 | "description": "[``botocore``] Update dynamodb client to latest version", 30 | "type": "api-change" 31 | }, 32 | { 33 | "category": "``dms``", 34 | "description": "[``botocore``] Update dms client to latest version", 35 | "type": "api-change" 36 | }, 37 | { 38 | "category": "``mediastore``", 39 | "description": "[``botocore``] Update mediastore client to latest version", 40 | "type": "api-change" 41 | } 42 | ] -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/docs/source/guide/sqs-examples.rst: -------------------------------------------------------------------------------- 1 | .. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | 3 | This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 4 | International License (the "License"). You may not use this file except in compliance with the 5 | License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. 6 | 7 | This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 8 | either express or implied. See the License for the specific language governing permissions and 9 | limitations under the License. 10 | 11 | .. _aws-boto3-sqs-examples: 12 | 13 | ################### 14 | Amazon SQS Examples 15 | ################### 16 | 17 | .. meta:: 18 | :description: 19 | :keywords: AWS IAM SQS code examples for Boto3 20 | 21 | You can use the following examples to access Amazon Simple Queue Service (Amazon SQS) using 22 | AWS Boto. For more information about Amazon SQS, see the `Amazon SQS documentation 23 | `_. 24 | 25 | **Examples** 26 | 27 | .. toctree:: 28 | :maxdepth: 1 29 | 30 | sqs-example-using-queues 31 | sqs-example-sending-receiving-msgs 32 | sqs-example-visibility-timeout 33 | sqs-example-long-polling 34 | sqs-example-dead-letter-queue 35 | 36 | 37 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/greengrasssdk/utils/testing.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | 5 | import json 6 | from functools import wraps 7 | from greengrass_common.env_vars import MY_FUNCTION_ARN 8 | 9 | 10 | def mock(func): 11 | """ 12 | mock decorates _invoke_internal by checking if MY_FUNCTION_ARN is present 13 | if MY_FUNCTION_ARN is present, the actual _invoke_internal is invoked 14 | otherwise, the mock _invoke_internal is invoked 15 | """ 16 | @wraps(func) 17 | def mock_invoke_internal(self, function_arn, payload, client_context, invocation_type="RequestResponse"): 18 | if MY_FUNCTION_ARN is None: 19 | if invocation_type == 'RequestResponse': 20 | return { 21 | 'Payload': json.dumps({ 22 | 'TestKey': 'TestValue' 23 | }), 24 | 'FunctionError': '' 25 | } 26 | elif invocation_type == 'Event': 27 | return { 28 | 'Payload': b'', 29 | 'FunctionError': '' 30 | } 31 | else: 32 | raise Exception('Unsupported invocation type {}'.format(invocation_type)) 33 | else: 34 | return func(self, function_arn, payload, client_context, invocation_type) 35 | return mock_invoke_internal 36 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/0.0.7.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "Resources", 4 | "description": "Enable support for Amazon Glacier.", 5 | "type": "feature" 6 | }, 7 | { 8 | "category": "Resources", 9 | "description": "Support plural references and nested JMESPath queries for data members when building parameters and identifiers. (`issue 52 `__)", 10 | "type": "feature" 11 | }, 12 | { 13 | "category": "Resources", 14 | "description": "Update to the latest resource JSON format. This is a **backward-incompatible** change as not all resources are exposed at the service level anymore. For example, ``s3.Object('bucket', 'key')`` is now ``s3.Bucket('bucket').Object('key')``. (`issue 51 `__)", 15 | "type": "feature" 16 | }, 17 | { 18 | "category": "Resources", 19 | "description": "Make ``resource.meta`` a proper object. This allows you to do things like ``resource.meta.client``. This is a **backward- incompatible** change. (`issue 45 `__)", 20 | "type": "feature" 21 | }, 22 | { 23 | "category": "Dependency", 24 | "description": "Update to JMESPath 0.6.1", 25 | "type": "feature" 26 | }, 27 | { 28 | "category": "Botocore", 29 | "description": "Update to Botocore 0.86.0", 30 | "type": "feature" 31 | } 32 | ] 33 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.4.0.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "DynamoDB", 4 | "description": "Add request auto de-duplication based on specified primary keys for batch_writer. (`#605 `__)", 5 | "type": "feature" 6 | }, 7 | { 8 | "category": "s3", 9 | "description": "Add managed file-like object uploads to S3 client, Bucket, and Object.", 10 | "type": "feature" 11 | }, 12 | { 13 | "category": "Session", 14 | "description": "Fixed Session.__repr__ region argument name.", 15 | "type": "bugfix" 16 | }, 17 | { 18 | "category": "s3", 19 | "description": "Add managed copies to S3 client, Bucket, and Object.", 20 | "type": "feature" 21 | }, 22 | { 23 | "category": "s3", 24 | "description": "Add managed downloads to file-like objects in the S3 client, Bucket, and Object.", 25 | "type": "feature" 26 | }, 27 | { 28 | "category": "s3", 29 | "description": "Port ``s3.transfer`` module to use ``s3transfer`` package. Please refer to `Upgrading Notes `_ when upgrading. In porting the logic over, various performance issues and bugs were fixed.", 30 | "type": "bugfix" 31 | }, 32 | { 33 | "category": "s3", 34 | "description": "Add ``io_chunksize`` parameter to ``TransferConfig``", 35 | "type": "feature" 36 | } 37 | ] 38 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/tests/functional/test_collection.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | from tests import unittest 14 | 15 | from boto3.session import Session 16 | from boto3.resources.collection import ResourceCollection 17 | 18 | 19 | class TestCollection(unittest.TestCase): 20 | def setUp(self): 21 | self.session = Session( 22 | aws_access_key_id='dummy', aws_secret_access_key='dummy', 23 | region_name='us-east-1') 24 | # Pick an arbitrary resource. 25 | self.ec2_resource = self.session.resource('ec2') 26 | 27 | def test_can_use_collection_methods(self): 28 | self.assertIsInstance( 29 | self.ec2_resource.instances.all(), ResourceCollection) 30 | 31 | def test_can_chain_methods(self): 32 | self.assertIsInstance( 33 | self.ec2_resource.instances.all().page_size(5), ResourceCollection) 34 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/tests/unit/docs/test_subresource.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | from tests.unit.docs import BaseDocsTest 14 | 15 | from boto3.docs.subresource import SubResourceDocumenter 16 | 17 | 18 | class TestSubResourceDocumenter(BaseDocsTest): 19 | def test_document_sub_resources(self): 20 | sub_resource_documentor = SubResourceDocumenter(self.resource) 21 | sub_resource_documentor.document_sub_resources(self.doc_structure) 22 | self.assert_contains_lines_in_order([ 23 | '.. py:method:: Sample(name)', 24 | ' Creates a Sample resource.::', 25 | " sample = myservice.Sample('name')", 26 | ' :type name: string', 27 | " :param name: The Sample's name identifier.", 28 | ' :rtype: :py:class:`MyService.Sample`', 29 | ' :returns: A Sample resource', 30 | ]) 31 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3/docs/base.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | from botocore.compat import OrderedDict 14 | 15 | 16 | class BaseDocumenter(object): 17 | def __init__(self, resource): 18 | self._resource = resource 19 | self._client = self._resource.meta.client 20 | self._resource_model = self._resource.meta.resource_model 21 | self._service_model = self._client.meta.service_model 22 | self._resource_name = self._resource.meta.resource_model.name 23 | self._service_name = self._service_model.service_name 24 | self._service_docs_name = self._client.__class__.__name__ 25 | self.member_map = OrderedDict() 26 | self.represents_service_resource = ( 27 | self._service_name == self._resource_name) 28 | 29 | @property 30 | def class_name(self): 31 | return '%s.%s' % (self._service_docs_name, self._resource_name) 32 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/boto3/docs/base.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | from botocore.compat import OrderedDict 14 | 15 | 16 | class BaseDocumenter(object): 17 | def __init__(self, resource): 18 | self._resource = resource 19 | self._client = self._resource.meta.client 20 | self._resource_model = self._resource.meta.resource_model 21 | self._service_model = self._client.meta.service_model 22 | self._resource_name = self._resource.meta.resource_model.name 23 | self._service_name = self._service_model.service_name 24 | self._service_docs_name = self._client.__class__.__name__ 25 | self.member_map = OrderedDict() 26 | self.represents_service_resource = ( 27 | self._service_name == self._resource_name) 28 | 29 | @property 30 | def class_name(self): 31 | return '%s.%s' % (self._service_docs_name, self._resource_name) 32 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/.changes/1.5.21.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category": "``lambda``", 4 | "description": "[``botocore``] Update lambda client to latest version", 5 | "type": "api-change" 6 | }, 7 | { 8 | "category": "``codebuild``", 9 | "description": "[``botocore``] Update codebuild client to latest version", 10 | "type": "api-change" 11 | }, 12 | { 13 | "category": "``alexaforbusiness``", 14 | "description": "[``botocore``] Update alexaforbusiness client to latest version", 15 | "type": "api-change" 16 | }, 17 | { 18 | "category": "Presign", 19 | "description": "[``botocore``] Fix issue where some events were not fired during the presigning of a request thus not including a variety of customizations (`#1340 `__)", 20 | "type": "bugfix" 21 | }, 22 | { 23 | "category": "Credentials", 24 | "description": "[``botocore``] Improved error message when the source profile for an assume role is misconfigured. Fixes aws/aws-cli`#2763 `__", 25 | "type": "enhancement" 26 | }, 27 | { 28 | "category": "``guardduty``", 29 | "description": "[``botocore``] Update guardduty client to latest version", 30 | "type": "api-change" 31 | }, 32 | { 33 | "category": "Paginator", 34 | "description": "[``botocore``] Added paginators for a number of services where the result key is unambiguous.", 35 | "type": "enhancment" 36 | } 37 | ] -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/CONTRIBUTING.rst: -------------------------------------------------------------------------------- 1 | For more information, please see the official docs at 2 | https://boto3.readthedocs.io/ 3 | 4 | Contributing Code 5 | ----------------- 6 | A good pull request: 7 | 8 | - Is clear. 9 | - Works across all supported versions of Python. 10 | - Follows the existing style of the code base (PEP-8). 11 | - Has comments included as needed. 12 | 13 | - A test case that demonstrates the previous flaw that now passes with 14 | the included patch, or demonstrates the newly added feature. 15 | - If it adds/changes a public API, it must also include documentation 16 | for those changes. 17 | - Must be appropriately licensed (Apache 2.0). 18 | 19 | Reporting An Issue/Feature 20 | -------------------------- 21 | First, check to see if there's an existing issue/pull request for the 22 | bug/feature. All issues are at 23 | https://github.com/boto/boto3/issues and pull reqs are at 24 | https://github.com/boto/boto3/pulls. 25 | 26 | If there isn't an existing issue there, please file an issue. The 27 | ideal report includes: 28 | 29 | - A description of the problem/suggestion. 30 | - How to recreate the bug. 31 | - If relevant, including the versions of your: 32 | 33 | - Python interpreter 34 | - Boto 3 35 | - Optionally of the other dependencies involved (e.g. Botocore) 36 | 37 | - If possible, create a pull request with a (failing) test case 38 | demonstrating what's wrong. This makes the process for fixing bugs 39 | quicker & gets issues resolved sooner. 40 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/tests/unit/ec2/test_deletetags.py: -------------------------------------------------------------------------------- 1 | # Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the 'License'). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the 'license' file accompanying this file. This file is 10 | # distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | import unittest 14 | import mock 15 | 16 | from boto3.ec2.deletetags import delete_tags 17 | 18 | 19 | class TestDeleteTags(unittest.TestCase): 20 | def setUp(self): 21 | self.client = mock.Mock() 22 | self.resource = mock.Mock() 23 | self.resource.meta.client = self.client 24 | self.instance_id = 'instance_id' 25 | self.resource.id = self.instance_id 26 | 27 | def test_delete_tags(self): 28 | tags = { 29 | 'Tags': [ 30 | {'Key': 'key1', 'Value': 'value1'}, 31 | {'Key': 'key2', 'Value': 'value2'}, 32 | {'Key': 'key3', 'Value': 'value3'} 33 | ] 34 | } 35 | 36 | delete_tags(self.resource, **tags) 37 | 38 | kwargs = tags 39 | kwargs['Resources'] = [self.instance_id] 40 | self.client.delete_tags.assert_called_with(**kwargs) 41 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/tests/functional/docs/test_s3.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | from tests.functional.docs import BaseDocsFunctionalTests 14 | 15 | from boto3.session import Session 16 | from boto3.docs.service import ServiceDocumenter 17 | 18 | 19 | class TestS3Customizations(BaseDocsFunctionalTests): 20 | def setUp(self): 21 | self.documenter = ServiceDocumenter( 22 | 's3', session=Session(region_name='us-east-1')) 23 | self.generated_contents = self.documenter.document_service() 24 | self.generated_contents = self.generated_contents.decode('utf-8') 25 | 26 | def test_file_transfer_methods_are_documented(self): 27 | self.assert_contains_lines_in_order([ 28 | '.. py:class:: S3.Client', 29 | ' * :py:meth:`~S3.Client.download_file`', 30 | ' * :py:meth:`~S3.Client.upload_file`', 31 | ' .. py:method:: download_file(', 32 | ' .. py:method:: upload_file('], 33 | self.generated_contents 34 | ) 35 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/docs/source/guide/ec2-examples.rst: -------------------------------------------------------------------------------- 1 | .. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | 3 | This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 4 | International License (the "License"). You may not use this file except in compliance with the 5 | License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. 6 | 7 | This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 8 | either express or implied. See the License for the specific language governing permissions and 9 | limitations under the License. 10 | 11 | .. _aws-boto-ec2-examples: 12 | 13 | ################### 14 | Amazon EC2 Examples 15 | ################### 16 | 17 | .. meta:: 18 | :description: 19 | :keywords: AWS EC2 code examples for the AWS SDK for Python 20 | 21 | Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides resizeable computing 22 | capacity in servers in Amazon's data centers—that you use to build and host your software systems. 23 | 24 | You can use the following examples to access Amazon EC2 using the Amazon Web Services (AWS) SDK for Python. 25 | For more information about Amazon EC2, see the `Amazon EC2 Documentation `_. 26 | 27 | **Examples** 28 | 29 | .. toctree:: 30 | :maxdepth: 1 31 | 32 | ec2-example-managing-instances 33 | ec2-example-key-pairs 34 | ec2-example-regions-avail-zones 35 | ec2-example-security-group 36 | ec2-example-elastic-ip-addresses 37 | 38 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/tests/integration/test_sqs.py: -------------------------------------------------------------------------------- 1 | # Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | 14 | import boto3.session 15 | 16 | from tests import unittest, unique_id 17 | 18 | 19 | class TestSQSResource(unittest.TestCase): 20 | def setUp(self): 21 | self.session = boto3.session.Session(region_name='us-west-2') 22 | self.sqs = self.session.resource('sqs') 23 | self.queue_name = unique_id('boto3-test') 24 | 25 | def test_sqs(self): 26 | # Create a new resource 27 | queue = self.sqs.create_queue(QueueName=self.queue_name) 28 | self.addCleanup(queue.delete) 29 | 30 | # Call an action 31 | queue.send_message(MessageBody='test') 32 | 33 | # Get pre-populated resources and access attributes 34 | messages = queue.receive_messages(WaitTimeSeconds=1) 35 | 36 | self.assertEqual(len(messages), 1) 37 | self.addCleanup(messages[0].delete) 38 | 39 | self.assertEqual(queue.url, messages[0].queue_url) 40 | self.assertEqual('test', messages[0].body) 41 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3/examples/cloudfront.rst: -------------------------------------------------------------------------------- 1 | Generate a signed URL for Amazon CloudFront 2 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 | 4 | The following example shows how to generate a signed URL for Amazon CloudFront. 5 | Note that you will need the ``cryptography`` `library `__ to follow this example:: 6 | 7 | import datetime 8 | 9 | from cryptography.hazmat.backends import default_backend 10 | from cryptography.hazmat.primitives import hashes 11 | from cryptography.hazmat.primitives import serialization 12 | from cryptography.hazmat.primitives.asymmetric import padding 13 | from botocore.signers import CloudFrontSigner 14 | 15 | 16 | def rsa_signer(message): 17 | with open('path/to/key.pem', 'rb') as key_file: 18 | private_key = serialization.load_pem_private_key( 19 | key_file.read(), 20 | password=None, 21 | backend=default_backend() 22 | ) 23 | signer = private_key.signer(padding.PKCS1v15(), hashes.SHA1()) 24 | signer.update(message) 25 | return signer.finalize() 26 | 27 | key_id = 'AKIAIOSFODNN7EXAMPLE' 28 | url = 'http://d2949o5mkkp72v.cloudfront.net/hello.txt' 29 | expire_date = datetime.datetime(2017, 1, 1) 30 | 31 | cloudfront_signer = CloudFrontSigner(key_id, rsa_signer) 32 | 33 | # Create a signed url that will be valid until the specfic expiry date 34 | # provided using a canned policy. 35 | signed_url = cloudfront_signer.generate_presigned_url( 36 | url, date_less_than=expire_date) 37 | print(signed_url) 38 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/tests/functional/test_utils.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | from tests import unittest 14 | 15 | import botocore.session 16 | 17 | 18 | from boto3 import utils 19 | import boto3.session 20 | 21 | 22 | class TestUtils(unittest.TestCase): 23 | def test_runtime_error_raised_when_shadowing_client_method(self): 24 | botocore_session = botocore.session.get_session() 25 | session = boto3.session.Session(region_name='us-west-2', 26 | botocore_session=botocore_session) 27 | 28 | def shadows_put_object(class_attributes, **kwargs): 29 | utils.inject_attribute(class_attributes, 'put_object', 'invalid') 30 | 31 | botocore_session.register('creating-client-class', shadows_put_object) 32 | 33 | with self.assertRaises(RuntimeError): 34 | # This should raise an exception because we're trying to 35 | # shadow the put_object client method in the 36 | # shadows_put_object handler above. 37 | session.client('s3') 38 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/boto3/examples/cloudfront.rst: -------------------------------------------------------------------------------- 1 | Generate a signed URL for Amazon CloudFront 2 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 | 4 | The following example shows how to generate a signed URL for Amazon CloudFront. 5 | Note that you will need the ``cryptography`` `library `__ to follow this example:: 6 | 7 | import datetime 8 | 9 | from cryptography.hazmat.backends import default_backend 10 | from cryptography.hazmat.primitives import hashes 11 | from cryptography.hazmat.primitives import serialization 12 | from cryptography.hazmat.primitives.asymmetric import padding 13 | from botocore.signers import CloudFrontSigner 14 | 15 | 16 | def rsa_signer(message): 17 | with open('path/to/key.pem', 'rb') as key_file: 18 | private_key = serialization.load_pem_private_key( 19 | key_file.read(), 20 | password=None, 21 | backend=default_backend() 22 | ) 23 | signer = private_key.signer(padding.PKCS1v15(), hashes.SHA1()) 24 | signer.update(message) 25 | return signer.finalize() 26 | 27 | key_id = 'AKIAIOSFODNN7EXAMPLE' 28 | url = 'http://d2949o5mkkp72v.cloudfront.net/hello.txt' 29 | expire_date = datetime.datetime(2017, 1, 1) 30 | 31 | cloudfront_signer = CloudFrontSigner(key_id, rsa_signer) 32 | 33 | # Create a signed url that will be valid until the specfic expiry date 34 | # provided using a canned policy. 35 | signed_url = cloudfront_signer.generate_presigned_url( 36 | url, date_less_than=expire_date) 37 | print(signed_url) 38 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/tests/functional/docs/test_ec2.py: -------------------------------------------------------------------------------- 1 | # Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | from tests.functional.docs import BaseDocsFunctionalTests 14 | 15 | from boto3.session import Session 16 | from boto3.docs.service import ServiceDocumenter 17 | 18 | 19 | class TestInstanceDeleteTags(BaseDocsFunctionalTests): 20 | def setUp(self): 21 | self.documenter = ServiceDocumenter( 22 | 'ec2', session=Session(region_name='us-east-1')) 23 | self.generated_contents = self.documenter.document_service() 24 | self.generated_contents = self.generated_contents.decode('utf-8') 25 | 26 | def test_delete_tags_method_is_documented(self): 27 | contents = self.get_class_document_block( 28 | 'EC2.Instance', self.generated_contents) 29 | method_contents = self.get_method_document_block( 30 | 'delete_tags', contents) 31 | self.assert_contains_lines_in_order([ 32 | 'response = instance.delete_tags(', 33 | 'DryRun=True|False,', 34 | 'Tags=[', 35 | ], method_contents) 36 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3/compat.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | import sys 14 | import os 15 | import errno 16 | import socket 17 | 18 | from botocore.vendored import six 19 | 20 | if six.PY3: 21 | # In python3, socket.error is OSError, which is too general 22 | # for what we want (i.e FileNotFoundError is a subclass of OSError). 23 | # In py3 all the socket related errors are in a newly created 24 | # ConnectionError 25 | SOCKET_ERROR = ConnectionError 26 | else: 27 | SOCKET_ERROR = socket.error 28 | 29 | 30 | if sys.platform.startswith('win'): 31 | def rename_file(current_filename, new_filename): 32 | try: 33 | os.remove(new_filename) 34 | except OSError as e: 35 | if not e.errno == errno.ENOENT: 36 | # We only want to a ignore trying to remove 37 | # a file that does not exist. If it fails 38 | # for any other reason we should be propagating 39 | # that exception. 40 | raise 41 | os.rename(current_filename, new_filename) 42 | else: 43 | rename_file = os.rename 44 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/boto3/compat.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | import sys 14 | import os 15 | import errno 16 | import socket 17 | 18 | from botocore.vendored import six 19 | 20 | if six.PY3: 21 | # In python3, socket.error is OSError, which is too general 22 | # for what we want (i.e FileNotFoundError is a subclass of OSError). 23 | # In py3 all the socket related errors are in a newly created 24 | # ConnectionError 25 | SOCKET_ERROR = ConnectionError 26 | else: 27 | SOCKET_ERROR = socket.error 28 | 29 | 30 | if sys.platform.startswith('win'): 31 | def rename_file(current_filename, new_filename): 32 | try: 33 | os.remove(new_filename) 34 | except OSError as e: 35 | if not e.errno == errno.ENOENT: 36 | # We only want to a ignore trying to remove 37 | # a file that does not exist. If it fails 38 | # for any other reason we should be propagating 39 | # that exception. 40 | raise 41 | os.rename(current_filename, new_filename) 42 | else: 43 | rename_file = os.rename 44 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3/docs/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | import os 14 | 15 | from boto3.docs.service import ServiceDocumenter 16 | 17 | 18 | def generate_docs(root_dir, session): 19 | """Generates the reference documentation for botocore 20 | 21 | This will go through every available AWS service and output ReSTructured 22 | text files documenting each service. 23 | 24 | :param root_dir: The directory to write the reference files to. Each 25 | service's reference documentation is loacated at 26 | root_dir/reference/services/service-name.rst 27 | 28 | :param session: The boto3 session 29 | """ 30 | services_doc_path = os.path.join(root_dir, 'reference', 'services') 31 | if not os.path.exists(services_doc_path): 32 | os.makedirs(services_doc_path) 33 | 34 | for service_name in session.get_available_services(): 35 | docs = ServiceDocumenter(service_name, session).document_service() 36 | service_doc_path = os.path.join( 37 | services_doc_path, service_name + '.rst') 38 | with open(service_doc_path, 'wb') as f: 39 | f.write(docs) 40 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/boto3/docs/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | import os 14 | 15 | from boto3.docs.service import ServiceDocumenter 16 | 17 | 18 | def generate_docs(root_dir, session): 19 | """Generates the reference documentation for botocore 20 | 21 | This will go through every available AWS service and output ReSTructured 22 | text files documenting each service. 23 | 24 | :param root_dir: The directory to write the reference files to. Each 25 | service's reference documentation is loacated at 26 | root_dir/reference/services/service-name.rst 27 | 28 | :param session: The boto3 session 29 | """ 30 | services_doc_path = os.path.join(root_dir, 'reference', 'services') 31 | if not os.path.exists(services_doc_path): 32 | os.makedirs(services_doc_path) 33 | 34 | for service_name in session.get_available_services(): 35 | docs = ServiceDocumenter(service_name, session).document_service() 36 | service_doc_path = os.path.join( 37 | services_doc_path, service_name + '.rst') 38 | with open(service_doc_path, 'wb') as f: 39 | f.write(docs) 40 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3/ec2/createtags.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | 14 | 15 | def inject_create_tags(event_name, class_attributes, **kwargs): 16 | """This injects a custom create_tags method onto the ec2 service resource 17 | 18 | This is needed because the resource model is not able to express 19 | creating multiple tag resources based on the fact you can apply a set 20 | of tags to multiple ec2 resources. 21 | """ 22 | class_attributes['create_tags'] = create_tags 23 | 24 | 25 | def create_tags(self, **kwargs): 26 | # Call the client method 27 | self.meta.client.create_tags(**kwargs) 28 | resources = kwargs.get('Resources', []) 29 | tags = kwargs.get('Tags', []) 30 | tag_resources = [] 31 | 32 | # Generate all of the tag resources that just were created with the 33 | # preceding client call. 34 | for resource in resources: 35 | for tag in tags: 36 | # Add each tag from the tag set for each resource to the list 37 | # that is returned by the method. 38 | tag_resource = self.Tag(resource, tag['Key'], tag['Value']) 39 | tag_resources.append(tag_resource) 40 | return tag_resources 41 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/boto3/ec2/createtags.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | 14 | 15 | def inject_create_tags(event_name, class_attributes, **kwargs): 16 | """This injects a custom create_tags method onto the ec2 service resource 17 | 18 | This is needed because the resource model is not able to express 19 | creating multiple tag resources based on the fact you can apply a set 20 | of tags to multiple ec2 resources. 21 | """ 22 | class_attributes['create_tags'] = create_tags 23 | 24 | 25 | def create_tags(self, **kwargs): 26 | # Call the client method 27 | self.meta.client.create_tags(**kwargs) 28 | resources = kwargs.get('Resources', []) 29 | tags = kwargs.get('Tags', []) 30 | tag_resources = [] 31 | 32 | # Generate all of the tag resources that just were created with the 33 | # preceding client call. 34 | for resource in resources: 35 | for tag in tags: 36 | # Add each tag from the tag set for each resource to the list 37 | # that is returned by the method. 38 | tag_resource = self.Tag(resource, tag['Key'], tag['Value']) 39 | tag_resources.append(tag_resource) 40 | return tag_resources 41 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/docs/source/guide/new.rst: -------------------------------------------------------------------------------- 1 | .. _guide_new: 2 | 3 | What's New 4 | ========== 5 | Boto 3 is a ground-up rewrite of Boto. It uses a data-driven approach to 6 | generate classes at runtime from JSON description files that are shared 7 | between SDKs in various languages. This includes descriptions for a 8 | high level, object oriented interface similar to those available in 9 | previous versions of Boto. 10 | 11 | Because Boto 3 is generated from these shared JSON files, we get 12 | fast updates to the latest services and features and a consistent 13 | API across services. Community contributions to JSON description 14 | files in other SDKs also benefit Boto 3, just as contributions to 15 | Boto 3 benefit the other SDKs. 16 | 17 | Major Features 18 | -------------- 19 | Boto 3 consists of the following major features: 20 | 21 | * **Resources**: a high level, object oriented interface 22 | * **Collections**: a tool to iterate and manipulate groups of resources 23 | * **Clients**: low level service connections 24 | * **Paginators**: automatic paging of responses 25 | * **Waiters**: a way to block until a certain state has been reached 26 | 27 | Along with these major features, Boto 3 also provides *sessions* and 28 | per-session *credentials* & *configuration*, as well as basic 29 | components like *authentication*, *parameter* & *response* handling, 30 | an *event system* for customizations and logic to *retry* failed 31 | requests. 32 | 33 | Botocore 34 | ~~~~~~~~ 35 | Boto 3 is built atop of a library called 36 | `Botocore `_, which is shared by the 37 | `AWS CLI `_. Botocore provides the low level 38 | clients, session, and credential & configuration data. Boto 3 builds on top 39 | of Botocore by providing its own session, resources and collections. 40 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/docs/source/guide/s3-examples.rst: -------------------------------------------------------------------------------- 1 | .. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | 3 | This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 4 | International License (the "License"). You may not use this file except in compliance with the 5 | License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. 6 | 7 | This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 8 | either express or implied. See the License for the specific language governing permissions and 9 | limitations under the License. 10 | 11 | .. _aws-boto3-s3-examples: 12 | 13 | ################## 14 | Amazon S3 Examples 15 | ################## 16 | 17 | .. meta:: 18 | :description: 19 | :keywords: AWS S3 code examples for Boto3 20 | 21 | Amazon Simple Storage Service (Amazon S3) is a web service that provides highly scalable cloud storage. 22 | Amazon S3 provides easy to use object storage, with a simple web service interface to store and get 23 | any amount of data from anywhere on the web. 24 | 25 | The Python API for Amazon S3 is exposed through the AWS.S3 client class. For more information about 26 | Amazon S3, see the `Amazon S3 documentation `_. 27 | 28 | You can use the following examples to access Amazon Simple Storage Service (Amazon S3) using 29 | AWS Python SDK. For more information about Amazon S3, see the `Amazon S3 documentation `_. 30 | 31 | **Examples** 32 | 33 | .. toctree:: 34 | :maxdepth: 1 35 | 36 | s3-example-creating-buckets 37 | s3-example-download-file 38 | s3-example-configuring-buckets 39 | s3-example-access-permissions 40 | s3-example-bucket-policies 41 | s3-example-static-web-host 42 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | """ 4 | distutils/setuptools install script. 5 | """ 6 | import os 7 | import re 8 | 9 | from setuptools import setup, find_packages 10 | 11 | 12 | ROOT = os.path.dirname(__file__) 13 | VERSION_RE = re.compile(r'''__version__ = ['"]([0-9.]+)['"]''') 14 | 15 | 16 | requires = [ 17 | 'botocore>=1.8.40,<1.9.0', 18 | 'jmespath>=0.7.1,<1.0.0', 19 | 's3transfer>=0.1.10,<0.2.0' 20 | ] 21 | 22 | 23 | def get_version(): 24 | init = open(os.path.join(ROOT, 'boto3', '__init__.py')).read() 25 | return VERSION_RE.search(init).group(1) 26 | 27 | 28 | setup( 29 | name='boto3', 30 | version=get_version(), 31 | description='The AWS SDK for Python', 32 | long_description=open('README.rst').read(), 33 | author='Amazon Web Services', 34 | url='https://github.com/boto/boto3', 35 | scripts=[], 36 | packages=find_packages(exclude=['tests*']), 37 | package_data={ 38 | 'boto3': [ 39 | 'data/aws/resources/*.json', 40 | 'examples/*.rst' 41 | ] 42 | }, 43 | include_package_data=True, 44 | install_requires=requires, 45 | license="Apache License 2.0", 46 | classifiers=[ 47 | 'Development Status :: 5 - Production/Stable', 48 | 'Intended Audience :: Developers', 49 | 'Natural Language :: English', 50 | 'License :: OSI Approved :: Apache Software License', 51 | 'Programming Language :: Python', 52 | 'Programming Language :: Python :: 2.6', 53 | 'Programming Language :: Python :: 2.7', 54 | 'Programming Language :: Python :: 3', 55 | 'Programming Language :: Python :: 3.3', 56 | 'Programming Language :: Python :: 3.4', 57 | 'Programming Language :: Python :: 3.5', 58 | 'Programming Language :: Python :: 3.6', 59 | ], 60 | ) 61 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/tests/unit/data/todo/2015-04-01/resources-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "service": { 3 | "actions": { 4 | "CreateToDo": { 5 | "request": { "operation": "CreateToDo" }, 6 | "resource": { 7 | "type": "ToDo", 8 | "identifiers": [ 9 | { "target": "Id", "source": "response", "path": "Id" } 10 | ] 11 | } 12 | } 13 | }, 14 | "has": { 15 | "ToDo": { 16 | "resource": { 17 | "type": "ToDo", 18 | "identifiers": [ 19 | { "target": "Id", "source": "input" } 20 | ] 21 | } 22 | } 23 | }, 24 | "hasMany": { 25 | "ToDos": { 26 | "request": { "operation": "DescribeToDos" }, 27 | "resource": { 28 | "type": "ToDo", 29 | "identifiers": [ 30 | { "target": "Id", "source": "response", "path": "ToDoList[].Id" } 31 | ] 32 | } 33 | } 34 | } 35 | }, 36 | "resources": { 37 | "ToDo": { 38 | "identifiers": [ 39 | { "name": "Id" } 40 | ], 41 | "shape": "ToDoItem", 42 | "actions": { 43 | "Delete": { 44 | "request": { 45 | "operation": "DeleteToDo", 46 | "params": [ 47 | { "target": "Id", "source": "identifier", "name": "Id" } 48 | ] 49 | } 50 | } 51 | }, 52 | "waiters": { 53 | "Ready": { 54 | "waiterName": "ToDoReady", 55 | "params": [ 56 | { "target": "Id", "source": "identifier", "name": "Id" } 57 | ] 58 | } 59 | }, 60 | "has": { 61 | "MySelf": { 62 | "resource": { 63 | "type": "ToDo", 64 | "identifiers": [ 65 | { "target": "Id", "source": "data", "path": "Id" } 66 | ] 67 | } 68 | } 69 | } 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/greengrass_common/function_arn_fields.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | 5 | import re 6 | 7 | ARN_FIELD_REGEX = \ 8 | 'arn:aws:lambda:([a-z]{2}-[a-z]+-\d{1}):(\d{12}):function:([a-zA-Z0-9-_]+)(?::(\$LATEST|[a-zA-Z0-9-_]+))?' 9 | 10 | 11 | class FunctionArnFields: 12 | """ 13 | This class takes in a string representing a Lambda function's ARN (the qualifier is optional), parses that string 14 | into individual fields for region, account_id, name and qualifier. It also has a static method for creating a 15 | Function ARN string from those subfields. 16 | """ 17 | @staticmethod 18 | def build_arn_string(region, account_id, name, qualifier): 19 | if qualifier: 20 | return 'arn:aws:lambda:{region}:{account_id}:function:{name}:{qualifier}'.format( 21 | region=region, account_id=account_id, name=name, qualifier=qualifier 22 | ) 23 | else: 24 | return 'arn:aws:lambda:{region}:{account_id}:function:{name}'.format( 25 | region=region, account_id=account_id, name=name 26 | ) 27 | 28 | def __init__(self, function_arn_string): 29 | self.parse_function_arn(function_arn_string) 30 | 31 | def parse_function_arn(self, function_arn_string): 32 | regex_match = re.match(ARN_FIELD_REGEX, function_arn_string) 33 | if regex_match: 34 | region, account_id, name, qualifier = map( 35 | lambda s: s.replace(':', '') if s else s, regex_match.groups() 36 | ) 37 | else: 38 | raise ValueError('Cannot parse given string as a function ARN.') 39 | 40 | self.region = region 41 | self.account_id = account_id 42 | self.name = name 43 | self.qualifier = qualifier 44 | 45 | def to_arn_string(self): 46 | return FunctionArnFields.build_arn_string(self.region, self.account_id, self.name, self.qualifier) 47 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/tests/unit/docs/test_utils.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | from tests import unittest 14 | 15 | from boto3.resources.model import Parameter 16 | from boto3.docs.utils import get_resource_ignore_params 17 | 18 | 19 | class TestGetResourceIgnoreParams(unittest.TestCase): 20 | def test_target_is_single_resource(self): 21 | param = Parameter('InstanceId', 'response') 22 | ignore_params = get_resource_ignore_params([param]) 23 | self.assertEqual(ignore_params, ['InstanceId']) 24 | 25 | def test_target_is_multiple_resources(self): 26 | param = Parameter('InstanceIds[]', 'response') 27 | ignore_params = get_resource_ignore_params([param]) 28 | self.assertEqual(ignore_params, ['InstanceIds']) 29 | 30 | def test_target_is_element_of_multiple_resources(self): 31 | param = Parameter('InstanceIds[0]', 'response') 32 | ignore_params = get_resource_ignore_params([param]) 33 | self.assertEqual(ignore_params, ['InstanceIds']) 34 | 35 | def test_target_is_nested_param(self): 36 | param = Parameter('Filters[0].Name', 'response') 37 | ignore_params = get_resource_ignore_params([param]) 38 | self.assertEqual(ignore_params, ['Filters']) 39 | 40 | param = Parameter('Filters[0].Values[0]', 'response') 41 | ignore_params = get_resource_ignore_params([param]) 42 | self.assertEqual(ignore_params, ['Filters']) 43 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/tests/unit/docs/test_waiter.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | from tests.unit.docs import BaseDocsTest 14 | 15 | from boto3.docs.waiter import WaiterResourceDocumenter 16 | 17 | 18 | class TestWaiterResourceDocumenter(BaseDocsTest): 19 | def test_document_resource_waiters(self): 20 | service_waiter_model = self.botocore_session.get_waiter_model( 21 | 'myservice') 22 | subresource = self.resource.Sample('mysample') 23 | waiter_documenter = WaiterResourceDocumenter( 24 | subresource, service_waiter_model) 25 | waiter_documenter.document_resource_waiters(self.doc_structure) 26 | self.assert_contains_lines_in_order([ 27 | '.. py:method:: wait_until_complete(**kwargs)', 28 | (' Waits until this Sample is complete. This method calls ' 29 | ':py:meth:`MyService.Waiter.sample_operation_complete.wait` ' 30 | 'which polls. :py:meth:`MyService.Client.sample_operation` ' 31 | 'every 15 seconds until a successful state is reached. An ' 32 | 'error is returned after 40 failed checks.'), 33 | ' **Request Syntax** ', 34 | ' ::', 35 | ' sample.wait_until_complete(', 36 | " Bar='string'", 37 | ' )', 38 | ' :type Bar: string', 39 | ' :param Bar: Documents Bar', 40 | ' :returns: None' 41 | ]) 42 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/docs/source/guide/iam-examples.rst: -------------------------------------------------------------------------------- 1 | .. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | 3 | This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 4 | International License (the "License"). You may not use this file except in compliance with the 5 | License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. 6 | 7 | This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 8 | either express or implied. See the License for the specific language governing permissions and 9 | limitations under the License. 10 | 11 | .. _aws-boto-iam-examples: 12 | 13 | ########################################### 14 | AWS Identity and Access Management Examples 15 | ########################################### 16 | 17 | .. meta:: 18 | :description: 19 | :keywords: AWS IAM code examples for the Amazon Web Services (AWS) SDK for Python 20 | 21 | 22 | AWS Identity and Access Management (IAM) is a web service that enables Amazon Web Services (AWS) 23 | customers to manage users and user permissions in AWS. The service is targeted at organizations with 24 | multiple users or systems in the cloud that use AWS products such as Amazon EC2, Amazon SimpleDB, and 25 | the AWS Management Console. With IAM, you can centrally manage users, security credentials such as 26 | access keys, and permissions that control which AWS resources users can access. 27 | 28 | You can use the following examples to access AWS Identity and Access Management (IAM) using the 29 | Amazon Web Services (AWS) SDK for Python. 30 | For more information about IAM, see the `IAM documentation `_. 31 | 32 | **Examples** 33 | 34 | .. toctree:: 35 | :maxdepth: 1 36 | 37 | iam-example-managing-users 38 | iam-example-policies 39 | iam-example-managing-access-keys 40 | iam-example-server-certificates 41 | iam-example-managing-account-aliases 42 | 43 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/tests/functional/test_session.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | from tests import unittest 14 | 15 | import boto3.session 16 | 17 | 18 | class TestSession(unittest.TestCase): 19 | def setUp(self): 20 | self.session = boto3.session.Session(region_name='us-west-2') 21 | 22 | def test_events_attribute(self): 23 | # Create some function to register. 24 | def my_handler(my_list, **kwargs): 25 | return my_list.append('my_handler called') 26 | 27 | # Register the handler to the event. 28 | self.session.events.register('myevent', my_handler) 29 | 30 | initial_list = [] 31 | # Emit the event. 32 | self.session.events.emit('myevent', my_list=initial_list) 33 | # Ensure that the registered handler was called. 34 | self.assertEqual(initial_list, ['my_handler called']) 35 | 36 | def test_can_access_region_property(self): 37 | session = boto3.session.Session(region_name='us-west-1') 38 | self.assertEqual(session.region_name, 'us-west-1') 39 | 40 | def test_get_available_partitions(self): 41 | partitions = self.session.get_available_partitions() 42 | self.assertIsInstance(partitions, list) 43 | self.assertTrue(partitions) 44 | 45 | def test_get_available_regions(self): 46 | regions = self.session.get_available_regions('s3') 47 | self.assertIsInstance(regions, list) 48 | self.assertTrue(regions) 49 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/tests/integration/test_session.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | from tests import unittest, unique_id 14 | import botocore.session 15 | 16 | import boto3.session 17 | 18 | 19 | class TestUserAgentCustomizations(unittest.TestCase): 20 | def setUp(self): 21 | self.botocore_session = botocore.session.get_session() 22 | self.session = boto3.session.Session( 23 | region_name='us-west-2', botocore_session=self.botocore_session) 24 | self.actual_user_agent = None 25 | self.botocore_session.register('request-created', 26 | self.record_user_agent) 27 | 28 | def record_user_agent(self, request, **kwargs): 29 | self.actual_user_agent = request.headers['User-Agent'] 30 | 31 | def test_client_user_agent(self): 32 | client = self.session.client('s3') 33 | client.list_buckets() 34 | self.assertIn('Boto3', self.actual_user_agent) 35 | self.assertIn('Botocore', self.actual_user_agent) 36 | self.assertIn('Python', self.actual_user_agent) 37 | # We should *not* have any mention of resource 38 | # when using clients directly. 39 | self.assertNotIn('Resource', self.actual_user_agent) 40 | 41 | def test_resource_user_agent_has_customization(self): 42 | resource = self.session.resource('s3') 43 | list(resource.buckets.all()) 44 | # We should have customized the user agent for 45 | # resource calls with "Resource". 46 | self.assertTrue(self.actual_user_agent.endswith(' Resource')) 47 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/tests/integration/test_collections.py: -------------------------------------------------------------------------------- 1 | # Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | 14 | import boto3.session 15 | 16 | from boto3.resources.collection import CollectionManager 17 | 18 | 19 | # A map of services to regions that cannot use us-west-2 20 | # for the integration tests. 21 | REGION_MAP = { 22 | 'opsworks': 'us-east-1' 23 | } 24 | 25 | # A list of collections to ignore. They require parameters 26 | # or are very slow to run. 27 | BLACKLIST = { 28 | 'ec2': ['images'], 29 | 'iam': ['signing_certificates'], 30 | 'sqs': ['dead_letter_source_queues'] 31 | } 32 | 33 | 34 | def test_all_collections(): 35 | # This generator yields test functions for every collection 36 | # on every available resource, except those which have 37 | # been blacklisted. 38 | session = boto3.session.Session() 39 | for service_name in session.get_available_resources(): 40 | resource = session.resource( 41 | service_name, 42 | region_name=REGION_MAP.get(service_name, 'us-west-2')) 43 | 44 | for key in dir(resource): 45 | if key in BLACKLIST.get(service_name, []): 46 | continue 47 | 48 | value = getattr(resource, key) 49 | if isinstance(value, CollectionManager): 50 | yield _test_collection, service_name, key, value 51 | 52 | def _test_collection(service_name, collection_name, collection): 53 | # Create a list of the first page of items. This tests that 54 | # a remote request can be made, the response parsed, and that 55 | # resources are successfully created. 56 | list(collection.limit(1)) 57 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/tests/functional/test_resource.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | import boto3 14 | from boto3.exceptions import ResourceNotExistsError 15 | 16 | import botocore.session 17 | from tests import unittest 18 | 19 | 20 | def identity(self, x): 21 | return x 22 | 23 | 24 | class TestResourceCustomization(unittest.TestCase): 25 | def setUp(self): 26 | self.botocore_session = botocore.session.get_session() 27 | 28 | def add_new_method(self, name): 29 | def handler(class_attributes, **kwargs): 30 | class_attributes[name] = identity 31 | return handler 32 | 33 | def test_can_inject_method_onto_resource(self): 34 | session = boto3.Session(botocore_session=self.botocore_session) 35 | self.botocore_session.register('creating-resource-class.s3', 36 | self.add_new_method(name='my_method')) 37 | resource = session.resource('s3') 38 | self.assertTrue(hasattr(resource, 'my_method')) 39 | self.assertEqual(resource.my_method('anything'), 'anything') 40 | 41 | 42 | class TestSessionErrorMessages(unittest.TestCase): 43 | def test_has_good_error_message_when_no_resource(self): 44 | bad_resource_name = 'doesnotexist' 45 | err_regex = ( 46 | '%s.*resource does not exist.' % bad_resource_name 47 | ) 48 | with self.assertRaisesRegexp(ResourceNotExistsError, err_regex): 49 | boto3.resource(bad_resource_name) 50 | 51 | 52 | class TestGetAvailableSubresources(unittest.TestCase): 53 | def test_s3_available_subresources_exists(self): 54 | s3 = boto3.resource('s3') 55 | self.assertTrue(hasattr(s3, 'get_available_subresources')) 56 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/docs/source/guide/upgrading.rst: -------------------------------------------------------------------------------- 1 | =============== 2 | Upgrading Notes 3 | =============== 4 | 5 | Notes to refer to when upgrading ``boto3`` versions. 6 | 7 | 8 | 1.4.2 9 | ===== 10 | 11 | * The ``use_threads`` option was added to 12 | :py:class:`boto3.s3.transfer.TransferConfig`. 13 | Starting in version ``1.4.0``, all managed S3 transfer methods became 14 | threaded instead of possibly being threaded. If it is not desired to use 15 | threads for managed S3 transfers, set ``use_threads`` to ``False``. 16 | 17 | 18 | 1.4.0 19 | ===== 20 | 21 | * Logic from the `s3transfer `_ package 22 | was ported into the ``boto3.s3.transfer`` module. In upgrading to this 23 | new version of ``boto3``, code that relies on the public classes and 24 | interfaces of ``boto3.s3.transfer``, such as 25 | :py:class:`boto3.s3.transfer.S3Transfer` and 26 | :py:class:`boto3.s3.transfer.TransferConfig`, should not be affected. 27 | However, code that relies on the internal classes and functionality of the 28 | ``boto3.s3.transfer`` module may be affected in upgrading: 29 | 30 | * Removed internal classes such as ``MultipartUploader``, 31 | ``MultipartDownloader``, ``ReadFileChunk``, etc. All of the managed 32 | transfer logic now lives inside of ``s3transfer`` and as a result these 33 | internal classes are no longer used and is essentially dead code. 34 | 35 | * Custom implementations of ``OSUtils`` may see the 36 | ``open_file_chunk_reader`` method no longer being called when uploads 37 | occur. If this was for the purpose of being able to provide file-like 38 | objects for transfers, use the newly added ``upload_fileobj`` 39 | and ``download_fileobj`` methods that support both nonmultipart and 40 | multipart transfers. 41 | 42 | * By default, all managed transfer methods are now threaded. In prior 43 | versions, threads were only created if a non multipart upload or download 44 | was initiated. To run the managed transfer methods with no threads 45 | (i.e. all of the transfer logic happens in the main thread), set 46 | ``use_threads`` to ``False`` when providing a ``TransferConfig`` object. 47 | The ``use_threads`` option is only available in ``boto3`` versions higher 48 | than ``1.4.1``. 49 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/docs/source/guide/s3-example-download-file.rst: -------------------------------------------------------------------------------- 1 | .. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | 3 | This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 4 | International License (the "License"). You may not use this file except in compliance with the 5 | License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. 6 | 7 | This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 8 | either express or implied. See the License for the specific language governing permissions and 9 | limitations under the License. 10 | 11 | .. _aws-boto3-s3-download-file: 12 | 13 | #################################### 14 | Downloading a File from an S3 Bucket 15 | #################################### 16 | 17 | .. meta:: 18 | :description: Use the AWS SDK for Python (aka Boto) to download a file from an S3 bucket. 19 | :keywords: download file, s3, bucket 20 | 21 | This example shows how to download a file from an S3 bucket, using :py:meth:`S3.Bucket.download_file`. 22 | 23 | Prerequisites 24 | ============= 25 | 26 | To set up and run this example, you must first: 27 | 28 | * Configure your AWS credentials, as described in :doc:`quickstart`. 29 | * Create an S3 bucket and upload a file to the bucket. 30 | * Replace the ``BUCKET_NAME`` and ``KEY`` values in the code snippet with the name of your bucket and the key for the uploaded file. 31 | 32 | Downloading a File 33 | ================== 34 | 35 | The example below tries to download an S3 object to a file. If the service returns a 404 error, it prints an error message indicating that the object doesn't exist. 36 | 37 | .. code-block:: python 38 | 39 | import boto3 40 | import botocore 41 | 42 | BUCKET_NAME = 'my-bucket' # replace with your bucket name 43 | KEY = 'my_image_in_s3.jpg' # replace with your object key 44 | 45 | s3 = boto3.resource('s3') 46 | 47 | try: 48 | s3.Bucket(BUCKET_NAME).download_file(KEY, 'my_local_image.jpg') 49 | except botocore.exceptions.ClientError as e: 50 | if e.response['Error']['Code'] == "404": 51 | print("The object does not exist.") 52 | else: 53 | raise 54 | 55 | More Info 56 | ========= 57 | 58 | * :py:meth:`S3.Bucket.download_file` 59 | * :ref:`s3_guide` 60 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3/docs/attr.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | from botocore.docs.params import ResponseParamsDocumenter 14 | 15 | from boto3.docs.utils import get_identifier_description 16 | 17 | 18 | class ResourceShapeDocumenter(ResponseParamsDocumenter): 19 | EVENT_NAME = 'resource-shape' 20 | 21 | 22 | def document_attribute(section, service_name, resource_name, attr_name, 23 | event_emitter, attr_model, include_signature=True): 24 | if include_signature: 25 | section.style.start_sphinx_py_attr(attr_name) 26 | # Note that an attribute may have one, may have many, or may have no 27 | # operations that back the resource's shape. So we just set the 28 | # operation_name to the resource name if we ever to hook in and modify 29 | # a particular attribute. 30 | ResourceShapeDocumenter( 31 | service_name=service_name, operation_name=resource_name, 32 | event_emitter=event_emitter).document_params( 33 | section=section, 34 | shape=attr_model) 35 | 36 | 37 | def document_identifier(section, resource_name, identifier_model, 38 | include_signature=True): 39 | if include_signature: 40 | section.style.start_sphinx_py_attr(identifier_model.name) 41 | description = get_identifier_description( 42 | resource_name, identifier_model.name) 43 | description = '*(string)* ' + description 44 | section.write(description) 45 | 46 | 47 | def document_reference(section, reference_model, include_signature=True): 48 | if include_signature: 49 | section.style.start_sphinx_py_attr(reference_model.name) 50 | reference_type = '(:py:class:`%s`) ' % reference_model.resource.type 51 | section.write(reference_type) 52 | section.include_doc_string( 53 | 'The related %s if set, otherwise ``None``.' % reference_model.name 54 | ) 55 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/boto3/docs/attr.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | from botocore.docs.params import ResponseParamsDocumenter 14 | 15 | from boto3.docs.utils import get_identifier_description 16 | 17 | 18 | class ResourceShapeDocumenter(ResponseParamsDocumenter): 19 | EVENT_NAME = 'resource-shape' 20 | 21 | 22 | def document_attribute(section, service_name, resource_name, attr_name, 23 | event_emitter, attr_model, include_signature=True): 24 | if include_signature: 25 | section.style.start_sphinx_py_attr(attr_name) 26 | # Note that an attribute may have one, may have many, or may have no 27 | # operations that back the resource's shape. So we just set the 28 | # operation_name to the resource name if we ever to hook in and modify 29 | # a particular attribute. 30 | ResourceShapeDocumenter( 31 | service_name=service_name, operation_name=resource_name, 32 | event_emitter=event_emitter).document_params( 33 | section=section, 34 | shape=attr_model) 35 | 36 | 37 | def document_identifier(section, resource_name, identifier_model, 38 | include_signature=True): 39 | if include_signature: 40 | section.style.start_sphinx_py_attr(identifier_model.name) 41 | description = get_identifier_description( 42 | resource_name, identifier_model.name) 43 | description = '*(string)* ' + description 44 | section.write(description) 45 | 46 | 47 | def document_reference(section, reference_model, include_signature=True): 48 | if include_signature: 49 | section.style.start_sphinx_py_attr(reference_model.name) 50 | reference_type = '(:py:class:`%s`) ' % reference_model.resource.type 51 | section.write(reference_type) 52 | section.include_doc_string( 53 | 'The related %s if set, otherwise ``None``.' % reference_model.name 54 | ) 55 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/tests/unit/test_utils.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | import types 14 | from tests import unittest 15 | import mock 16 | 17 | from boto3 import utils 18 | 19 | 20 | class FakeModule(object): 21 | @staticmethod 22 | def entry_point(**kwargs): 23 | return kwargs 24 | 25 | 26 | class TestUtils(unittest.TestCase): 27 | def test_lazy_call(self): 28 | with mock.patch('boto3.utils.import_module') as importer: 29 | importer.return_value = FakeModule 30 | lazy_function = utils.lazy_call( 31 | 'fakemodule.FakeModule.entry_point') 32 | self.assertEqual(lazy_function(a=1, b=2), {'a': 1, 'b': 2}) 33 | 34 | def test_import_module(self): 35 | module = utils.import_module('boto3.s3.transfer') 36 | self.assertEqual(module.__name__, 'boto3.s3.transfer') 37 | self.assertIsInstance(module, types.ModuleType) 38 | 39 | def test_inject_attributes_with_no_shadowing(self): 40 | class_attributes = {} 41 | utils.inject_attribute(class_attributes, 'foo', 'bar') 42 | self.assertEqual(class_attributes['foo'], 'bar') 43 | 44 | def test_shadowing_existing_var_raises_exception(self): 45 | class_attributes = {'foo': 'preexisting'} 46 | with self.assertRaises(RuntimeError): 47 | utils.inject_attribute(class_attributes, 'foo', 'bar') 48 | 49 | 50 | class TestLazyLoadedWaiterModel(unittest.TestCase): 51 | def test_get_waiter_model_is_lazy(self): 52 | session = mock.Mock() 53 | waiter_model = utils.LazyLoadedWaiterModel( 54 | session, 'myservice', '2014-01-01') 55 | self.assertFalse(session.get_waiter_model.called) 56 | waiter_model.get_waiter('Foo') 57 | self.assertTrue(session.get_waiter_model.called) 58 | session.get_waiter_model.return_value.get_waiter.assert_called_with( 59 | 'Foo') 60 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/tests/functional/test_ec2.py: -------------------------------------------------------------------------------- 1 | # Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | import unittest 14 | 15 | import boto3.session 16 | from botocore.stub import Stubber 17 | 18 | 19 | class TestInstanceDeleteTags(unittest.TestCase): 20 | def setUp(self): 21 | self.session = boto3.session.Session(region_name='us-west-2') 22 | self.service_resource = self.session.resource('ec2') 23 | self.instance_resource = self.service_resource.Instance('i-abc123') 24 | 25 | def test_delete_tags_injected(self): 26 | self.assertTrue(hasattr(self.instance_resource, 'delete_tags'), 27 | 'delete_tags was not injected onto Instance resource.') 28 | 29 | def test_delete_tags(self): 30 | stubber = Stubber(self.instance_resource.meta.client) 31 | stubber.add_response('delete_tags', {}) 32 | stubber.activate() 33 | response = self.instance_resource.delete_tags(Tags=[{'Key': 'foo'}]) 34 | stubber.assert_no_pending_responses() 35 | self.assertEqual(response, {}) 36 | stubber.deactivate() 37 | 38 | def test_mutating_filters(self): 39 | stubber = Stubber(self.service_resource.meta.client) 40 | instance_filters = [ 41 | {'Name': 'instance-state-name', 'Values': ['running']} 42 | ] 43 | running_instances = self.service_resource.instances.filter( 44 | Filters=instance_filters 45 | ) 46 | 47 | # This should not impact the already-created filter. 48 | instance_filters.append( 49 | {'Name': 'instance-type', 'Values': ['c4.large']} 50 | ) 51 | 52 | stubber.add_response( 53 | method='describe_instances', 54 | service_response={ 55 | 'Reservations': [] 56 | }, 57 | expected_params={ 58 | 'Filters': [{ 59 | 'Name': 'instance-state-name', 60 | 'Values': ['running'] 61 | }] 62 | } 63 | ) 64 | 65 | with stubber: 66 | list(running_instances) 67 | 68 | stubber.assert_no_pending_responses() 69 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | 14 | import random 15 | import sys 16 | import time 17 | 18 | from botocore.compat import six 19 | 20 | 21 | # The unittest module got a significant overhaul 22 | # in 2.7, so if we're in 2.6 we can use the backported 23 | # version unittest2. 24 | if sys.version_info[:2] == (2, 6): 25 | import unittest2 as unittest 26 | else: 27 | import unittest 28 | 29 | 30 | # Python 3 includes mocking, while 2 requires an extra module. 31 | if sys.version_info[0] == 2: 32 | import mock 33 | else: 34 | from unittest import mock 35 | 36 | 37 | # In python 3, order matters when calling assertEqual to 38 | # compare lists and dictionaries with lists. Therefore, 39 | # assertItemsEqual needs to be used but it is renamed to 40 | # assertCountEqual in python 3. 41 | if six.PY2: 42 | unittest.TestCase.assertCountEqual = unittest.TestCase.assertItemsEqual 43 | 44 | 45 | def unique_id(name): 46 | """ 47 | Generate a unique ID that includes the given name, 48 | a timestamp and a random number. This helps when running 49 | integration tests in parallel that must create remote 50 | resources. 51 | """ 52 | return '{0}-{1}-{2}'.format(name, int(time.time()), 53 | random.randint(0, 10000)) 54 | 55 | 56 | class BaseTestCase(unittest.TestCase): 57 | """ 58 | A base test case which mocks out the low-level session to prevent 59 | any actual calls to Botocore. 60 | """ 61 | def setUp(self): 62 | self.bc_session_patch = mock.patch('botocore.session.Session') 63 | self.bc_session_cls = self.bc_session_patch.start() 64 | 65 | loader = self.bc_session_cls.return_value.get_component.return_value 66 | loader.data_path = '' 67 | self.loader = loader 68 | 69 | # We also need to patch the global default session. 70 | # Otherwise it could be a cached real session came from previous 71 | # "functional" or "integration" tests. 72 | patch_global_session = mock.patch('boto3.DEFAULT_SESSION') 73 | patch_global_session.start() 74 | self.addCleanup(patch_global_session.stop) 75 | 76 | def tearDown(self): 77 | self.bc_session_patch.stop() 78 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/docs/source/guide/quickstart.rst: -------------------------------------------------------------------------------- 1 | .. _guide_quickstart: 2 | 3 | Quickstart 4 | ========== 5 | Getting started with Boto 3 is easy, but requires a few steps. 6 | 7 | Installation 8 | ------------ 9 | Install the latest Boto 3 release via :command:`pip`:: 10 | 11 | pip install boto3 12 | 13 | You may also install a specific version:: 14 | 15 | pip install boto3==1.0.0 16 | 17 | .. note:: 18 | 19 | The latest development version can always be found on 20 | `GitHub `_. 21 | 22 | Configuration 23 | ------------- 24 | Before you can begin using Boto 3, you should set up authentication 25 | credentials. Credentials for your AWS account can be found in the 26 | `IAM Console `_. You can 27 | create or use an existing user. Go to manage access keys and 28 | generate a new set of keys. 29 | 30 | If you have the `AWS CLI `_ 31 | installed, then you can use it to configure your credentials file:: 32 | 33 | aws configure 34 | 35 | Alternatively, you can create the credential file yourself. By default, 36 | its location is at ``~/.aws/credentials``:: 37 | 38 | [default] 39 | aws_access_key_id = YOUR_ACCESS_KEY 40 | aws_secret_access_key = YOUR_SECRET_KEY 41 | 42 | You may also want to set a default region. This can be done in the 43 | configuration file. By default, its location is at ``~/.aws/config``:: 44 | 45 | [default] 46 | region=us-east-1 47 | 48 | Alternatively, you can pass a ``region_name`` when creating clients 49 | and resources. 50 | 51 | This sets up credentials for the default profile as well as a default 52 | region to use when creating connections. See 53 | :ref:`guide_configuration` for in-depth configuration sources and 54 | options. 55 | 56 | Using Boto 3 57 | ------------ 58 | To use Boto 3, you must first import it and tell it what service you are 59 | going to use:: 60 | 61 | import boto3 62 | 63 | # Let's use Amazon S3 64 | s3 = boto3.resource('s3') 65 | 66 | Now that you have an ``s3`` resource, you can make requests and process 67 | responses from the service. The following uses the ``buckets`` collection 68 | to print out all bucket names:: 69 | 70 | # Print out bucket names 71 | for bucket in s3.buckets.all(): 72 | print(bucket.name) 73 | 74 | It's also easy to upload and download binary data. For example, the 75 | following uploads a new file to S3. It assumes that the bucket ``my-bucket`` 76 | already exists:: 77 | 78 | # Upload a new file 79 | data = open('test.jpg', 'rb') 80 | s3.Bucket('my-bucket').put_object(Key='test.jpg', Body=data) 81 | 82 | :ref:`guide_resources` and :ref:`guide_collections` will be covered in more 83 | detail in the following sections, so don't worry if you do not completely 84 | understand the examples. 85 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/docs/source/guide/s3-example-access-permissions.rst: -------------------------------------------------------------------------------- 1 | .. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | 3 | This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 4 | International License (the "License"). You may not use this file except in compliance with the 5 | License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. 6 | 7 | This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 8 | either express or implied. See the License for the specific language governing permissions and 9 | limitations under the License. 10 | 11 | .. _aws-boto3-s3-access-permissions: 12 | 13 | ############################################ 14 | Managing Amazon S3 Bucket Access Permissions 15 | ############################################ 16 | 17 | This Python example shows you how to get or set the access control list for an Amazon S3 bucket. 18 | 19 | The Scenario 20 | ============ 21 | 22 | In this example, a Python code is used to display the bucket access control list (ACL) for a selected 23 | bucket. The code uses the AWS SDK for Python to manage Amazon S3 bucket access permissions using this 24 | method of the Amazon S3 client class: 25 | 26 | * `get_bucket_acl `_. 27 | 28 | For more information about access control lists for Amazon S3 buckets, see 29 | `Managing Access with ACLs `_ 30 | in the *Amazon Simple Storage Service Developer Guide*. 31 | 32 | All the example code for the Amazon Web Services (AWS) SDK for Python is available `here on GitHub `_. 33 | 34 | Prerequisite Tasks 35 | ================== 36 | 37 | To set up and run this example, you must first complete this task: 38 | 39 | * Configure your AWS credentials, as described in :doc:`quickstart`. 40 | 41 | Get a Specified Bucket Access Control (ACL) List 42 | ================================================ 43 | 44 | Access control lists (ACLs) are one of the resource-based access policy option you can use to manage 45 | access to your buckets and objects. You can use ACLs to grant basic read/write permissions to other 46 | AWS accounts. 47 | 48 | The example below shows how to: 49 | 50 | * Get the bucket ACL for a specified bucket using 51 | `get_bucket_acl `_. 52 | 53 | Example 54 | ------- 55 | 56 | .. code-block:: python 57 | 58 | import boto3 59 | 60 | # Create an S3 client 61 | s3 = boto3.client('s3') 62 | 63 | # Call to S3 to retrieve the policy for the given bucket 64 | result = s3.get_bucket_acl(Bucket='my-bucket') 65 | print(result) 66 | 67 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/tests/unit/docs/test_client.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | from tests.unit.docs import BaseDocsTest 14 | 15 | from boto3.docs.client import Boto3ClientDocumenter 16 | 17 | 18 | class TestBoto3ClientDocumenter(BaseDocsTest): 19 | def setUp(self): 20 | super(TestBoto3ClientDocumenter, self).setUp() 21 | self.client_documenter = Boto3ClientDocumenter(self.client) 22 | 23 | def test_document_client(self): 24 | self.client_documenter.document_client(self.doc_structure) 25 | self.assert_contains_lines_in_order([ 26 | '======', 27 | 'Client', 28 | '======', 29 | '.. py:class:: MyService.Client', 30 | ' A low-level client representing AWS MyService::', 31 | ' import boto3', 32 | ' client = boto3.client(\'myservice\')', 33 | ' These are the available methods:', 34 | ' * :py:meth:`~MyService.Client.can_paginate`', 35 | ' * :py:meth:`~MyService.Client.get_paginator`', 36 | ' * :py:meth:`~MyService.Client.get_waiter`', 37 | ' * :py:meth:`~MyService.Client.sample_operation`', 38 | ' .. py:method:: can_paginate(operation_name)', 39 | ' .. py:method:: get_paginator(operation_name)', 40 | ' .. py:method:: get_waiter(waiter_name)', 41 | ' .. py:method:: sample_operation(**kwargs)', 42 | ' **Request Syntax**', 43 | ' ::', 44 | ' response = client.sample_operation(', 45 | ' Foo=\'string\'', 46 | ' Bar=\'string\'', 47 | ' )', 48 | ' :type Foo: string', 49 | ' :param Foo: Documents Foo', 50 | ' :type Bar: string', 51 | ' :param Bar: Documents Bar', 52 | ' :rtype: dict', 53 | ' :returns:', 54 | ' **Response Syntax**', 55 | ' ::', 56 | ' {', 57 | ' \'Foo\': \'string\'', 58 | ' \'Bar\': \'string\'', 59 | 60 | ' }', 61 | ' **Response Structure**', 62 | ' - *(dict) --*', 63 | ' - **Foo** *(string) --*', 64 | ' - **Bar** *(string) --*' 65 | 66 | ]) 67 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3/docs/docstring.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | from botocore.docs.docstring import LazyLoadedDocstring 14 | 15 | from boto3.docs.action import document_action 16 | from boto3.docs.action import document_load_reload_action 17 | from boto3.docs.subresource import document_sub_resource 18 | from boto3.docs.attr import document_attribute 19 | from boto3.docs.attr import document_identifier 20 | from boto3.docs.attr import document_reference 21 | from boto3.docs.collection import document_collection_object 22 | from boto3.docs.collection import document_collection_method 23 | from boto3.docs.collection import document_batch_action 24 | from boto3.docs.waiter import document_resource_waiter 25 | 26 | 27 | class ActionDocstring(LazyLoadedDocstring): 28 | def _write_docstring(self, *args, **kwargs): 29 | document_action(*args, **kwargs) 30 | 31 | 32 | class LoadReloadDocstring(LazyLoadedDocstring): 33 | def _write_docstring(self, *args, **kwargs): 34 | document_load_reload_action(*args, **kwargs) 35 | 36 | 37 | class SubResourceDocstring(LazyLoadedDocstring): 38 | def _write_docstring(self, *args, **kwargs): 39 | document_sub_resource(*args, **kwargs) 40 | 41 | 42 | class AttributeDocstring(LazyLoadedDocstring): 43 | def _write_docstring(self, *args, **kwargs): 44 | document_attribute(*args, **kwargs) 45 | 46 | 47 | class IdentifierDocstring(LazyLoadedDocstring): 48 | def _write_docstring(self, *args, **kwargs): 49 | document_identifier(*args, **kwargs) 50 | 51 | 52 | class ReferenceDocstring(LazyLoadedDocstring): 53 | def _write_docstring(self, *args, **kwargs): 54 | document_reference(*args, **kwargs) 55 | 56 | 57 | class CollectionDocstring(LazyLoadedDocstring): 58 | def _write_docstring(self, *args, **kwargs): 59 | document_collection_object(*args, **kwargs) 60 | 61 | 62 | class CollectionMethodDocstring(LazyLoadedDocstring): 63 | def _write_docstring(self, *args, **kwargs): 64 | document_collection_method(*args, **kwargs) 65 | 66 | 67 | class BatchActionDocstring(LazyLoadedDocstring): 68 | def _write_docstring(self, *args, **kwargs): 69 | document_batch_action(*args, **kwargs) 70 | 71 | 72 | class ResourceWaiterDocstring(LazyLoadedDocstring): 73 | def _write_docstring(self, *args, **kwargs): 74 | document_resource_waiter(*args, **kwargs) 75 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/boto3/docs/docstring.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | from botocore.docs.docstring import LazyLoadedDocstring 14 | 15 | from boto3.docs.action import document_action 16 | from boto3.docs.action import document_load_reload_action 17 | from boto3.docs.subresource import document_sub_resource 18 | from boto3.docs.attr import document_attribute 19 | from boto3.docs.attr import document_identifier 20 | from boto3.docs.attr import document_reference 21 | from boto3.docs.collection import document_collection_object 22 | from boto3.docs.collection import document_collection_method 23 | from boto3.docs.collection import document_batch_action 24 | from boto3.docs.waiter import document_resource_waiter 25 | 26 | 27 | class ActionDocstring(LazyLoadedDocstring): 28 | def _write_docstring(self, *args, **kwargs): 29 | document_action(*args, **kwargs) 30 | 31 | 32 | class LoadReloadDocstring(LazyLoadedDocstring): 33 | def _write_docstring(self, *args, **kwargs): 34 | document_load_reload_action(*args, **kwargs) 35 | 36 | 37 | class SubResourceDocstring(LazyLoadedDocstring): 38 | def _write_docstring(self, *args, **kwargs): 39 | document_sub_resource(*args, **kwargs) 40 | 41 | 42 | class AttributeDocstring(LazyLoadedDocstring): 43 | def _write_docstring(self, *args, **kwargs): 44 | document_attribute(*args, **kwargs) 45 | 46 | 47 | class IdentifierDocstring(LazyLoadedDocstring): 48 | def _write_docstring(self, *args, **kwargs): 49 | document_identifier(*args, **kwargs) 50 | 51 | 52 | class ReferenceDocstring(LazyLoadedDocstring): 53 | def _write_docstring(self, *args, **kwargs): 54 | document_reference(*args, **kwargs) 55 | 56 | 57 | class CollectionDocstring(LazyLoadedDocstring): 58 | def _write_docstring(self, *args, **kwargs): 59 | document_collection_object(*args, **kwargs) 60 | 61 | 62 | class CollectionMethodDocstring(LazyLoadedDocstring): 63 | def _write_docstring(self, *args, **kwargs): 64 | document_collection_method(*args, **kwargs) 65 | 66 | 67 | class BatchActionDocstring(LazyLoadedDocstring): 68 | def _write_docstring(self, *args, **kwargs): 69 | document_batch_action(*args, **kwargs) 70 | 71 | 72 | class ResourceWaiterDocstring(LazyLoadedDocstring): 73 | def _write_docstring(self, *args, **kwargs): 74 | document_resource_waiter(*args, **kwargs) 75 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/tests/unit/ec2/test_createtags.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the 'License'). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the 'license' file accompanying this file. This file is 10 | # distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | from tests import unittest 14 | import mock 15 | 16 | import boto3.session 17 | from boto3.ec2 import createtags 18 | 19 | 20 | class TestCreateTags(unittest.TestCase): 21 | def setUp(self): 22 | self.client = mock.Mock() 23 | self.resource = mock.Mock() 24 | self.resource.meta.client = self.client 25 | self.ref_tags = [ 26 | 'tag1', 27 | 'tag2', 28 | 'tag3', 29 | 'tag4', 30 | 'tag5', 31 | 'tag6' 32 | ] 33 | self.resource.Tag.side_effect = self.ref_tags 34 | 35 | def test_create_tags(self): 36 | ref_kwargs = { 37 | 'Resources': ['foo', 'bar'], 38 | 'Tags': [ 39 | {'Key': 'key1', 'Value': 'value1'}, 40 | {'Key': 'key2', 'Value': 'value2'}, 41 | {'Key': 'key3', 'Value': 'value3'} 42 | ] 43 | } 44 | 45 | result_tags = createtags.create_tags(self.resource, **ref_kwargs) 46 | 47 | # Ensure the client method was called properly. 48 | self.client.create_tags.assert_called_with(**ref_kwargs) 49 | 50 | # Ensure the calls to the Tag reference were correct. 51 | self.assertEqual( 52 | self.resource.Tag.call_args_list, 53 | [mock.call('foo', 'key1', 'value1'), 54 | mock.call('foo', 'key2', 'value2'), 55 | mock.call('foo', 'key3', 'value3'), 56 | mock.call('bar', 'key1', 'value1'), 57 | mock.call('bar', 'key2', 'value2'), 58 | mock.call('bar', 'key3', 'value3')]) 59 | 60 | # Ensure the return values are as expected. 61 | self.assertEqual(result_tags, self.ref_tags) 62 | 63 | 64 | class TestCreateTagsInjection(unittest.TestCase): 65 | def test_create_tags_injected_to_resource(self): 66 | session = boto3.session.Session(region_name='us-west-2') 67 | with mock.patch('boto3.ec2.createtags.create_tags') as mock_method: 68 | resource = session.resource('ec2') 69 | self.assertTrue(hasattr(resource, 'create_tags'), 70 | 'EC2 resource does not have create_tags method.') 71 | self.assertIs(resource.create_tags, mock_method, 72 | 'custom create_tags method was not injected onto ' 73 | 'EC2 service resource') 74 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3/docs/method.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | from botocore.docs.method import document_model_driven_method 14 | 15 | 16 | def document_model_driven_resource_method( 17 | section, method_name, operation_model, event_emitter, 18 | method_description=None, example_prefix=None, include_input=None, 19 | include_output=None, exclude_input=None, exclude_output=None, 20 | document_output=True, resource_action_model=None, 21 | include_signature=True): 22 | 23 | document_model_driven_method( 24 | section=section, method_name=method_name, 25 | operation_model=operation_model, 26 | event_emitter=event_emitter, 27 | method_description=method_description, 28 | example_prefix=example_prefix, 29 | include_input=include_input, 30 | include_output=include_output, 31 | exclude_input=exclude_input, 32 | exclude_output=exclude_output, 33 | document_output=document_output, 34 | include_signature=include_signature 35 | ) 36 | 37 | # If this action returns a resource modify the return example to 38 | # appropriately reflect that. 39 | if resource_action_model.resource: 40 | if 'return' in section.available_sections: 41 | section.delete_section('return') 42 | resource_type = resource_action_model.resource.type 43 | 44 | new_return_section = section.add_new_section('return') 45 | return_resource_type = '%s.%s' % ( 46 | operation_model.service_model.service_name, 47 | resource_type) 48 | 49 | return_type = ':py:class:`%s`' % return_resource_type 50 | return_description = '%s resource' % (resource_type) 51 | 52 | if _method_returns_resource_list(resource_action_model.resource): 53 | return_type = 'list(%s)' % return_type 54 | return_description = 'A list of %s resources' % ( 55 | resource_type) 56 | 57 | new_return_section.style.new_line() 58 | new_return_section.write( 59 | ':rtype: %s' % return_type) 60 | new_return_section.style.new_line() 61 | new_return_section.write( 62 | ':returns: %s' % return_description) 63 | new_return_section.style.new_line() 64 | 65 | 66 | def _method_returns_resource_list(resource): 67 | for identifier in resource.identifiers: 68 | if identifier.path and '[]' in identifier.path: 69 | return True 70 | 71 | return False 72 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/boto3/docs/method.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | from botocore.docs.method import document_model_driven_method 14 | 15 | 16 | def document_model_driven_resource_method( 17 | section, method_name, operation_model, event_emitter, 18 | method_description=None, example_prefix=None, include_input=None, 19 | include_output=None, exclude_input=None, exclude_output=None, 20 | document_output=True, resource_action_model=None, 21 | include_signature=True): 22 | 23 | document_model_driven_method( 24 | section=section, method_name=method_name, 25 | operation_model=operation_model, 26 | event_emitter=event_emitter, 27 | method_description=method_description, 28 | example_prefix=example_prefix, 29 | include_input=include_input, 30 | include_output=include_output, 31 | exclude_input=exclude_input, 32 | exclude_output=exclude_output, 33 | document_output=document_output, 34 | include_signature=include_signature 35 | ) 36 | 37 | # If this action returns a resource modify the return example to 38 | # appropriately reflect that. 39 | if resource_action_model.resource: 40 | if 'return' in section.available_sections: 41 | section.delete_section('return') 42 | resource_type = resource_action_model.resource.type 43 | 44 | new_return_section = section.add_new_section('return') 45 | return_resource_type = '%s.%s' % ( 46 | operation_model.service_model.service_name, 47 | resource_type) 48 | 49 | return_type = ':py:class:`%s`' % return_resource_type 50 | return_description = '%s resource' % (resource_type) 51 | 52 | if _method_returns_resource_list(resource_action_model.resource): 53 | return_type = 'list(%s)' % return_type 54 | return_description = 'A list of %s resources' % ( 55 | resource_type) 56 | 57 | new_return_section.style.new_line() 58 | new_return_section.write( 59 | ':rtype: %s' % return_type) 60 | new_return_section.style.new_line() 61 | new_return_section.write( 62 | ':returns: %s' % return_description) 63 | new_return_section.style.new_line() 64 | 65 | 66 | def _method_returns_resource_list(resource): 67 | for identifier in resource.identifiers: 68 | if identifier.path and '[]' in identifier.path: 69 | return True 70 | 71 | return False 72 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/tests/functional/test_smoke.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | from nose.tools import assert_true 14 | 15 | from boto3.session import Session 16 | import botocore.session 17 | 18 | 19 | def create_session(): 20 | session = Session(aws_access_key_id='dummy', 21 | aws_secret_access_key='dummy', 22 | region_name='us-east-1') 23 | return session 24 | 25 | 26 | def test_can_create_all_resources(): 27 | """Verify we can create all existing resources.""" 28 | session = create_session() 29 | for service_name in session.get_available_resources(): 30 | yield _test_create_resource, session, service_name 31 | 32 | 33 | def _test_create_resource(session, service_name): 34 | resource = session.resource(service_name) 35 | # Verifying we have a "meta" attr is just an arbitrary 36 | # sanity check. 37 | assert_true(hasattr(resource, 'meta')) 38 | 39 | 40 | def test_can_create_all_clients(): 41 | session = create_session() 42 | for service_name in session.get_available_services(): 43 | yield _test_create_client, session, service_name 44 | 45 | 46 | def _test_create_client(session, service_name): 47 | client = session.client(service_name) 48 | assert_true(hasattr(client, 'meta')) 49 | 50 | 51 | def test_api_versions_synced_with_botocore(): 52 | botocore_session = botocore.session.get_session() 53 | boto3_session = create_session() 54 | for service_name in boto3_session.get_available_resources(): 55 | yield (_assert_same_api_versions, service_name, 56 | botocore_session, boto3_session) 57 | 58 | 59 | def _assert_same_api_versions(service_name, botocore_session, boto3_session): 60 | resource = boto3_session.resource(service_name) 61 | boto3_api_version = resource.meta.client.meta.service_model.api_version 62 | client = botocore_session.create_client(service_name, 63 | region_name='us-east-1', 64 | aws_access_key_id='foo', 65 | aws_secret_access_key='bar') 66 | botocore_api_version = client.meta.service_model.api_version 67 | if botocore_api_version != boto3_api_version: 68 | raise AssertionError( 69 | "Different latest API versions found for %s: " 70 | "%s (botocore), %s (boto3)\n" % (service_name, 71 | botocore_api_version, 72 | boto3_api_version)) 73 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/docs/source/reference/customizations/dynamodb.rst: -------------------------------------------------------------------------------- 1 | .. _ref_custom_dynamodb: 2 | 3 | ================================ 4 | DynamoDB Customization Reference 5 | ================================ 6 | 7 | .. _ref_valid_dynamodb_types: 8 | 9 | Valid DynamoDB Types 10 | -------------------- 11 | 12 | These are the valid item types to use with Boto3 Table Resource (:py:class:`dynamodb.Table`) and DynamoDB: 13 | 14 | +----------------------------------------------+-----------------------------+ 15 | | Python Type | DynamoDB Type | 16 | +==============================================+=============================+ 17 | | string | String (S) | 18 | +----------------------------------------------+-----------------------------+ 19 | | integer | Number (N) | 20 | +----------------------------------------------+-----------------------------+ 21 | | :py:class:`decimal.Decimal` | Number (N) | 22 | +----------------------------------------------+-----------------------------+ 23 | | :py:class:`boto3.dynamodb.types.Binary` | Binary (B) | 24 | +----------------------------------------------+-----------------------------+ 25 | | boolean | Boolean (BOOL) | 26 | +----------------------------------------------+-----------------------------+ 27 | | ``None`` | Null (NULL) | 28 | +----------------------------------------------+-----------------------------+ 29 | | string set | String Set (SS) | 30 | +----------------------------------------------+-----------------------------+ 31 | | integer set | Number Set (NS) | 32 | +----------------------------------------------+-----------------------------+ 33 | | :py:class:`decimal.Decimal` set | Number Set (NS) | 34 | +----------------------------------------------+-----------------------------+ 35 | | :py:class:`boto3.dynamodb.types.Binary` set | Binary Set (BS) | 36 | +----------------------------------------------+-----------------------------+ 37 | | list | List (L) | 38 | +----------------------------------------------+-----------------------------+ 39 | | dict | Map (M) | 40 | +----------------------------------------------+-----------------------------+ 41 | 42 | 43 | Custom Boto3 Types 44 | ------------------ 45 | 46 | 47 | .. autoclass:: boto3.dynamodb.types.Binary 48 | :members: 49 | :undoc-members: 50 | 51 | .. _ref_dynamodb_conditions: 52 | 53 | DynamoDB Conditions 54 | ------------------- 55 | 56 | .. autoclass:: boto3.dynamodb.conditions.Key 57 | :members: 58 | :undoc-members: 59 | :inherited-members: 60 | 61 | .. autoclass:: boto3.dynamodb.conditions.Attr 62 | :members: 63 | :undoc-members: 64 | :inherited-members: 65 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/tests/functional/test_dynamodb.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | import json 14 | from tests import unittest, mock 15 | 16 | from botocore.vendored import requests 17 | 18 | from boto3.session import Session 19 | from boto3.dynamodb.conditions import Attr 20 | 21 | 22 | class TestDynamoDB(unittest.TestCase): 23 | def setUp(self): 24 | self.http_response = requests.models.Response() 25 | self.http_response.status_code = 200 26 | self.parsed_response = {} 27 | self.make_request_patch = mock.patch( 28 | 'botocore.endpoint.Endpoint.make_request') 29 | self.make_request_mock = self.make_request_patch.start() 30 | self.make_request_mock.return_value = ( 31 | self.http_response, self.parsed_response) 32 | self.session = Session( 33 | aws_access_key_id='dummy', 34 | aws_secret_access_key='dummy', 35 | region_name='us-east-1') 36 | 37 | def tearDown(self): 38 | self.make_request_patch.stop() 39 | 40 | def test_resource(self): 41 | dynamodb = self.session.resource('dynamodb') 42 | table = dynamodb.Table('MyTable') 43 | # Make sure it uses the high level interface 44 | table.scan(FilterExpression=Attr('mykey').eq('myvalue')) 45 | request = self.make_request_mock.call_args_list[0][0][1] 46 | request_params = json.loads(request['body'].decode('utf-8')) 47 | self.assertEqual( 48 | request_params, 49 | {'TableName': 'MyTable', 50 | 'FilterExpression': '#n0 = :v0', 51 | 'ExpressionAttributeNames': {'#n0': 'mykey'}, 52 | 'ExpressionAttributeValues': {':v0': {'S': 'myvalue'}}} 53 | ) 54 | 55 | def test_client(self): 56 | dynamodb = self.session.client('dynamodb') 57 | # Make sure the client still uses the botocore level interface 58 | dynamodb.scan( 59 | TableName='MyTable', 60 | FilterExpression='#n0 = :v0', 61 | ExpressionAttributeNames={'#n0': 'mykey'}, 62 | ExpressionAttributeValues={':v0': {'S': 'myvalue'}} 63 | ) 64 | request = self.make_request_mock.call_args_list[0][0][1] 65 | request_params = json.loads(request['body'].decode('utf-8')) 66 | self.assertEqual( 67 | request_params, 68 | {'TableName': 'MyTable', 69 | 'FilterExpression': '#n0 = :v0', 70 | 'ExpressionAttributeNames': {'#n0': 'mykey'}, 71 | 'ExpressionAttributeValues': {':v0': {'S': 'myvalue'}}} 72 | ) 73 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/greengrass_common/greengrass_message.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | 5 | import base64 6 | import json 7 | import logging 8 | from greengrass_common.common_log_appender import local_cloudwatch_handler 9 | 10 | # Log messages here are not part of customer's log because anything that 11 | # goes wrong here has nothing to do with customer's lambda code. Since we configured 12 | # the root logger to log to customer's log, we need to turn off propagation. 13 | runtime_logger = logging.getLogger(__name__) 14 | runtime_logger.addHandler(local_cloudwatch_handler) 15 | runtime_logger.propagate = False 16 | # set to the lowest possible level so all log messages will be sent to local cloudwatch handler 17 | runtime_logger.setLevel(logging.DEBUG) 18 | 19 | 20 | class GreengrassMessage: 21 | """ 22 | Holds the payload and extension_map fields making up messages exchanged over the IPC. Provides methods for encoding 23 | and decoding to/from strings. 24 | """ 25 | 26 | def __init__(self, payload=b'', **extension_map): 27 | self.payload = payload 28 | self.extension_map = extension_map 29 | 30 | @classmethod 31 | def decode(cls, encoded_string): 32 | if encoded_string: 33 | try: 34 | data_map = json.loads(encoded_string) 35 | except (ValueError, TypeError) as e: 36 | runtime_logger.exception(e) 37 | raise ValueError('Could not load provided encoded string "{}" as JSON due to exception: {}'.format( 38 | repr(encoded_string), str(e) 39 | )) 40 | 41 | try: 42 | payload = base64.b64decode(data_map['Payload']) 43 | except (ValueError, TypeError) as e: 44 | runtime_logger.exception(e) 45 | raise ValueError( 46 | 'Could not decode payload of Greengrass Message data' 47 | '"{}" from base64 due to exception: {}'.format(repr(data_map), str(e)) 48 | ) 49 | 50 | extension_map = data_map['ExtensionMap_'] 51 | else: 52 | payload = None 53 | extension_map = {} 54 | 55 | return cls(payload, **extension_map) 56 | 57 | def encode(self): 58 | try: 59 | # .decode to convert bytes -> string 60 | payload = base64.b64encode(self.payload).decode() 61 | except (ValueError, TypeError) as e: 62 | runtime_logger.exception(e) 63 | raise ValueError('Could not encode Greengrass Message payload "{}" as base64 due to exception: {}'.format( 64 | repr(self.payload), str(e) 65 | )) 66 | 67 | try: 68 | return json.dumps({'Payload': payload, 'ExtensionMap_': self.extension_map}) 69 | except (ValueError, TypeError) as e: 70 | runtime_logger.exception(e) 71 | raise ValueError('Could not encode Greengrass Message fields "{}" as JSON due to exception: {}'.format( 72 | str(self), str(e) 73 | )) 74 | 75 | def __str__(self): 76 | return str({'Payload': self.payload, 'ExtensionMap_': self.extension_map}) 77 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/tests/unit/docs/test_attr.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | from botocore.hooks import HierarchicalEmitter 14 | 15 | from tests.unit.docs import BaseDocsTest 16 | from boto3.docs.attr import document_attribute 17 | 18 | 19 | class TestDocumentAttribute(BaseDocsTest): 20 | def setUp(self): 21 | super(TestDocumentAttribute, self).setUp() 22 | self.add_shape({ 23 | 'NestedStruct': { 24 | 'type': 'structure', 25 | 'members': { 26 | 'NestedStrAttr': { 27 | 'shape': 'String', 28 | 'documentation': 'Documents a nested string attribute' 29 | } 30 | } 31 | } 32 | }) 33 | self.add_shape({ 34 | 'ResourceShape': { 35 | 'type': 'structure', 36 | 'members': { 37 | 'StringAttr': { 38 | 'shape': 'String', 39 | 'documentation': 'Documents a string attribute' 40 | }, 41 | 'NestedAttr': { 42 | 'shape': 'NestedStruct', 43 | 'documentation': 'Documents a nested attribute' 44 | } 45 | } 46 | } 47 | }) 48 | self.setup_client_and_resource() 49 | 50 | self.event_emitter = HierarchicalEmitter() 51 | self.service_name = 'myservice' 52 | self.resource_name = 'myresource' 53 | self.service_model = self.client.meta.service_model 54 | 55 | def test_document_attr_scalar(self): 56 | shape_model = self.service_model.shape_for('ResourceShape') 57 | attr_name = 'StringAttr' 58 | document_attribute( 59 | self.doc_structure, self.service_name, self.resource_name, 60 | attr_name, self.event_emitter, shape_model.members[attr_name]) 61 | self.assert_contains_lines_in_order([ 62 | '.. py:attribute:: StringAttr', 63 | ' - *(string) --* Documents a string attribute' 64 | ]) 65 | 66 | def test_document_attr_structure(self): 67 | shape_model = self.service_model.shape_for('ResourceShape') 68 | attr_name = 'NestedAttr' 69 | document_attribute( 70 | self.doc_structure, self.service_name, self.resource_name, 71 | attr_name, self.event_emitter, shape_model.members[attr_name]) 72 | self.assert_contains_lines_in_order([ 73 | '.. py:attribute:: NestedAttr', 74 | ' - *(dict) --* Documents a nested attribute', 75 | (' - **NestedStrAttr** *(string) --* Documents a nested ' 76 | 'string attribute') 77 | ]) 78 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3/utils.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | import sys 14 | from collections import namedtuple 15 | 16 | 17 | _ServiceContext = namedtuple( 18 | 'ServiceContext', 19 | ['service_name', 'service_model', 'service_waiter_model', 20 | 'resource_json_definitions'] 21 | ) 22 | 23 | 24 | class ServiceContext(_ServiceContext): 25 | """Provides important service-wide, read-only information about a service 26 | 27 | :type service_name: str 28 | :param service_name: The name of the service 29 | 30 | :type service_model: :py:class:`botocore.model.ServiceModel` 31 | :param service_model: The model of the service. 32 | 33 | :type service_waiter_model: :py:class:`botocore.waiter.WaiterModel` or 34 | a waiter model-like object such as 35 | :py:class:`boto3.utils.LazyLoadedWaiterModel` 36 | :param service_waiter_model: The waiter model of the service. 37 | 38 | :type resource_json_definitions: dict 39 | :param resource_json_definitions: The loaded json models of all resource 40 | shapes for a service. It is equivalient of loading a 41 | ``resource-1.json`` and retrieving the value at the key "resources". 42 | """ 43 | pass 44 | 45 | 46 | def import_module(name): 47 | """Import module given a name. 48 | 49 | Does not support relative imports. 50 | 51 | """ 52 | __import__(name) 53 | return sys.modules[name] 54 | 55 | 56 | def lazy_call(full_name, **kwargs): 57 | parent_kwargs = kwargs 58 | 59 | def _handler(**kwargs): 60 | module, function_name = full_name.rsplit('.', 1) 61 | module = import_module(module) 62 | kwargs.update(parent_kwargs) 63 | return getattr(module, function_name)(**kwargs) 64 | 65 | return _handler 66 | 67 | 68 | def inject_attribute(class_attributes, name, value): 69 | if name in class_attributes: 70 | raise RuntimeError( 71 | 'Cannot inject class attribute "%s", attribute ' 72 | 'already exists in class dict.' % name) 73 | else: 74 | class_attributes[name] = value 75 | 76 | 77 | class LazyLoadedWaiterModel(object): 78 | """A lazily loaded waiter model 79 | 80 | This does not load the service waiter model until an attempt is made 81 | to retrieve the waiter model for a specific waiter. This is helpful 82 | in docstring generation where we do not need to actually need to grab 83 | the waiter-2.json until it is accessed through a ``get_waiter`` call 84 | when the docstring is generated/accessed. 85 | """ 86 | def __init__(self, bc_session, service_name, api_version): 87 | self._session = bc_session 88 | self._service_name = service_name 89 | self._api_version = api_version 90 | 91 | def get_waiter(self, waiter_name): 92 | return self._session.get_waiter_model( 93 | self._service_name, self._api_version).get_waiter(waiter_name) 94 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3-develop/boto3/utils.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | import sys 14 | from collections import namedtuple 15 | 16 | 17 | _ServiceContext = namedtuple( 18 | 'ServiceContext', 19 | ['service_name', 'service_model', 'service_waiter_model', 20 | 'resource_json_definitions'] 21 | ) 22 | 23 | 24 | class ServiceContext(_ServiceContext): 25 | """Provides important service-wide, read-only information about a service 26 | 27 | :type service_name: str 28 | :param service_name: The name of the service 29 | 30 | :type service_model: :py:class:`botocore.model.ServiceModel` 31 | :param service_model: The model of the service. 32 | 33 | :type service_waiter_model: :py:class:`botocore.waiter.WaiterModel` or 34 | a waiter model-like object such as 35 | :py:class:`boto3.utils.LazyLoadedWaiterModel` 36 | :param service_waiter_model: The waiter model of the service. 37 | 38 | :type resource_json_definitions: dict 39 | :param resource_json_definitions: The loaded json models of all resource 40 | shapes for a service. It is equivalient of loading a 41 | ``resource-1.json`` and retrieving the value at the key "resources". 42 | """ 43 | pass 44 | 45 | 46 | def import_module(name): 47 | """Import module given a name. 48 | 49 | Does not support relative imports. 50 | 51 | """ 52 | __import__(name) 53 | return sys.modules[name] 54 | 55 | 56 | def lazy_call(full_name, **kwargs): 57 | parent_kwargs = kwargs 58 | 59 | def _handler(**kwargs): 60 | module, function_name = full_name.rsplit('.', 1) 61 | module = import_module(module) 62 | kwargs.update(parent_kwargs) 63 | return getattr(module, function_name)(**kwargs) 64 | 65 | return _handler 66 | 67 | 68 | def inject_attribute(class_attributes, name, value): 69 | if name in class_attributes: 70 | raise RuntimeError( 71 | 'Cannot inject class attribute "%s", attribute ' 72 | 'already exists in class dict.' % name) 73 | else: 74 | class_attributes[name] = value 75 | 76 | 77 | class LazyLoadedWaiterModel(object): 78 | """A lazily loaded waiter model 79 | 80 | This does not load the service waiter model until an attempt is made 81 | to retrieve the waiter model for a specific waiter. This is helpful 82 | in docstring generation where we do not need to actually need to grab 83 | the waiter-2.json until it is accessed through a ``get_waiter`` call 84 | when the docstring is generated/accessed. 85 | """ 86 | def __init__(self, bc_session, service_name, api_version): 87 | self._session = bc_session 88 | self._service_name = service_name 89 | self._api_version = api_version 90 | 91 | def get_waiter(self, waiter_name): 92 | return self._session.get_waiter_model( 93 | self._service_name, self._api_version).get_waiter(waiter_name) 94 | -------------------------------------------------------------------------------- /deeplens-face-detection-d90ecbd1-eeff-4ccd-abfa-0f4981e0525b/boto3/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | 14 | import logging 15 | 16 | from boto3.session import Session 17 | 18 | 19 | __author__ = 'Amazon Web Services' 20 | __version__ = '1.5.26' 21 | 22 | 23 | # The default Boto3 session; autoloaded when needed. 24 | DEFAULT_SESSION = None 25 | 26 | 27 | def setup_default_session(**kwargs): 28 | """ 29 | Set up a default session, passing through any parameters to the session 30 | constructor. There is no need to call this unless you wish to pass custom 31 | parameters, because a default session will be created for you. 32 | """ 33 | global DEFAULT_SESSION 34 | DEFAULT_SESSION = Session(**kwargs) 35 | 36 | 37 | def set_stream_logger(name='boto3', level=logging.DEBUG, format_string=None): 38 | """ 39 | Add a stream handler for the given name and level to the logging module. 40 | By default, this logs all boto3 messages to ``stdout``. 41 | 42 | >>> import boto3 43 | >>> boto3.set_stream_logger('boto3.resources', logging.INFO) 44 | 45 | :type name: string 46 | :param name: Log name 47 | :type level: int 48 | :param level: Logging level, e.g. ``logging.INFO`` 49 | :type format_string: str 50 | :param format_string: Log message format 51 | """ 52 | if format_string is None: 53 | format_string = "%(asctime)s %(name)s [%(levelname)s] %(message)s" 54 | 55 | logger = logging.getLogger(name) 56 | logger.setLevel(level) 57 | handler = logging.StreamHandler() 58 | handler.setLevel(level) 59 | formatter = logging.Formatter(format_string) 60 | handler.setFormatter(formatter) 61 | logger.addHandler(handler) 62 | 63 | 64 | def _get_default_session(): 65 | """ 66 | Get the default session, creating one if needed. 67 | 68 | :rtype: :py:class:`~boto3.session.Session` 69 | :return: The default session 70 | """ 71 | if DEFAULT_SESSION is None: 72 | setup_default_session() 73 | 74 | return DEFAULT_SESSION 75 | 76 | 77 | def client(*args, **kwargs): 78 | """ 79 | Create a low-level service client by name using the default session. 80 | 81 | See :py:meth:`boto3.session.Session.client`. 82 | """ 83 | return _get_default_session().client(*args, **kwargs) 84 | 85 | 86 | def resource(*args, **kwargs): 87 | """ 88 | Create a resource service client by name using the default session. 89 | 90 | See :py:meth:`boto3.session.Session.resource`. 91 | """ 92 | return _get_default_session().resource(*args, **kwargs) 93 | 94 | 95 | # Set up logging to ``/dev/null`` like a library is supposed to. 96 | # http://docs.python.org/3.3/howto/logging.html#configuring-logging-for-a-library 97 | class NullHandler(logging.Handler): 98 | def emit(self, record): 99 | pass 100 | 101 | 102 | logging.getLogger('boto3').addHandler(NullHandler()) 103 | --------------------------------------------------------------------------------