Showing preview only (3,660K chars total). Download the full file or copy to clipboard to get everything.
Repository: aws/chalice
Branch: master
Commit: a33863e29d24
Files: 357
Total size: 3.4 MB
Directory structure:
gitextract_8gh5n9v8/
├── .changes/
│ ├── 0.1.0.json
│ ├── 0.10.0.json
│ ├── 0.10.1.json
│ ├── 0.2.0.json
│ ├── 0.3.0.json
│ ├── 0.4.0.json
│ ├── 0.5.0.json
│ ├── 0.5.1.json
│ ├── 0.6.0.json
│ ├── 0.7.0.json
│ ├── 0.8.0.json
│ ├── 0.8.1.json
│ ├── 0.8.2.json
│ ├── 0.9.0.json
│ ├── 1.0.0.json
│ ├── 1.0.0b1.json
│ ├── 1.0.0b2.json
│ ├── 1.0.1.json
│ ├── 1.0.2.json
│ ├── 1.0.3.json
│ ├── 1.0.4.json
│ ├── 1.1.0.json
│ ├── 1.1.1.json
│ ├── 1.10.0.json
│ ├── 1.11.0.json
│ ├── 1.11.1.json
│ ├── 1.12.0.json
│ ├── 1.13.0.json
│ ├── 1.13.1.json
│ ├── 1.14.0.json
│ ├── 1.14.1.json
│ ├── 1.15.0.json
│ ├── 1.15.1.json
│ ├── 1.16.0.json
│ ├── 1.17.0.json
│ ├── 1.18.0.json
│ ├── 1.18.1.json
│ ├── 1.19.0.json
│ ├── 1.2.0.json
│ ├── 1.2.1.json
│ ├── 1.2.2.json
│ ├── 1.2.3.json
│ ├── 1.20.0.json
│ ├── 1.20.1.json
│ ├── 1.21.0.json
│ ├── 1.21.1.json
│ ├── 1.21.2.json
│ ├── 1.21.3.json
│ ├── 1.21.4.json
│ ├── 1.21.5.json
│ ├── 1.21.6.json
│ ├── 1.21.7.json
│ ├── 1.21.8.json
│ ├── 1.21.9.json
│ ├── 1.22.0.json
│ ├── 1.22.1.json
│ ├── 1.22.2.json
│ ├── 1.22.3.json
│ ├── 1.22.4.json
│ ├── 1.23.0.json
│ ├── 1.24.0.json
│ ├── 1.24.1.json
│ ├── 1.24.2.json
│ ├── 1.25.0.json
│ ├── 1.26.0.json
│ ├── 1.26.1.json
│ ├── 1.26.2.json
│ ├── 1.26.3.json
│ ├── 1.26.4.json
│ ├── 1.26.5.json
│ ├── 1.26.6.json
│ ├── 1.27.0.json
│ ├── 1.27.1.json
│ ├── 1.27.2.json
│ ├── 1.27.3.json
│ ├── 1.28.0.json
│ ├── 1.29.0.json
│ ├── 1.3.0.json
│ ├── 1.30.0.json
│ ├── 1.31.0.json
│ ├── 1.31.1.json
│ ├── 1.31.2.json
│ ├── 1.31.3.json
│ ├── 1.31.4.json
│ ├── 1.32.0.json
│ ├── 1.4.0.json
│ ├── 1.5.0.json
│ ├── 1.6.0.json
│ ├── 1.6.1.json
│ ├── 1.6.2.json
│ ├── 1.7.0.json
│ ├── 1.8.0.json
│ ├── 1.9.0.json
│ ├── 1.9.1.json
│ └── templates/
│ └── changelog
├── .coveragerc
├── .github/
│ ├── PULL_REQUEST_TEMPLATE.md
│ ├── dependabot.yml
│ └── workflows/
│ ├── run-tests.yml
│ └── stale-issue.yml
├── .gitignore
├── .pylintrc
├── .python-version
├── CHANGELOG.md
├── CODE_OF_CONDUCT.rst
├── CONTRIBUTING.rst
├── LICENSE
├── MANIFEST.in
├── Makefile
├── NOTICE
├── README.rst
├── chalice/
│ ├── __init__.py
│ ├── analyzer.py
│ ├── api/
│ │ └── __init__.py
│ ├── app.py
│ ├── awsclient.py
│ ├── cdk/
│ │ ├── __init__.py
│ │ └── construct.py
│ ├── cli/
│ │ ├── __init__.py
│ │ ├── factory.py
│ │ ├── filewatch/
│ │ │ ├── __init__.py
│ │ │ ├── eventbased.py
│ │ │ └── stat.py
│ │ ├── newproj.py
│ │ └── reloader.py
│ ├── compat.py
│ ├── config.py
│ ├── constants.py
│ ├── deploy/
│ │ ├── __init__.py
│ │ ├── appgraph.py
│ │ ├── deployer.py
│ │ ├── executor.py
│ │ ├── models.py
│ │ ├── packager.py
│ │ ├── planner.py
│ │ ├── swagger.py
│ │ ├── sweeper.py
│ │ └── validate.py
│ ├── invoke.py
│ ├── local.py
│ ├── logs.py
│ ├── package.py
│ ├── pipeline.py
│ ├── policies-extra.json
│ ├── policies.json
│ ├── policy.py
│ ├── py.typed
│ ├── templates/
│ │ ├── 0000-rest-api/
│ │ │ ├── .chalice/
│ │ │ │ └── config.json
│ │ │ ├── .gitignore
│ │ │ ├── app.py
│ │ │ ├── chalicelib/
│ │ │ │ └── __init__.py
│ │ │ ├── metadata.json
│ │ │ ├── requirements-dev.txt
│ │ │ ├── requirements.txt
│ │ │ └── tests/
│ │ │ ├── __init__.py
│ │ │ └── test_app.py
│ │ ├── 0002-s3-event-handler/
│ │ │ ├── .chalice/
│ │ │ │ └── config.json
│ │ │ ├── .gitignore
│ │ │ ├── app.py
│ │ │ ├── chalicelib/
│ │ │ │ └── __init__.py
│ │ │ ├── metadata.json
│ │ │ ├── requirements-dev.txt
│ │ │ ├── requirements.txt
│ │ │ └── tests/
│ │ │ ├── __init__.py
│ │ │ └── test_app.py
│ │ ├── 0007-lambda-only/
│ │ │ ├── .chalice/
│ │ │ │ └── config.json
│ │ │ ├── .gitignore
│ │ │ ├── app.py
│ │ │ ├── chalicelib/
│ │ │ │ └── __init__.py
│ │ │ ├── metadata.json
│ │ │ ├── requirements-dev.txt
│ │ │ ├── requirements.txt
│ │ │ └── tests/
│ │ │ ├── __init__.py
│ │ │ └── test_app.py
│ │ ├── 0009-legacy/
│ │ │ ├── .chalice/
│ │ │ │ └── config.json
│ │ │ ├── .gitignore
│ │ │ ├── app.py
│ │ │ ├── metadata.json
│ │ │ └── requirements.txt
│ │ └── 6001-cdk-ddb/
│ │ ├── README.rst
│ │ ├── infrastructure/
│ │ │ ├── app.py
│ │ │ ├── cdk.json
│ │ │ ├── requirements.txt
│ │ │ └── stacks/
│ │ │ ├── __init__.py
│ │ │ └── chaliceapp.py
│ │ ├── metadata.json
│ │ ├── requirements.txt
│ │ └── runtime/
│ │ ├── .chalice/
│ │ │ └── config.json
│ │ ├── .gitignore
│ │ ├── app.py
│ │ └── requirements.txt
│ ├── test.py
│ ├── utils.py
│ └── vendored/
│ ├── __init__.py
│ └── botocore/
│ ├── __init__.py
│ └── regions.py
├── docs/
│ ├── Makefile
│ └── source/
│ ├── _static/
│ │ ├── custom.css
│ │ └── fonts/
│ │ └── open-sans/
│ │ └── stylesheet.css
│ ├── _templates/
│ │ └── layout.html
│ ├── api.rst
│ ├── chalicedocs.py
│ ├── conf.py
│ ├── faq.rst
│ ├── index.rst
│ ├── main.rst
│ ├── quickstart.rst
│ ├── samples/
│ │ ├── index.rst
│ │ ├── media-query/
│ │ │ ├── code/
│ │ │ │ ├── .chalice/
│ │ │ │ │ ├── config.json
│ │ │ │ │ └── policy-dev.json
│ │ │ │ ├── app.py
│ │ │ │ ├── chalicelib/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── db.py
│ │ │ │ │ └── rekognition.py
│ │ │ │ ├── recordresources.py
│ │ │ │ ├── requirements.txt
│ │ │ │ └── resources.json
│ │ │ └── index.rst
│ │ └── todo-app/
│ │ ├── code/
│ │ │ ├── .chalice/
│ │ │ │ ├── config.json
│ │ │ │ └── policy-dev.json
│ │ │ ├── .gitignore
│ │ │ ├── app.py
│ │ │ ├── chalicelib/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── auth.py
│ │ │ │ └── db.py
│ │ │ ├── create-resources.py
│ │ │ ├── requirements-dev.txt
│ │ │ ├── requirements.txt
│ │ │ ├── tests/
│ │ │ │ ├── __init__.py
│ │ │ │ └── test_db.py
│ │ │ └── users.py
│ │ └── index.rst
│ ├── theme/
│ │ └── smithy/
│ │ ├── globaltoc.html
│ │ ├── landing.html
│ │ ├── layout.html
│ │ ├── static/
│ │ │ ├── asciinema-player.css
│ │ │ ├── asciinema-player.js
│ │ │ ├── bootstrap-reboot.css
│ │ │ ├── casts/
│ │ │ │ ├── chalice-quickstart-old.cast
│ │ │ │ └── chalice-quickstart.cast
│ │ │ ├── custom-tabs.css
│ │ │ └── default.css_t
│ │ └── theme.conf
│ ├── topics/
│ │ ├── authorizers.rst
│ │ ├── blueprints.rst
│ │ ├── cd.rst
│ │ ├── cfn.rst
│ │ ├── configfile.rst
│ │ ├── domainname.rst
│ │ ├── events.rst
│ │ ├── experimental.rst
│ │ ├── index.rst
│ │ ├── logging.rst
│ │ ├── middleware.rst
│ │ ├── multifile.rst
│ │ ├── packaging.rst
│ │ ├── purelambda.rst
│ │ ├── pyversion.rst
│ │ ├── routing.rst
│ │ ├── sdks.rst
│ │ ├── stages.rst
│ │ ├── testing.rst
│ │ ├── tf.rst
│ │ ├── views.rst
│ │ └── websockets.rst
│ ├── tutorials/
│ │ ├── basicrestapi.rst
│ │ ├── cdk.rst
│ │ ├── customdomain.rst
│ │ ├── events.rst
│ │ ├── index.rst
│ │ ├── wschat.rst
│ │ └── wsecho.rst
│ └── upgrading.rst
├── requirements-dev.in
├── requirements-dev.txt
├── requirements-test.in
├── requirements-test.txt
├── scripts/
│ ├── gh-page-docs
│ └── release
├── setup.cfg
├── setup.py
└── tests/
├── __init__.py
├── aws/
│ ├── __init__.py
│ ├── conftest.py
│ ├── test_features.py
│ ├── test_websockets.py
│ ├── testapp/
│ │ ├── .chalice/
│ │ │ └── config.json
│ │ ├── app-redeploy.py
│ │ ├── app.py
│ │ ├── chalicelib/
│ │ │ └── __init__.py
│ │ └── requirements.txt
│ └── testwebsocketapp/
│ ├── .chalice/
│ │ └── config.json
│ ├── .gitignore
│ ├── app-redeploy.py
│ ├── app.py
│ └── requirements.txt
├── conftest.py
├── functional/
│ ├── __init__.py
│ ├── api/
│ │ ├── __init__.py
│ │ └── test_package.py
│ ├── basicapp/
│ │ ├── .chalice/
│ │ │ └── config.json
│ │ ├── .gitignore
│ │ ├── app.py
│ │ └── requirements.txt
│ ├── cdk/
│ │ ├── __init__.py
│ │ └── test_construct.py
│ ├── cli/
│ │ ├── __init__.py
│ │ ├── test_cli.py
│ │ ├── test_factory.py
│ │ └── test_reloader.py
│ ├── conftest.py
│ ├── envapp/
│ │ ├── .chalice/
│ │ │ └── config.json
│ │ ├── .gitignore
│ │ ├── app.py
│ │ └── requirements.txt
│ ├── test_awsclient.py
│ ├── test_deployer.py
│ ├── test_local.py
│ ├── test_package.py
│ └── test_utils.py
├── integration/
│ ├── __init__.py
│ ├── conftest.py
│ ├── test_cli.py
│ └── test_package.py
├── plugins/
│ ├── codelinter.py
│ └── testlinter.py
└── unit/
├── __init__.py
├── cli/
│ ├── __init__.py
│ ├── filewatch/
│ │ ├── test_eventbased.py
│ │ └── test_stat.py
│ ├── test_cli.py
│ └── test_newproj.py
├── conftest.py
├── deploy/
│ ├── __init__.py
│ ├── test_appgraph.py
│ ├── test_deployer.py
│ ├── test_executor.py
│ ├── test_models.py
│ ├── test_packager.py
│ ├── test_planner.py
│ ├── test_swagger.py
│ └── test_validate.py
├── test_analyzer.py
├── test_app.py
├── test_awsclient.py
├── test_config.py
├── test_invoke.py
├── test_local.py
├── test_logs.py
├── test_package.py
├── test_pipeline.py
├── test_policy.py
├── test_test.py
├── test_utils.py
└── vendored/
├── __init__.py
└── botocore/
├── __init__.py
└── test_regions.py
================================================
FILE CONTENTS
================================================
================================================
FILE: .changes/0.1.0.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"category": "packaging",
"description": "Require ``virtualenv`` as a package dependency. (#33)",
"type": "enhancement"
},
{
"category": "CLI",
"description": "Add ``--profile`` option when creating a new project (#28)",
"type": "enhancement"
},
{
"category": "rest-api",
"description": "Add support for more error codes exceptions (#34)",
"type": "enhancement"
},
{
"category": "rest-api",
"description": "Improve error validation when routes containing a\ntrailing ``/`` char (#65)",
"type": "enhancement"
},
{
"category": "rest-api",
"description": "Validate duplicate route entries (#79)",
"type": "enhancement"
},
{
"category": "policy",
"description": "Ignore lambda expressions in policy analyzer (#74)",
"type": "enhancement"
},
{
"category": "rest-api",
"description": "Print original error traceback in debug mode (#50)",
"type": "enhancement"
},
{
"category": "rest-api",
"description": "Add support for authenticate routes (#14)",
"type": "feature"
},
{
"category": "policy",
"description": "Add ability to disable IAM role management (#61)",
"type": "feature"
}
]
}
================================================
FILE: .changes/0.10.0.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"category": "deployment",
"description": "Fix issue where provided ``iam_role_arn`` was not respected on\nredeployments of chalice applications and in the CloudFormation template\ngenerated by ``chalice package`` (#339)",
"type": "bugfix"
},
{
"category": "config",
"description": "Fix ``autogen_policy`` in config being ignored (#367)",
"type": "bugfix"
},
{
"category": "rest-api",
"description": "Add support for view functions that share the same view url but\ndiffer by HTTP method (#81)",
"type": "feature"
},
{
"category": "deployment",
"description": "Improve deployment error messages for deployment packages that are\ntoo large (#246, #330, #380)",
"type": "enhancement"
},
{
"category": "rest-api",
"description": "Add support for built-in authorizers (#356)",
"type": "feature"
}
]
}
================================================
FILE: .changes/0.10.1.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"category": "deployment",
"description": "Fix deployment issue for projects deployed with versions\nprior to 0.10.0 (#387)",
"type": "bugfix"
},
{
"category": "policy",
"description": "Fix crash in analyzer when encountering genexprs and listcomps (#263)",
"type": "bugfix"
}
]
}
================================================
FILE: .changes/0.2.0.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"category": "rest-api",
"description": "Add support for input content types besides ``application/json`` (#96)",
"type": "enhancement"
},
{
"category": "rest-api",
"description": "Allow ``ChaliceViewErrors`` to propagate, so that API Gateway\ncan properly map HTTP status codes in non debug mode (#113)",
"type": "enhancement"
},
{
"category": "deployment",
"description": "Add windows compatibility (#31)",
"type": "enhancement"
}
]
}
================================================
FILE: .changes/0.3.0.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"category": "rest-api",
"description": "Fix bug with case insensitive headers (#129)",
"type": "bugfix"
},
{
"category": "CORS",
"description": "Add initial support for CORS (#133)",
"type": "feature"
},
{
"category": "deployment",
"description": "Only add API gateway permissions if needed (#48)",
"type": "enhancement"
},
{
"category": "policy",
"description": "Fix error when dict comprehension is encountered during policy generation (#131)",
"type": "bugfix"
},
{
"category": "CLI",
"description": "Add ``--version`` and ``--debug`` options to the chalice CLI",
"type": "enhancement"
}
]
}
================================================
FILE: .changes/0.4.0.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"category": "deployment",
"description": "Fix issue where role name to arn lookup was failing due to lack of pagination (#139)",
"type": "bugfix"
},
{
"category": "rest-api",
"description": "Raise errors when unknown kwargs are provided to ``app.route(...)`` (#144)",
"type": "enhancement"
},
{
"category": "config",
"description": "Raise validation error when configuring CORS and an OPTIONS method (#142)",
"type": "enhancement"
},
{
"category": "rest-api",
"description": "Add support for multi-file applications (#21)",
"type": "feature"
},
{
"category": "local",
"description": "Add support for ``chalice local``, which runs a local HTTP server for testing (#22)",
"type": "feature"
}
]
}
================================================
FILE: .changes/0.5.0.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"category": "logging",
"description": "Add default application logger (#149)",
"type": "enhancement"
},
{
"category": "local",
"description": "Return 405 when method is not supported when running\n``chalice local`` (#159)",
"type": "enhancement"
},
{
"category": "SDK",
"description": "Add path params as requestParameters so they can be used\nin generated SDKs as well as cache keys (#163)",
"type": "enhancement"
},
{
"category": "rest-api",
"description": "Map cognito user pool claims as part of request context (#165)",
"type": "enhancement"
},
{
"category": "CLI",
"description": "Add ``chalice url`` command to print the deployed URL (#169)",
"type": "feature"
},
{
"category": "deployment",
"description": "Bump up retry limit on initial function creation to 30 seconds (#172)",
"type": "enhancement"
},
{
"category": "local",
"description": "Add support for ``DELETE`` and ``PATCH`` in ``chalice local`` (#167)",
"type": "feature"
},
{
"category": "CLI",
"description": "Add ``chalice generate-sdk`` command (#178)",
"type": "feature"
}
]
}
================================================
FILE: .changes/0.5.1.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"category": "local",
"description": "Add support for serializing decimals in ``chalice local`` (#187)",
"type": "enhancement"
},
{
"category": "local",
"description": "Add stdout handler for root logger when using ``chalice local`` (#186)",
"type": "enhancement"
},
{
"category": "local",
"description": "Map query string parameters when using ``chalice local`` (#184)",
"type": "enhancement"
},
{
"category": "rest-api",
"description": "Support Content-Type with a charset (#180)",
"type": "enhancement"
},
{
"category": "deployment",
"description": "Fix not all resources being retrieved due to pagination (#188)",
"type": "bugfix"
},
{
"category": "deployment",
"description": "Fix issue where root resource was not being correctly retrieved (#205)",
"type": "bugfix"
},
{
"category": "deployment",
"description": "Handle case where local policy does not exist\n(`29 <https://github.com/awslabs/chalice/issues/29>`__)",
"type": "bugfix"
}
]
}
================================================
FILE: .changes/0.6.0.json
================================================
{
"schema-version": "0.2",
"summary": "Check out the `upgrade notes for 0.6.0\n<http://chalice.readthedocs.io/en/latest/upgrading.html#v0-6-0>`__\nfor more detailed information about changes in this release.\n\n",
"changes": [
{
"category": "local",
"description": "Add port parameter to local command (#220)",
"type": "feature"
},
{
"category": "packaging",
"description": "Add support for binary vendored packages (#182, #106, #42)",
"type": "feature"
},
{
"category": "rest-api",
"description": "Add support for customizing the returned HTTP response (#240, #218, #110, #30, #226)",
"type": "feature"
},
{
"category": "packaging",
"description": "Always inject latest runtime to allow for chalice upgrades (#245)",
"type": "enhancement"
}
]
}
================================================
FILE: .changes/0.7.0.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"category": "CLI",
"description": "Add ``chalice package`` command. This will\ncreate a SAM template and Lambda deployment package that\ncan be subsequently deployed by AWS CloudFormation. (#258)",
"type": "feature"
},
{
"category": "CLI",
"description": "Add a ``--stage-name`` argument for creating chalice stages.\nA chalice stage is a completely separate set of AWS resources.\nAs a result, most configuration values can also be specified\nper chalice stage. (#264, #270)",
"type": "feature"
},
{
"category": "policy",
"description": "Add support for ``iam_role_file``, which allows you to\nspecify the file location of an IAM policy to use for your app (#272)",
"type": "feature"
},
{
"category": "config",
"description": "Add support for setting environment variables in your app (#273)",
"type": "feature"
},
{
"category": "CI-CD",
"description": "Add a ``generate-pipeline`` command (#277)",
"type": "feature"
}
]
}
================================================
FILE: .changes/0.8.0.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"category": "python",
"description": "Add support for python3! (#296)",
"type": "feature"
},
{
"category": "packaging",
"description": "Fix swagger generation when using ``api_key_required=True`` (#279)",
"type": "bugfix"
},
{
"category": "CI-CD",
"description": "Fix ``generate-pipeline`` to install requirements file before packaging (#295)",
"type": "bugfix"
}
]
}
================================================
FILE: .changes/0.8.1.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"category": "deployment",
"description": "Alway overwrite existing API Gateway Rest API on updates (#305)",
"type": "enhancement"
},
{
"category": "CORS",
"description": "Added more granular support for CORS (#311)",
"type": "enhancement"
},
{
"category": "local",
"description": "Fix duplicate content type header in local model (#311)",
"type": "bugfix"
},
{
"category": "rest-api",
"description": "Fix content type validation when charset is provided (#306)",
"type": "bugfix"
},
{
"category": "rest-api",
"description": "Add back custom authorizer support (#322)",
"type": "enhancement"
}
]
}
================================================
FILE: .changes/0.8.2.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"category": "CLI",
"description": "Fix issue where ``--api-gateway-stage`` was being\nignored (#325)",
"type": "bugfix"
},
{
"category": "CLI",
"description": "Add ``chalice delete`` command (#40)",
"type": "feature"
}
]
}
================================================
FILE: .changes/0.9.0.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"category": "rest-api",
"description": "Add support for ``IAM`` authorizer (#334)",
"type": "feature"
},
{
"category": "config",
"description": "Add support for configuring ``lambda_timeout``, ``lambda_memory_size``,\nand ``tags`` in your AWS Lambda function (#347)",
"type": "feature"
},
{
"category": "packaging",
"description": "Fix vendor directory contents not being importable locally (#350)",
"type": "bugfix"
},
{
"category": "rest-api",
"description": "Add support for binary payloads (#348)",
"type": "feature"
}
]
}
================================================
FILE: .changes/1.0.0.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"category": "rest-api",
"description": "Change default API Gateway stage name to ``api`` (#431)",
"type": "enhancement"
},
{
"category": "local",
"description": "Add support for ``CORSConfig`` in ``chalice local`` (#436)",
"type": "enhancement"
},
{
"category": "logging",
"description": "Propagate ``DEBUG`` log level when setting ``app.debug`` (#386)",
"type": "enhancement"
},
{
"category": "rest-api",
"description": "Add support for wildcard routes and HTTP methods in ``AuthResponse`` (#403)",
"type": "feature"
},
{
"category": "policy",
"description": "Fix bug when analyzing list comprehensions (#412)",
"type": "bugfix"
},
{
"category": "local",
"description": "Update ``chalice local`` to use HTTP 1.1 (#448)",
"type": "enhancement"
}
]
}
================================================
FILE: .changes/1.0.0b1.json
================================================
{
"schema-version": "0.2",
"summary": "Please read the `upgrade notes for 1.0.0b1\n<http://chalice.readthedocs.io/en/latest/upgrading.html#v1-0-0b1>`__\nfor more detailed information about upgrading to this release.\n\nNote: to install this beta version of chalice you must specify\n``pip install 'chalice>=1.0.0b1,<2.0.0'`` or\nuse the ``--pre`` flag for pip: ``pip install --pre chalice``.\n\n",
"changes": [
{
"category": "rest-api",
"description": "Fix unicode responses being quoted in python 2.7 (#262)",
"type": "bugfix"
},
{
"category": "event-source",
"description": "Add support for scheduled events (#390)",
"type": "feature"
},
{
"category": "event-source",
"description": "Add support for pure lambda functions (#390)",
"type": "feature"
},
{
"category": "packaging",
"description": "Add support for wheel packaging. (#249)",
"type": "feature"
}
]
}
================================================
FILE: .changes/1.0.0b2.json
================================================
{
"schema-version": "0.2",
"summary": "Please read the `upgrade notes for 1.0.0b2\n<http://chalice.readthedocs.io/en/latest/upgrading.html#v1-0-0b2>`__\nfor more detailed information about upgrading to this release.\n\nNote: to install this beta version of chalice you must specify\n``pip install 'chalice>=1.0.0b2,<2.0.0'`` or\nuse the ``--pre`` flag for pip: ``pip install --pre chalice``.\n",
"changes": [
{
"category": "local",
"description": "Set env vars from config in ``chalice local`` (#396)",
"type": "enhancement"
},
{
"category": "packaging",
"description": "Fix edge case when building packages with optional c extensions (#421)",
"type": "bugfix"
},
{
"category": "policy",
"description": "Remove legacy ``policy.json`` file support. Policy files must\nuse the stage name, e.g. ``policy-dev.json`` (#430)",
"type": "enhancement"
},
{
"category": "deployment",
"description": "Fix issue where IAM role policies were updated twice on redeploys (#428)",
"type": "bugfix"
},
{
"category": "rest-api",
"description": "Validate route path is not an empty string (#432)",
"type": "enhancement"
},
{
"category": "rest-api",
"description": "Change route code to invoke view function with kwargs instead of\npositional args (#429)",
"type": "enhancement"
}
]
}
================================================
FILE: .changes/1.0.1.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"category": "packaging",
"description": "Only use alphanumeric characters for event names in SAM template (#450)",
"type": "bugfix"
},
{
"category": "config",
"description": "Print useful error message when config.json is invalid (#458)",
"type": "enhancement"
},
{
"category": "rest-api",
"description": "Fix api gateway stage being set incorrectly in non-default chalice stage\n(`#$70 <https://github.com/aws/chalice/issues/470>`__)",
"type": "bugfix"
}
]
}
================================================
FILE: .changes/1.0.2.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"category": "rest-api",
"description": "Fix issue where requestParameters were not being mapped\ncorrectly resulting in invalid generated javascript SDKs (#498)",
"type": "bugfix"
},
{
"category": "rest-api",
"description": "Fix issue where ``api_gateway_stage`` was being\nignored when set in the ``config.json`` file (#495)",
"type": "bugfix"
},
{
"category": "rest-api",
"description": "Fix bug where ``raw_body`` would raise an exception if no HTTP\nbody was provided (#503)",
"type": "bugfix"
},
{
"category": "CLI",
"description": "Fix bug where exit codes were not properly being propagated during packaging (#500)",
"type": "bugfix"
},
{
"category": "local",
"description": "Add support for Builtin Authorizers in local mode (#404)",
"type": "feature"
},
{
"category": "packaging",
"description": "Fix environment variables being passed to subprocess while packaging (#501)",
"type": "bugfix"
},
{
"category": "rest-api",
"description": "Allow view to require API keys as well as authorization (#473)",
"type": "enhancement"
}
]
}
================================================
FILE: .changes/1.0.3.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"category": "packaging",
"description": "Fix issue with some packages with `-` or `.` in their distribution name (#555)",
"type": "bugfix"
},
{
"category": "rest-api",
"description": "Fix issue where chalice local returned a 403 for successful OPTIONS requests (#554)",
"type": "bugfix"
},
{
"category": "local",
"description": "Fix issue with chalice local mode causing http clients to hang on responses\nwith no body (#525)",
"type": "bugfix"
},
{
"category": "local",
"description": "Add ``--stage`` parameter to ``chalice local`` (#545)",
"type": "enhancement"
},
{
"category": "policy",
"description": "Fix issue with analyzer that followed recursive functions infinitely (#531)",
"type": "bugfix"
}
]
}
================================================
FILE: .changes/1.0.4.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"category": "packaging",
"description": "Fix issue deploying some packages in Windows with utf-8 characters (#560)",
"type": "bugfix"
},
{
"category": "packaging",
"description": "Add support for custom authorizers with ``chalice package`` (#580)",
"type": "feature"
}
]
}
================================================
FILE: .changes/1.1.0.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"category": "rest-api",
"description": "Default to ``None`` in local mode when no query parameters\nare provided (#593)",
"type": "enhancement"
},
{
"category": "local",
"description": "Add support for binding a custom address for local dev server (#596)",
"type": "enhancement"
},
{
"category": "rest-api",
"description": "Fix local mode handling of routes with trailing slashes (#582)",
"type": "bugfix"
},
{
"category": "config",
"description": "Scale ``lambda_timeout`` parameter correctly in local mode (#579)",
"type": "bugfix"
},
{
"category": "CI-CD",
"description": "Add ``--codebuild-image`` to the ``generate-pipeline`` command (#609)",
"type": "feature"
},
{
"category": "CI-CD",
"description": "Add ``--source`` and ``--buildspec-file`` to the\n``generate-pipeline`` command (#609)",
"type": "feature"
}
]
}
================================================
FILE: .changes/1.1.1.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"category": "CLI",
"description": "Add ``--connection-timeout`` to the ``deploy`` command (#344)",
"type": "feature"
},
{
"category": "policy",
"description": "Fix IAM role creation issue (#565)",
"type": "bugfix"
},
{
"category": "local",
"description": "Fix `chalice local` handling of browser requests (#565)",
"type": "bugfix"
},
{
"category": "policy",
"description": "Support async/await syntax in automatic policy generation (#565)",
"type": "enhancement"
},
{
"category": "packaging",
"description": "Support additional PyPi package formats (.tar.bz2) (#720)",
"type": "enhancement"
}
]
}
================================================
FILE: .changes/1.10.0.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"category": "websocket",
"description": "Add experimental support for websockets (#1017)",
"type": "feature"
},
{
"category": "rest-api",
"description": "API Gateway Endpoint Type Configuration (#1160)",
"type": "feature"
},
{
"category": "rest-api",
"description": "API Gateway Resource Policy Configuration (#1160)",
"type": "feature"
},
{
"category": "packaging",
"description": "Add --merge-template option to package command (#1195)",
"type": "feature"
},
{
"category": "packaging",
"description": "Add support for packaging via terraform (#1129)",
"type": "feature"
}
]
}
================================================
FILE: .changes/1.11.0.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"category": "config",
"description": "Add support for stage independent lambda configuration (#1162)",
"type": "feature"
},
{
"category": "event-source",
"description": "Add support for subscribing to CloudWatch Events (#1126)",
"type": "feature"
},
{
"category": "event-source",
"description": "Add a ``description`` argument to CloudWatch schedule events (#1155)",
"type": "feature"
},
{
"category": "rest-api",
"description": "Fix deployment of API Gateway resource policies (#1220)",
"type": "bugfix"
}
]
}
================================================
FILE: .changes/1.11.1.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"category": "blueprint",
"description": "Fix mouting blueprints with root routes (#1230)",
"type": "bugfix"
},
{
"category": "rest-api",
"description": "Add support for multi-value headers responses (#1205)",
"type": "feature"
}
]
}
================================================
FILE: .changes/1.12.0.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"category": "CLI",
"description": "Add ``generate-models`` command (#1245)",
"type": "feature"
},
{
"category": "websocket",
"description": "Add ``close`` and ``info`` commands to websocket api (#1259)",
"type": "enhancement"
},
{
"category": "dependencies",
"description": "Bump upper bound on PIP to ``<19.4`` (#1273, #1272)",
"type": "enhancement"
}
]
}
================================================
FILE: .changes/1.13.0.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"category": "logs",
"description": "Fix error for ``chalice logs`` when a Lambda function\nhas not been invoked (#1252)",
"type": "bugfix"
},
{
"category": "CORS",
"description": "Add global CORS configuration (#70)",
"type": "feature"
},
{
"category": "packaging",
"description": "Fix packaging simplejson (#1304)",
"type": "bugfix"
},
{
"category": "python",
"description": "Add support for Python 3.8 (#1315)",
"type": "feature"
},
{
"category": "authorizer",
"description": "Add support for invocation role in custom authorizer (#1303)",
"type": "feature"
},
{
"category": "packaging",
"description": "Fix packaging on case-sensitive filesystems (#1356)",
"type": "bugfix"
}
]
}
================================================
FILE: .changes/1.13.1.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "enhancement",
"category": "local",
"description": "Add support for multiValueHeaders in local mode (#1381)."
},
{
"type": "bugfix",
"category": "local",
"description": "Make ``current_request`` thread safe in local mode (#759)"
},
{
"type": "enhancement",
"category": "local",
"description": "Add support for cognito in local mode (#1377)."
},
{
"type": "bugfix",
"category": "packaging",
"description": "Fix terraform generation when injecting custom domains (#1237)"
},
{
"type": "enhancement",
"category": "packaging",
"description": "Ensure repeatable zip file generation (#1114)."
},
{
"type": "bugfix",
"category": "CORS",
"description": "Fix CORS request when returning compressed binary types (#1336)"
}
]
}
================================================
FILE: .changes/1.14.0.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "bugfix",
"category": "packaging",
"description": "Fix pandas packaging regression (#1398)"
},
{
"type": "feature",
"category": "CLI",
"description": "Add ``dev plan/appgraph`` commands (#1396)"
},
{
"type": "enhancement",
"category": "SQS",
"description": "Validate queue name is used and not queue URL or ARN (#1388)"
}
]
}
================================================
FILE: .changes/1.14.1.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "enhancement",
"category": "pip",
"description": "Update pip version range to 20.1."
}
]
}
================================================
FILE: .changes/1.15.0.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "feature",
"category": "blueprints",
"description": "Mark blueprints as an accepted API (#1250)"
},
{
"type": "feature",
"category": "package",
"description": "Add ability to generate and merge yaml CloudFormation templates (#1425)"
},
{
"type": "enhancement",
"category": "terraform",
"description": "Allow generated terraform template to be used as a terraform module (#1300)"
},
{
"type": "feature",
"category": "logs",
"description": "Add support for tailing logs (#4)."
}
]
}
================================================
FILE: .changes/1.15.1.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "bugfix",
"category": "packaging",
"description": "Fix setup.py dependencies where the wheel package was not being installed (#1435)"
}
]
}
================================================
FILE: .changes/1.16.0.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "enhancement",
"category": "local",
"description": "Avoid error from cognito client credentials in local authorizer (#1447)"
},
{
"type": "bugfix",
"category": "package",
"description": "Traverse symlinks to directories when packaging the vendor directory (#583)."
},
{
"type": "feature",
"category": "DomainName",
"description": "Add support for custom domain names to REST/WebSocket APIs (#1194)"
},
{
"type": "feature",
"category": "auth",
"description": "Add support for oauth scopes on routes (#1444)."
}
]
}
================================================
FILE: .changes/1.17.0.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "feature",
"category": "Testing",
"description": "Add Chalice test client (#1468)"
},
{
"type": "enhancement",
"category": "regions",
"description": "Add support for non `aws` partitions including aws-cn and aws-us-gov (#792)."
},
{
"type": "bugfix",
"category": "dependencies",
"description": "Fix error when using old versions of click by requiring >=7"
},
{
"type": "bugfix",
"category": "local",
"description": "Fix local mode builtin authorizer not stripping query string from URL (#1470)"
}
]
}
================================================
FILE: .changes/1.18.0.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "feature",
"category": "Packaging",
"description": "Add support for automatic layer creation (#1485, #1001)"
}
]
}
================================================
FILE: .changes/1.18.1.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "bugfix",
"category": "Packaging",
"description": "Add fallback to retrieve name/version from sdist (#1486)"
},
{
"type": "bugfix",
"category": "Analyzer",
"description": "Handle symbols with multiple (shadowed) namespaces (#1494)"
}
]
}
================================================
FILE: .changes/1.19.0.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "feature",
"category": "Pipeline",
"description": "Add a new v2 template for the deployment pipeline CloudFormation template (#1506)"
}
]
}
================================================
FILE: .changes/1.2.0.json
================================================
{
"schema-version": "0.2",
"summary": "This release features a rewrite of the core deployment\ncode used in Chalice. This is a backwards compatible change\nfor users, but you may see changes to the autogenerated\nfiles Chalice creates.\nPlease read the `upgrade notes for 1.2.0\n<http://chalice.readthedocs.io/en/latest/upgrading.html#v1-2-0>`__\nfor more detailed information about upgrading to this release.\n\n",
"changes": [
{
"category": "rest-api",
"description": "Print out full stack trace when an error occurs (#711)",
"type": "enhancement"
},
{
"category": "rest-api",
"description": "Add ``image/jpeg`` as a default binary content type (#707)",
"type": "enhancement"
},
{
"category": "event-source",
"description": "Add support for AWS Lambda only projects (#162, #640)",
"type": "feature"
},
{
"category": "policy",
"description": "Fix inconsistent IAM role generation with pure lambdas (#685)",
"type": "bugfix"
},
{
"category": "deployment",
"description": "Rewrite Chalice deployer to more easily support additional AWS resources (#604)",
"type": "enhancement"
},
{
"category": "packaging",
"description": "Update the ``chalice package`` command to support\npure lambda functions and scheduled events. (#772)",
"type": "feature"
},
{
"category": "packaging",
"description": "Fix packager edge case normalizing sdist names (#778)",
"type": "bugfix"
},
{
"category": "packaging",
"description": "Fix SQLAlchemy packaging (#778)",
"type": "bugfix"
},
{
"category": "packaging",
"description": "Fix packaging abi3, wheels this fixes cryptography 2.2.x packaging (#764)",
"type": "bugfix"
}
]
}
================================================
FILE: .changes/1.2.1.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"category": "rest-api",
"description": "Add CORS headers to error response (#715)",
"type": "enhancement"
},
{
"category": "local",
"description": "Fix parsing empty query strings in local mode (#767)",
"type": "bugfix"
},
{
"category": "packaging",
"description": "Fix regression in ``chalice package`` when using role arns (#793)",
"type": "bugfix"
}
]
}
================================================
FILE: .changes/1.2.2.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"category": "packaging",
"description": "Fix package command not correctly setting environment variables (#795)",
"type": "bugfix"
}
]
}
================================================
FILE: .changes/1.2.3.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"category": "dependency",
"description": "Add support for pip 10 (#808)",
"type": "enhancement"
},
{
"category": "policy",
"description": "Update ``policies.json`` file (#817)",
"type": "enhancement"
}
]
}
================================================
FILE: .changes/1.20.0.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "enhancement",
"category": "Blueprints",
"description": "Add `current_app` property to Blueprints (#1094)"
},
{
"type": "enhancement",
"category": "CLI",
"description": "Set `AWS_CHALICE_CLI_MODE` env var whenever a Chalice CLI command is run (#1200)"
},
{
"type": "feature",
"category": "Middleware",
"description": "Add support for middleware (#1509)"
},
{
"type": "feature",
"category": "X-Ray",
"description": "Add support for AWS X-Ray (#464)"
}
]
}
================================================
FILE: .changes/1.20.1.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "bugfix",
"category": "Blueprints",
"description": "Preserve docstring in blueprints (#1525)"
},
{
"type": "enhancement",
"category": "Binary",
"description": "Support returning native python types when using `*/*` for binary types (#1501)"
}
]
}
================================================
FILE: .changes/1.21.0.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "bugfix",
"category": "Blueprints",
"description": "Fix regression when invoking Lambda functions from blueprints (#1535)"
},
{
"type": "feature",
"category": "Events",
"description": "Add support for Kinesis and DynamoDB event handlers (#987)"
}
]
}
================================================
FILE: .changes/1.21.1.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "bugfix",
"category": "Websockets",
"description": "Fix custom domain name configuration for websockets (#1531)"
},
{
"type": "bugfix",
"category": "Local",
"description": "Add support for multiple actions in builtin auth in local mode (#1527)"
},
{
"type": "bugfix",
"category": "Websocket",
"description": "Fix websocket client configuration when using a custom domain (#1503)"
},
{
"type": "bugfix",
"category": "Local",
"description": "Fix CORs handling in local mode (#761)"
}
]
}
================================================
FILE: .changes/1.21.2.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "bugfix",
"category": "Terraform",
"description": "Fix issue with wildcard partition names in s3 event handlers (#1508)"
},
{
"type": "bugfix",
"category": "Auth",
"description": "Fix special case processing for root URL auth (#1271)"
},
{
"type": "enhancement",
"category": "Middleware",
"description": "Add support for HTTP middleware catching exceptions (#1541)"
}
]
}
================================================
FILE: .changes/1.21.3.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "enhancement",
"category": "Test",
"description": "Add test client methods for generating sample kinesis events"
},
{
"type": "enhancement",
"category": "Config",
"description": "Validate env var values are strings (#1543)"
}
]
}
================================================
FILE: .changes/1.21.4.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "enhancement",
"category": "Local",
"description": "Allow custom Chalice class in local mode (#1502)"
},
{
"type": "bugfix",
"category": "Layers",
"description": "Ensure single reference to managed layer (#1563)"
}
]
}
================================================
FILE: .changes/1.21.5.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "bugfix",
"category": "Config",
"description": "Fix config validation for env vars on py27 (#1573)"
},
{
"type": "bugfix",
"category": "Pip",
"description": "Bump pip version contraint (#1590)"
},
{
"type": "bugfix",
"category": "REST",
"description": "Add Allow header with list of allowed methods when returning 405 error (#1583)"
}
]
}
================================================
FILE: .changes/1.21.6.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "enhancement",
"category": "Packaging",
"description": "Increase upper bound for AWS provider in Terraform to 3.x (#1596)"
},
{
"type": "enhancement",
"category": "Packaging",
"description": "Add support for manylinux2014 wheels (#1551)"
}
]
}
================================================
FILE: .changes/1.21.7.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "enhancement",
"category": "Terraform",
"description": "Map custom domain outputs in Terraform packaging (#1601)"
}
]
}
================================================
FILE: .changes/1.21.8.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "enhancement",
"category": "Authorizers",
"description": "Add support for custom headers in built-in authorizers (#1613)"
}
]
}
================================================
FILE: .changes/1.21.9.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "enhancement",
"category": "Dependencies",
"description": "Bump attr version constraint (#1620)"
}
]
}
================================================
FILE: .changes/1.22.0.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "feature",
"category": "CDK",
"description": "Add built-in support for the AWS CDK (#1622)"
}
]
}
================================================
FILE: .changes/1.22.1.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "enhancement",
"category": "Pip",
"description": "Bump pip version range to latest version 21.x (#1630)"
},
{
"type": "enhancement",
"category": "IAM",
"description": "Improve client call collection when generation policies (#692)"
}
]
}
================================================
FILE: .changes/1.22.2.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "enhancement",
"category": "Blueprint",
"description": "Add log property to blueprint"
},
{
"type": "bugfix",
"category": "Pipeline",
"description": "Fix build command in pipeline generation (#1653)"
},
{
"type": "enhancement",
"category": "Dependencies",
"description": "Change enum-compat dependency to enum34 with version restrictions (#1667)"
}
]
}
================================================
FILE: .changes/1.22.3.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "enhancement",
"category": "Terraform",
"description": "Bump Terraform version to include 0.14"
},
{
"type": "bugfix",
"category": "Typing",
"description": "Fix type definitions in app.pyi (#1676)"
},
{
"type": "bugfix",
"category": "Terraform",
"description": "Use references instead of function names in Terraform packaging (#1558)"
}
]
}
================================================
FILE: .changes/1.22.4.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "enhancement",
"category": "Types",
"description": "Add missing types to app.pyi stub file (#1701)"
},
{
"type": "bugfix",
"category": "Custom Domain",
"description": "Fix custom domain generation when using the CDK (#1640)"
},
{
"type": "bugfix",
"category": "Packaging",
"description": "Special cases pyrsistent packaging (#1696)"
}
]
}
================================================
FILE: .changes/1.23.0.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "enhancement",
"category": "Deploy",
"description": "Wait for function state to be active when deploying"
},
{
"type": "feature",
"category": "SQS",
"description": "Add queue_arn parameter to enable CDK integration with SQS event handler (#1681)"
}
]
}
================================================
FILE: .changes/1.24.0.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "feature",
"category": "Python2.7",
"description": "Remove support for Python 2.7 (#1766)"
},
{
"type": "enhancement",
"category": "Terraform",
"description": "Update Terraform packaging to support version 1.0 (#1757)"
},
{
"type": "enhancement",
"category": "Typing",
"description": "Add missing WebsocketEvent type information (#1746)"
},
{
"type": "enhancement",
"category": "S3 events",
"description": "Add source account to Lambda permissions when configuring S3 events (#1635)"
},
{
"type": "enhancement",
"category": "Packaging",
"description": "Add support for Terraform v0.15 (#1725)"
}
]
}
================================================
FILE: .changes/1.24.1.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "bugfix",
"category": "GovCloud",
"description": "Fix partition error when updating API Gateway in GovCloud region (#1770)"
}
]
}
================================================
FILE: .changes/1.24.2.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "enhancement",
"category": "Dependencies",
"description": "Bump attrs dependency to latest version (#1786)"
},
{
"type": "bugfix",
"category": "Auth",
"description": "Fix ARN parsing when generating a builtin AuthResponse (#1775)"
},
{
"type": "enhancement",
"category": "CLI",
"description": "Upgrade Click dependency to support v8.0.0 (#1729)"
}
]
}
================================================
FILE: .changes/1.25.0.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "feature",
"category": "Python",
"description": "Add support for Python 3.9 (#1787)"
}
]
}
================================================
FILE: .changes/1.26.0.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "feature",
"category": "Websockets",
"description": "Add support for setting the Websocket protocol from the connect handler (#1768)"
},
{
"type": "feature",
"category": "SQS",
"description": "Added MaximumBatchingWindowInSeconds to SQS event handler (#1778)"
}
]
}
================================================
FILE: .changes/1.26.1.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "enhancement",
"category": "Dependencies",
"description": "Bump pip dependency to latest released version (#1817)"
},
{
"type": "enhancement",
"category": "Tests",
"description": "Don't include tests package in .whl file (#1814)"
}
]
}
================================================
FILE: .changes/1.26.2.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "enhancement",
"category": "Dependencies",
"description": "Update pyyaml to 6.x (#1830)"
},
{
"type": "bugfix",
"category": "Websocket",
"description": "Correctly configure websocket endpoint in the aws-cn partition (#1820)"
}
]
}
================================================
FILE: .changes/1.26.3.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "enhancement",
"category": "Errors",
"description": "Remove redundant error code in error message string (#1339)"
},
{
"type": "enhancement",
"category": "VPC",
"description": "Associate VPC endpoint with Rest API (#1449)"
}
]
}
================================================
FILE: .changes/1.26.4.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "bugfix",
"category": "Terraform",
"description": "Use updated keywords for providing provider version constraints (#1717)"
}
]
}
================================================
FILE: .changes/1.26.5.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "enhancement",
"category": "Terraform",
"description": "Remove template provider in favor of locals (#1869)"
},
{
"type": "enhancement",
"category": "Terraform",
"description": "Bump Terraform version to suppose 1.1.x (#1868)"
}
]
}
================================================
FILE: .changes/1.26.6.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "bugfix",
"category": "pip",
"description": "Fix RuntimeError with pip v22.x (#1887)"
}
]
}
================================================
FILE: .changes/1.27.0.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "bugfix",
"category": "Local",
"description": "Set a default timeout when creating the local LambdaContext instance (#1896)"
},
{
"type": "feature",
"category": "CDK",
"description": "Add support for CDK v2 (#1742)"
}
]
}
================================================
FILE: .changes/1.27.1.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "enhancement",
"category": "Pip",
"description": "Bump pip version range to latest version <22.2 (#1924)"
},
{
"type": "enhancement",
"category": "Websockets",
"description": "Add support for WebSockets API Terraform packaging (#1670)"
}
]
}
================================================
FILE: .changes/1.27.2.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "enhancement",
"category": "Terraform",
"description": "Update aws provider constraint to allow versions 4.x (#1951)"
},
{
"type": "enhancement",
"category": "event-source",
"description": "Add attribute for message attributes in SNSEvent and generated test events (#1934)"
}
]
}
================================================
FILE: .changes/1.27.3.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "bugfix",
"category": "Versioning",
"description": "Fix version string updates used in the release process (#1971)"
}
]
}
================================================
FILE: .changes/1.28.0.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "enhancement",
"category": "Terraform",
"description": "Update required terraform version to support 1.3 (#2014)"
},
{
"type": "enhancement",
"category": "Pip",
"description": "Bump pip version range to latest version <22.3 (#2016)"
},
{
"type": "feature",
"category": "Config",
"description": "Add support for `log_retention_in_days` (#943)"
}
]
}
================================================
FILE: .changes/1.29.0.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "feature",
"category": "Python",
"description": "Add support for Python 3.10 (#2037)"
},
{
"type": "enhancement",
"category": "Pip",
"description": "Bump pip version range to latest version <23.2 (#2034)"
}
]
}
================================================
FILE: .changes/1.3.0.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"category": "config",
"description": "Add support for Lambdas in a VPC (#413, #837, #673)",
"type": "feature"
},
{
"category": "packaging",
"description": "Add support for packaging local directories (#653)",
"type": "feature"
},
{
"category": "local",
"description": "Add support for automatically reloading the local\ndev server when files are modified (#316, #846, #706)",
"type": "enhancement"
},
{
"category": "logging",
"description": "Add support for viewing cloudwatch logs of all\nlambda functions (#841, #849)",
"type": "enhancement"
}
]
}
================================================
FILE: .changes/1.30.0.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "feature",
"category": "Python",
"description": "Add support for Python 3.11 (#2053)"
},
{
"type": "enhancement",
"category": "Pip",
"description": "Update version dependency on pip (#2080)"
}
]
}
================================================
FILE: .changes/1.31.0.json
================================================
{
"schema-version": "1.0",
"changes": [
{
"type": "feature",
"category": "Python",
"description": "Add support for Python 3.12 (#2086)"
},
{
"type": "enhancement",
"category": "Python",
"description": "Drop support for Python 3.7 (#2095)"
}
]
}
================================================
FILE: .changes/1.31.1.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"type": "enhancement",
"category": "pip",
"description": "Update pip version to allow 24.0 (#2092)"
},
{
"type": "bugfix",
"category": "tar",
"description": "Validate tar extraction does not escape destination dir (#1990)"
}
]
}
================================================
FILE: .changes/1.31.2.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"type": "enhancement",
"category": "SQS",
"description": "Add configuration option for MaximumConcurrency for SQS event source (#2104)"
}
]
}
================================================
FILE: .changes/1.31.3.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"type": "enhancement",
"category": "Pip",
"description": "Update pip to the latest version (<24.4)"
},
{
"type": "enhancement",
"category": "CLI",
"description": "Remove distutils warning when packaging/deploying apps (#2123)"
}
]
}
================================================
FILE: .changes/1.31.4.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"type": "enhancement",
"category": "Pip",
"description": "Update pip to the latest version (<25.1)"
}
]
}
================================================
FILE: .changes/1.32.0.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"type": "feature",
"category": "Python",
"description": "Add support for Python 3.13 (#2137)"
},
{
"type": "feature",
"category": "Python",
"description": "Drop support for Python 3.8 (#2138)"
}
]
}
================================================
FILE: .changes/1.4.0.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"category": "CI-CD",
"description": "Add support for generating python 3.6 pipelines (#858)",
"type": "enhancement"
},
{
"category": "event-source",
"description": "Add support for connecting lambda functions to S3 events (#855)",
"type": "feature"
},
{
"category": "event-source",
"description": "Add support for connecting lambda functions to SNS message (#488)",
"type": "feature"
},
{
"category": "local",
"description": "Make ``watchdog`` an optional dependency and add a built in\n``stat()`` based file poller (#867)",
"type": "enhancement"
},
{
"category": "event-source",
"description": "Add support for connecting lambda functions to an SQS queue (#884)",
"type": "feature"
}
]
}
================================================
FILE: .changes/1.5.0.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"category": "policy",
"description": "Add support for S3 upload_file/download_file in\npolicy generator (#889)",
"type": "feature"
}
]
}
================================================
FILE: .changes/1.6.0.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"category": "CLI",
"description": "Add ``chalice invoke`` command (#900)",
"type": "feature"
}
]
}
================================================
FILE: .changes/1.6.1.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"category": "local",
"description": "Fix local mode issue with unicode responses and Content-Length (#910)",
"type": "bugfix"
},
{
"category": "dev",
"description": "Fix issue with ``requirements-dev.txt`` not setting up a working\ndev environment (#920)",
"type": "enhancement"
},
{
"category": "dependencies",
"description": "Add support for pip 18 (#910)",
"type": "enhancement"
}
]
}
================================================
FILE: .changes/1.6.2.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"category": "dependencies",
"description": "Add support for pip 18.2 (#991)",
"type": "enhancement"
},
{
"category": "logging",
"description": "Add more detailed debug logs to the packager. (#934)",
"type": "enhancement"
},
{
"category": "python",
"description": "Add support for python3.7 (#992)",
"type": "feature"
},
{
"category": "rest-api",
"description": "Support bytes for the application/json binary type (#988)",
"type": "feature"
},
{
"category": "rest-api",
"description": "Use more compact JSON representation by default for dicts (#958)",
"type": "enhancement"
},
{
"category": "logging",
"description": "Log internal exceptions as errors (#254)",
"type": "enhancement"
},
{
"category": "rest-api",
"description": "Generate swagger documentation from docstrings (#574)",
"type": "feature"
}
]
}
================================================
FILE: .changes/1.7.0.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"category": "packaging",
"description": "Fix packaging multiple local directories as dependencies (#1047)",
"type": "bugfix"
},
{
"category": "event-source",
"description": "Add support for passing SNS ARNs to ``on_sns_message`` (#1048)",
"type": "feature"
},
{
"category": "blueprint",
"description": "Add support for Blueprints (#1023)",
"type": "feature"
},
{
"category": "config",
"description": "Add support for opting-in to experimental features (#1053)",
"type": "feature"
},
{
"category": "event-source",
"description": "Provide Lambda context in event object (#856)",
"type": "feature"
}
]
}
================================================
FILE: .changes/1.8.0.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"category": "packaging",
"description": "Fall back to pure python version of yaml parser\nwhen unable to compile C bindings for PyYAML (#1074)",
"type": "bugfix"
},
{
"category": "packaging",
"description": "Add support for Lambda layers. (#1001)",
"type": "feature"
}
]
}
================================================
FILE: .changes/1.9.0.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"category": "dependencies",
"description": "Update PIP to support up to 19.1.x (#1104)",
"type": "enhancement"
},
{
"category": "rest-api",
"description": "Fix handling of more complex Accept headers for binary\ncontent types (#1078)",
"type": "bugfix"
},
{
"category": "rest-api",
"description": "Raise TypeError when trying to serialize an unserializable\ntype (#1100)",
"type": "enhancement"
},
{
"category": "policy",
"description": "Update ``policies.json`` file (#1110)",
"type": "enhancement"
},
{
"category": "rest-api",
"description": "Support repeating values in the query string (#1131)",
"type": "feature"
},
{
"category": "packaging",
"description": "Add layer support to chalice package (#1130)",
"type": "feature"
},
{
"category": "rest-api",
"description": "Fix bug with route ``name`` kwarg raising a ``TypeError`` (#1112)",
"type": "bugfix"
},
{
"category": "logging",
"description": "Change exceptions to always be logged at the ERROR level (#969)",
"type": "enhancement"
},
{
"category": "CLI",
"description": "Fix bug handling exceptions during ``chalice invoke`` on\nPython 3.7 (#1139)",
"type": "bugfix"
},
{
"category": "rest-api",
"description": "Add support for API Gateway compression (#672)",
"type": "bugfix"
},
{
"category": "packaging",
"description": "Add support for both relative and absolute paths for\n``--package-dir`` (#940)",
"type": "enhancement"
}
]
}
================================================
FILE: .changes/1.9.1.json
================================================
{
"schema-version": "0.2",
"changes": [
{
"category": "rest-api",
"description": "Make MultiDict mutable (#1158)",
"type": "enhancement"
}
]
}
================================================
FILE: .changes/templates/changelog
================================================
# CHANGELOG
{% for release, changes in releases %}
## {{ release }}
{% if changes.summary %}
{{ changes.summary -}}
{% endif %}
{% for change in changes.changes %}
* {{ change.type }}:{{ change.category }}:{{ change.description -}}
{% endfor %}
{% endfor %}
================================================
FILE: .coveragerc
================================================
[run]
branch = True
[report]
exclude_lines =
raise NotImplementedError.*
================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
*Issue #, if available:*
*Description of changes:*
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
================================================
FILE: .github/dependabot.yml
================================================
version: 2
updates:
- package-ecosystem: pip
directory: "/."
schedule:
interval: daily
time: "13:00"
open-pull-requests-limit: 10
allow:
- dependency-name: pip
- dependency-name: click
================================================
FILE: .github/workflows/run-tests.yml
================================================
name: Run PR Checks
on:
push:
branches:
- master
- "feature/**"
pull_request:
branches:
- master
- "feature/**"
jobs:
prcheck:
runs-on: ${{ matrix.os }}
env:
HYPOTHESIS_PROFILE: ci
CHALICE_TEST_EXTENDED_PACKAGING: true
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [3.9, '3.10', 3.11, 3.12, 3.13]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
name: Set up Python ${{ matrix.python-version }}
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
make install-dev-deps
- name: Run PRCheck
run: make prcheck
cdktests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9, '3.10', 3.11, 3.12, 3.13]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
- uses: actions/setup-python@v2
name: Set up Python ${{ matrix.python-version }}
with:
python-version: ${{ matrix.python-version }}
- name: Install CDK
run: npm install -g aws-cdk
- name: Install dependencies
run: |
pip install -r requirements-test.txt --upgrade --upgrade-strategy eager -e .[cdkv2]
- name: Run CDK tests
run: python -m pytest tests/functional/cdk
# Chalice works on windows, but there's some differences between
# the GitHub actions windows environment and our windows dev
# laptops that are causing certain tests to fail. Once these
# are fixed we can also test on windows but for now we have to
# disable these.
# tests-windows:
# runs-on: windows-latest
# strategy:
# matrix:
# # In windows where you have to explicitly install
# # python, it's unlikely users are going to install
# # python 2.7 which is no longer supported so we're
# # only testing python3 on windows.
# python-version: [3.6, 3.7, 3.8, 3.9]
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-python@v2
# name: Set up Python ${{ matrix.python-version }}
# with:
# python-version: ${{ matrix.python-version }}
# - name: Install dependencies
# run: |
# pip install -r requirements-dev.txt
# pip install -e .
# - name: Run PRCheck
# run: python -m pytest tests/unit tests/functional tests/integration
================================================
FILE: .github/workflows/stale-issue.yml
================================================
name: "Close stale issues"
on:
schedule:
- cron: "*/60 * * * *"
jobs:
cleanup:
runs-on: ubuntu-latest
name: Stale issue job
steps:
- uses: aws-actions/stale-issue-cleanup@v4
with:
issue-types: issues
ancient-issue-message: ""
stale-issue-message: >
Greetings! It looks like this issue hasn’t been active in longer than
five days. We encourage you to check if this is still an issue in the latest
release. In the absence of more information, we will be closing this issue
soon. If you find that this is still a problem, please feel free to provide a
comment or upvote with a reaction on the initial post to prevent automatic
closure. If the issue is already closed, please feel free to open a new one.
# These labels are required
stale-issue-label: closing-soon
exempt-issue-labels: bug, feature-request
response-requested-label: response-requested
# Don't set closed-for-staleness label to skip closing very old issues
# regardless of label
closed-for-staleness-label: closed-for-staleness
# Issue timing
days-before-stale: 10
days-before-close: 4
days-before-ancient: 2190
# If you don't want to mark a issue as being ancient based on a
# threshold of "upvotes", you can set this here. An "upvote" is
# the total number of +1, heart, hooray, and rocket reactions
# on an issue.
minimum-upvotes-to-exempt: 2
repo-token: ${{ secrets.GITHUB_TOKEN }}
loglevel: DEBUG
# Set dry-run to true to not perform label or close actions.
dry-run: false
================================================
FILE: .gitignore
================================================
sample/
.cache
venv
docs/build/
.idea
__pycache__/
.coverage
chalice.egg-info/
.hypothesis/
.pytest_cache/
.mypy_cache/
*.pyc
.vscode
================================================
FILE: .pylintrc
================================================
[MASTER]
# Specify a configuration file.
#rcfile=
# Python code to execute, usually for sys.path manipulation such as
# pygtk.require().
init-hook="import sys, os; sys.path.append(os.path.join('tests', 'plugins'))"
# Add files or directories to the blacklist. They should be base names, not
# paths.
ignore=compat.py,regions.py
# Pickle collected data for later comparisons.
persistent=yes
# List of plugins (as comma separated values of python modules names) to load,
# usually to register additional checkers.
load-plugins=codelinter,testlinter
# Use multiple processes to speed up Pylint.
jobs=1
# Allow loading of arbitrary C extensions. Extensions are imported into the
# active Python interpreter and may run arbitrary code.
unsafe-load-any-extension=no
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code
extension-pkg-whitelist=
[MESSAGES CONTROL]
# Only show warnings with the listed confidence levels. Leave empty to show
# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED
confidence=
# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
# multiple time. See also the "--disable" option for examples.
#enable=
# Disable the message, report, category or checker with the given id(s). You
# can either give multiple identifiers separated by comma (,) or put this
# option multiple times (only on the command line, not in the configuration
# file where it should appear only once).You can also use "--disable=all" to
# disable everything first and then reenable specific checks. For example, if
# you want to run only the similarities checker, you can use "--disable=all
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use"--disable=all --enable=classes
# --disable=W"
disable=W0613,I0021,I0020,C0111,R0902,R0903,W0231,W0611,R0913,W0703,I0011,R0904,R0205,R1705,R1710,C0415,R1725,W0707,R1732,W1512,C0209,W1514,C0412,C0411,R1735,R0917
[REPORTS]
# Set the output format. Available formats are text, parseable, colorized, msvs
# (visual studio) and html. You can also give a reporter class, eg
# mypackage.mymodule.MyReporterClass.
output-format=text
# Tells whether to display a full report or only the messages
reports=no
# Python expression which should return a note less than 10 (10 is the highest
# note). You have access to the variables errors warning, statement which
# respectively contain the number of errors / warnings messages and the total
# number of statements analyzed. This is used by the global evaluation report
# (RP0004).
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
# Template used to display messages. This is a python new-style format string
# used to format the message information. See doc for all details
#msg-template=
[BASIC]
# Good variable names which should always be accepted, separated by a comma
good-names=e,i,j,k,n,ex,Run,_
# Bad variable names which should always be refused, separated by a comma
bad-names=foo,bar,baz,toto,tutu,tata
# Colon-delimited sets of names that determine each other's naming style when
# the name regexes allow several styles.
name-group=
# Include a hint for the correct naming format with invalid-name
include-naming-hint=no
# Regular expression matching correct function names
function-rgx=[a-z_][a-z0-9_]{2,50}$
# Regular expression matching correct variable names
variable-rgx=[a-z_][a-z0-9_]{0,50}$
# Regular expression matching correct constant names
const-rgx=(([a-zA-Z_][a-zA-Z0-9_]*)|(__.*__))$
# Regular expression matching correct attribute names
attr-rgx=[a-z_][a-z0-9_]{1,50}$
# Regular expression matching correct argument names
argument-rgx=[a-z_][a-z0-9_]{0,50}$
# Regular expression matching correct class attribute names
class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,40}|(__.*__))$
# Regular expression matching correct inline iteration names
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
# Regular expression matching correct class names
class-rgx=[A-Z_][a-zA-Z0-9]+$
# Regular expression matching correct module names
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
# Regular expression matching correct method names
# Allow for the ast visitor method names of visit_CamelCase.
# Allow for do_HTTPMETHOD used in chalice local.
method-rgx=([a-z_][a-z0-9_]{2,50}|visit_[a-zA-Z]+|do_[A-Z]+)$
# Regular expression which should only match function or class names that do
# not require a docstring.
no-docstring-rgx=.*
# Minimum line length for functions/classes that require docstrings, shorter
# ones are exempt.
docstring-min-length=-1
typevar-rgx=(([a-zA-Z_][a-zA-Z0-9_]*)|(__.*__))$
typealias-rgx=(([a-zA-Z_][a-zA-Z0-9_]*)|(__.*__))$
[FORMAT]
# Maximum number of characters on a single line.
max-line-length=80
# Regexp for a line that is allowed to be longer than the limit.
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
# Allow the body of an if to be on the same line as the test if there is no
# else.
single-line-if-stmt=no
# Maximum number of lines in a module
max-module-lines=1000
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
# tab).
indent-string=' '
# Number of spaces of indent required inside a hanging or continued line.
indent-after-paren=4
# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
expected-line-ending-format=
[LOGGING]
# Logging modules to check that the string format arguments are in logging
# function parameter format
logging-modules=logging
[MISCELLANEOUS]
# List of note tags to take in consideration, separated by a comma.
notes=FIXME,XXX
[SIMILARITIES]
# Minimum lines number of a similarity.
min-similarity-lines=5
# Ignore comments when computing similarities.
ignore-comments=no
# Ignore docstrings when computing similarities.
ignore-docstrings=no
# Ignore imports when computing similarities.
ignore-imports=no
[SPELLING]
# Spelling dictionary name. Available dictionaries: none. To make it working
# install python-enchant package.
spelling-dict=
# List of comma separated words that should not be checked.
spelling-ignore-words=
# A path to a file that contains private dictionary; one word per line.
spelling-private-dict-file=
# Tells whether to store unknown words to indicated private dictionary in
# --spelling-private-dict-file option instead of raising a message.
spelling-store-unknown-words=no
[TYPECHECK]
# Tells whether missing members accessed in mixin class should be ignored. A
# mixin class is detected if its name ends with "mixin" (case insensitive).
ignore-mixin-members=yes
# List of module names for which member attributes should not be checked
# (useful for modules/projects where namespaces are manipulated during runtime
# and thus existing member attributes cannot be deduced by static analysis
ignored-modules=six.moves,aws_cdk
# List of classes names for which member attributes should not be checked
# (useful for classes with attributes dynamically set).
ignored-classes=SQLObject
# List of members which are set dynamically and missed by pylint inference
# system, and so shouldn't trigger E0201 when accessed. Python regular
# expressions are accepted.
generated-members=REQUEST,acl_users,aq_parent,objects,DoesNotExist,md5,sha1,sha224,sha256,sha384,sha512
[VARIABLES]
# Tells whether we should check for unused import in __init__ files.
init-import=no
# A regular expression matching the name of dummy variables (i.e. expectedly
# not used).
dummy-variables-rgx=_|dummy|ignore
# List of additional names supposed to be defined in builtins. Remember that
# you should avoid to define new builtins when possible.
additional-builtins=
# List of strings which can identify a callback function by name. A callback
# name must start or end with one of those strings.
callbacks=cb_,_cb
[CLASSES]
# List of method names used to declare (i.e. assign) instance attributes.
defining-attr-methods=__init__,__new__,setUp
# List of valid names for the first argument in a class method.
valid-classmethod-first-arg=cls
# List of valid names for the first argument in a metaclass class method.
valid-metaclass-classmethod-first-arg=mcs
# List of member names, which should be excluded from the protected access
# warning.
exclude-protected=_asdict,_fields,_replace,_source,_make
[DESIGN]
# Maximum number of arguments for function / method
max-args=5
# Argument names that match this expression will be ignored. Default to name
# with leading underscore
ignored-argument-names=_.*
# Maximum number of locals for function / method body
max-locals=15
# Maximum number of return / yield for function / method body
max-returns=6
# Maximum number of branch for function / method body
max-branches=12
# Maximum number of statements in function / method body
max-statements=30
# Maximum number of parents for a class (see R0901).
max-parents=6
# Maximum number of attributes for a class (see R0902).
max-attributes=7
# Minimum number of public methods for a class (see R0903).
min-public-methods=0
# Maximum number of public methods for a class (see R0904).
max-public-methods=20
[IMPORTS]
# Deprecated modules which should not be used, separated by a comma
deprecated-modules=regsub,string,TERMIOS,Bastion,rexec,UserDict
# Create a graph of every (i.e. internal and external) dependencies in the
# given file (report RP0402 must not be disabled)
import-graph=
# Create a graph of external dependencies in the given file (report RP0402 must
# not be disabled)
ext-import-graph=
# Create a graph of internal dependencies in the given file (report RP0402 must
# not be disabled)
int-import-graph=
# Typing is a third party package in python 2, but built-in to the standard
# library for Python 3. This causes linting issues when typing get grouped
# with the third party package imports. Since chalice was originally written
# just for Python 2, the code standard is to treat as a third party library
# and thus mark it as so when linting.
known-third-party=typing
[EXCEPTIONS]
# Exceptions that will emit a warning when being caught. Defaults to
# "Exception"
overgeneral-exceptions=builtins.Exception
================================================
FILE: .python-version
================================================
3.7
================================================
FILE: CHANGELOG.md
================================================
# CHANGELOG
## 1.32.0
* feature:Python:Add support for Python 3.13 (#2137)
* feature:Python:Drop support for Python 3.8 (#2138)
## 1.31.4
* enhancement:Pip:Update pip to the latest version (<25.1)
## 1.31.3
* enhancement:Pip:Update pip to the latest version (<24.4)
* enhancement:CLI:Remove distutils warning when packaging/deploying apps (#2123)
## 1.31.2
* enhancement:SQS:Add configuration option for MaximumConcurrency for SQS event source (#2104)
## 1.31.1
* enhancement:pip:Update pip version to allow 24.0 (#2092)
* bugfix:tar:Validate tar extraction does not escape destination dir (#1990)
## 1.31.0
* feature:Python:Add support for Python 3.12 (#2086)
* enhancement:Python:Drop support for Python 3.7 (#2095)
## 1.30.0
* feature:Python:Add support for Python 3.11 (#2053)
* enhancement:Pip:Update version dependency on pip (#2080)
## 1.29.0
* feature:Python:Add support for Python 3.10 (#2037)
* enhancement:Pip:Bump pip version range to latest version <23.2 (#2034)
## 1.28.0
* enhancement:Terraform:Update required terraform version to support 1.3 (#2014)
* enhancement:Pip:Bump pip version range to latest version <22.3 (#2016)
* feature:Config:Add support for `log_retention_in_days` (#943)
## 1.27.3
* bugfix:Versioning:Fix version string updates used in the release process (#1971)
## 1.27.2
* enhancement:Terraform:Update aws provider constraint to allow versions 4.x (#1951)
* enhancement:event-source:Add attribute for message attributes in SNSEvent and generated test events (#1934)
## 1.27.1
* enhancement:Pip:Bump pip version range to latest version <22.2 (#1924)
* enhancement:Websockets:Add support for WebSockets API Terraform packaging (#1670)
## 1.27.0
* bugfix:Local:Set a default timeout when creating the local LambdaContext instance (#1896)
* feature:CDK:Add support for CDK v2 (#1742)
## 1.26.6
* bugfix:pip:Fix RuntimeError with pip v22.x (#1887)
## 1.26.5
* enhancement:Terraform:Remove template provider in favor of locals (#1869)
* enhancement:Terraform:Bump Terraform version to suppose 1.1.x (#1868)
## 1.26.4
* bugfix:Terraform:Use updated keywords for providing provider version constraints (#1717)
## 1.26.3
* enhancement:Errors:Remove redundant error code in error message string (#1339)
* enhancement:VPC:Associate VPC endpoint with Rest API (#1449)
## 1.26.2
* enhancement:Dependencies:Update pyyaml to 6.x (#1830)
* bugfix:Websocket:Correctly configure websocket endpoint in the aws-cn partition (#1820)
## 1.26.1
* enhancement:Dependencies:Bump pip dependency to latest released version (#1817)
* enhancement:Tests:Don't include tests package in .whl file (#1814)
## 1.26.0
* feature:Websockets:Add support for setting the Websocket protocol from the connect handler (#1768)
* feature:SQS:Added MaximumBatchingWindowInSeconds to SQS event handler (#1778)
## 1.25.0
* feature:Python:Add support for Python 3.9 (#1787)
## 1.24.2
* enhancement:Dependencies:Bump attrs dependency to latest version (#1786)
* bugfix:Auth:Fix ARN parsing when generating a builtin AuthResponse (#1775)
* enhancement:CLI:Upgrade Click dependency to support v8.0.0 (#1729)
## 1.24.1
* bugfix:GovCloud:Fix partition error when updating API Gateway in GovCloud region (#1770)
## 1.24.0
* feature:Python2.7:Remove support for Python 2.7 (#1766)
* enhancement:Terraform:Update Terraform packaging to support version 1.0 (#1757)
* enhancement:Typing:Add missing WebsocketEvent type information (#1746)
* enhancement:S3 events:Add source account to Lambda permissions when configuring S3 events (#1635)
* enhancement:Packaging:Add support for Terraform v0.15 (#1725)
## 1.23.0
* enhancement:Deploy:Wait for function state to be active when deploying
* feature:SQS:Add queue_arn parameter to enable CDK integration with SQS event handler (#1681)
## 1.22.4
* enhancement:Types:Add missing types to app.pyi stub file (#1701)
* bugfix:Custom Domain:Fix custom domain generation when using the CDK (#1640)
* bugfix:Packaging:Special cases pyrsistent packaging (#1696)
## 1.22.3
* enhancement:Terraform:Bump Terraform version to include 0.14
* bugfix:Typing:Fix type definitions in app.pyi (#1676)
* bugfix:Terraform:Use references instead of function names in Terraform packaging (#1558)
## 1.22.2
* enhancement:Blueprint:Add log property to blueprint
* bugfix:Pipeline:Fix build command in pipeline generation (#1653)
* enhancement:Dependencies:Change enum-compat dependency to enum34 with version restrictions (#1667)
## 1.22.1
* enhancement:Pip:Bump pip version range to latest version 21.x (#1630)
* enhancement:IAM:Improve client call collection when generation policies (#692)
## 1.22.0
* feature:CDK:Add built-in support for the AWS CDK (#1622)
## 1.21.9
* enhancement:Dependencies:Bump attr version constraint (#1620)
## 1.21.8
* enhancement:Authorizers:Add support for custom headers in built-in authorizers (#1613)
## 1.21.7
* enhancement:Terraform:Map custom domain outputs in Terraform packaging (#1601)
## 1.21.6
* enhancement:Packaging:Increase upper bound for AWS provider in Terraform to 3.x (#1596)
* enhancement:Packaging:Add support for manylinux2014 wheels (#1551)
## 1.21.5
* bugfix:Config:Fix config validation for env vars on py27 (#1573)
* bugfix:Pip:Bump pip version contraint (#1590)
* bugfix:REST:Add Allow header with list of allowed methods when returning 405 error (#1583)
## 1.21.4
* enhancement:Local:Allow custom Chalice class in local mode (#1502)
* bugfix:Layers:Ensure single reference to managed layer (#1563)
## 1.21.3
* enhancement:Test:Add test client methods for generating sample kinesis events
* enhancement:Config:Validate env var values are strings (#1543)
## 1.21.2
* bugfix:Terraform:Fix issue with wildcard partition names in s3 event handlers (#1508)
* bugfix:Auth:Fix special case processing for root URL auth (#1271)
* enhancement:Middleware:Add support for HTTP middleware catching exceptions (#1541)
## 1.21.1
* bugfix:Websockets:Fix custom domain name configuration for websockets (#1531)
* bugfix:Local:Add support for multiple actions in builtin auth in local mode (#1527)
* bugfix:Websocket:Fix websocket client configuration when using a custom domain (#1503)
* bugfix:Local:Fix CORs handling in local mode (#761)
## 1.21.0
* bugfix:Blueprints:Fix regression when invoking Lambda functions from blueprints (#1535)
* feature:Events:Add support for Kinesis and DynamoDB event handlers (#987)
## 1.20.1
* bugfix:Blueprints:Preserve docstring in blueprints (#1525)
* enhancement:Binary:Support returning native python types when using `*/*` for binary types (#1501)
## 1.20.0
* enhancement:Blueprints:Add `current_app` property to Blueprints (#1094)
* enhancement:CLI:Set `AWS_CHALICE_CLI_MODE` env var whenever a Chalice CLI command is run (#1200)
* feature:Middleware:Add support for middleware (#1509)
* feature:X-Ray:Add support for AWS X-Ray (#464)
## 1.19.0
* feature:Pipeline:Add a new v2 template for the deployment pipeline CloudFormation template (#1506)
## 1.18.1
* bugfix:Packaging:Add fallback to retrieve name/version from sdist (#1486)
* bugfix:Analyzer:Handle symbols with multiple (shadowed) namespaces (#1494)
## 1.18.0
* feature:Packaging:Add support for automatic layer creation (#1485, #1001)
## 1.17.0
* feature:Testing:Add Chalice test client (#1468)
* enhancement:regions:Add support for non `aws` partitions including aws-cn and aws-us-gov (#792).
* bugfix:dependencies:Fix error when using old versions of click by requiring >=7
* bugfix:local:Fix local mode builtin authorizer not stripping query string from URL (#1470)
## 1.16.0
* enhancement:local:Avoid error from cognito client credentials in local authorizer (#1447)
* bugfix:package:Traverse symlinks to directories when packaging the vendor directory (#583).
* feature:DomainName:Add support for custom domain names to REST/WebSocket APIs (#1194)
* feature:auth:Add support for oauth scopes on routes (#1444).
## 1.15.1
* bugfix:packaging:Fix setup.py dependencies where the wheel package was not being installed (#1435)
## 1.15.0
* feature:blueprints:Mark blueprints as an accepted API (#1250)
* feature:package:Add ability to generate and merge yaml CloudFormation templates (#1425)
* enhancement:terraform:Allow generated terraform template to be used as a terraform module (#1300)
* feature:logs:Add support for tailing logs (#4).
## 1.14.1
* enhancement:pip:Update pip version range to 20.1.
## 1.14.0
* bugfix:packaging:Fix pandas packaging regression (#1398)
* feature:CLI:Add ``dev plan/appgraph`` commands (#1396)
* enhancement:SQS:Validate queue name is used and not queue URL or ARN (#1388)
## 1.13.1
* enhancement:local:Add support for multiValueHeaders in local mode (#1381).
* bugfix:local:Make ``current_request`` thread safe in local mode (#759)
* enhancement:local:Add support for cognito in local mode (#1377).
* bugfix:packaging:Fix terraform generation when injecting custom domains (#1237)
* enhancement:packaging:Ensure repeatable zip file generation (#1114).
* bugfix:CORS:Fix CORS request when returning compressed binary types (#1336)
## 1.13.0
* bugfix:logs:Fix error for ``chalice logs`` when a Lambda function
has not been invoked (#1252)
* feature:CORS:Add global CORS configuration (#70)
* bugfix:packaging:Fix packaging simplejson (#1304)
* feature:python:Add support for Python 3.8 (#1315)
* feature:authorizer:Add support for invocation role in custom authorizer (#1303)
* bugfix:packaging:Fix packaging on case-sensitive filesystems (#1356)
## 1.12.0
* feature:CLI:Add ``generate-models`` command (#1245)
* enhancement:websocket:Add ``close`` and ``info`` commands to websocket api (#1259)
* enhancement:dependencies:Bump upper bound on PIP to ``<19.4`` (#1273, #1272)
## 1.11.1
* bugfix:blueprint:Fix mouting blueprints with root routes (#1230)
* feature:rest-api:Add support for multi-value headers responses (#1205)
## 1.11.0
* feature:config:Add support for stage independent lambda configuration (#1162)
* feature:event-source:Add support for subscribing to CloudWatch Events (#1126)
* feature:event-source:Add a ``description`` argument to CloudWatch schedule events (#1155)
* bugfix:rest-api:Fix deployment of API Gateway resource policies (#1220)
## 1.10.0
* feature:websocket:Add experimental support for websockets (#1017)
* feature:rest-api:API Gateway Endpoint Type Configuration (#1160)
* feature:rest-api:API Gateway Resource Policy Configuration (#1160)
* feature:packaging:Add --merge-template option to package command (#1195)
* feature:packaging:Add support for packaging via terraform (#1129)
## 1.9.1
* enhancement:rest-api:Make MultiDict mutable (#1158)
## 1.9.0
* enhancement:dependencies:Update PIP to support up to 19.1.x (#1104)
* bugfix:rest-api:Fix handling of more complex Accept headers for binary
content types (#1078)
* enhancement:rest-api:Raise TypeError when trying to serialize an unserializable
type (#1100)
* enhancement:policy:Update ``policies.json`` file (#1110)
* feature:rest-api:Support repeating values in the query string (#1131)
* feature:packaging:Add layer support to chalice package (#1130)
* bugfix:rest-api:Fix bug with route ``name`` kwarg raising a ``TypeError`` (#1112)
* enhancement:logging:Change exceptions to always be logged at the ERROR level (#969)
* bugfix:CLI:Fix bug handling exceptions during ``chalice invoke`` on
Python 3.7 (#1139)
* bugfix:rest-api:Add support for API Gateway compression (#672)
* enhancement:packaging:Add support for both relative and absolute paths for
``--package-dir`` (#940)
## 1.8.0
* bugfix:packaging:Fall back to pure python version of yaml parser
when unable to compile C bindings for PyYAML (#1074)
* feature:packaging:Add support for Lambda layers. (#1001)
## 1.7.0
* bugfix:packaging:Fix packaging multiple local directories as dependencies (#1047)
* feature:event-source:Add support for passing SNS ARNs to ``on_sns_message`` (#1048)
* feature:blueprint:Add support for Blueprints (#1023)
* feature:config:Add support for opting-in to experimental features (#1053)
* feature:event-source:Provide Lambda context in event object (#856)
## 1.6.2
* enhancement:dependencies:Add support for pip 18.2 (#991)
* enhancement:logging:Add more detailed debug logs to the packager. (#934)
* feature:python:Add support for python3.7 (#992)
* feature:rest-api:Support bytes for the application/json binary type (#988)
* enhancement:rest-api:Use more compact JSON representation by default for dicts (#958)
* enhancement:logging:Log internal exceptions as errors (#254)
* feature:rest-api:Generate swagger documentation from docstrings (#574)
## 1.6.1
* bugfix:local:Fix local mode issue with unicode responses and Content-Length (#910)
* enhancement:dev:Fix issue with ``requirements-dev.txt`` not setting up a working
dev environment (#920)
* enhancement:dependencies:Add support for pip 18 (#910)
## 1.6.0
* feature:CLI:Add ``chalice invoke`` command (#900)
## 1.5.0
* feature:policy:Add support for S3 upload_file/download_file in
policy generator (#889)
## 1.4.0
* enhancement:CI-CD:Add support for generating python 3.6 pipelines (#858)
* feature:event-source:Add support for connecting lambda functions to S3 events (#855)
* feature:event-source:Add support for connecting lambda functions to SNS message (#488)
* enhancement:local:Make ``watchdog`` an optional dependency and add a built in
``stat()`` based file poller (#867)
* feature:event-source:Add support for connecting lambda functions to an SQS queue (#884)
## 1.3.0
* feature:config:Add support for Lambdas in a VPC (#413, #837, #673)
* feature:packaging:Add support for packaging local directories (#653)
* enhancement:local:Add support for automatically reloading the local
dev server when files are modified (#316, #846, #706)
* enhancement:logging:Add support for viewing cloudwatch logs of all
lambda functions (#841, #849)
## 1.2.3
* enhancement:dependency:Add support for pip 10 (#808)
* enhancement:policy:Update ``policies.json`` file (#817)
## 1.2.2
* bugfix:packaging:Fix package command not correctly setting environment variables (#795)
## 1.2.1
* enhancement:rest-api:Add CORS headers to error response (#715)
* bugfix:local:Fix parsing empty query strings in local mode (#767)
* bugfix:packaging:Fix regression in ``chalice package`` when using role arns (#793)
## 1.2.0
This release features a rewrite of the core deployment
code used in Chalice. This is a backwards compatible change
for users, but you may see changes to the autogenerated
files Chalice creates.
Please read the `upgrade notes for 1.2.0
<http://chalice.readthedocs.io/en/latest/upgrading.html#v1-2-0>`__
for more detailed information about upgrading to this release.
* enhancement:rest-api:Print out full stack trace when an error occurs (#711)
* enhancement:rest-api:Add ``image/jpeg`` as a default binary content type (#707)
* feature:event-source:Add support for AWS Lambda only projects (#162, #640)
* bugfix:policy:Fix inconsistent IAM role generation with pure lambdas (#685)
* enhancement:deployment:Rewrite Chalice deployer to more easily support additional AWS resources (#604)
* feature:packaging:Update the ``chalice package`` command to support
pure lambda functions and scheduled events. (#772)
* bugfix:packaging:Fix packager edge case normalizing sdist names (#778)
* bugfix:packaging:Fix SQLAlchemy packaging (#778)
* bugfix:packaging:Fix packaging abi3, wheels this fixes cryptography 2.2.x packaging (#764)
## 1.1.1
* feature:CLI:Add ``--connection-timeout`` to the ``deploy`` command (#344)
* bugfix:policy:Fix IAM role creation issue (#565)
* bugfix:local:Fix `chalice local` handling of browser requests (#565)
* enhancement:policy:Support async/await syntax in automatic policy generation (#565)
* enhancement:packaging:Support additional PyPi package formats (.tar.bz2) (#720)
## 1.1.0
* enhancement:rest-api:Default to ``None`` in local mode when no query parameters
are provided (#593)
* enhancement:local:Add support for binding a custom address for local dev server (#596)
* bugfix:rest-api:Fix local mode handling of routes with trailing slashes (#582)
* bugfix:config:Scale ``lambda_timeout`` parameter correctly in local mode (#579)
* feature:CI-CD:Add ``--codebuild-image`` to the ``generate-pipeline`` command (#609)
* feature:CI-CD:Add ``--source`` and ``--buildspec-file`` to the
``generate-pipeline`` command (#609)
## 1.0.4
* bugfix:packaging:Fix issue deploying some packages in Windows with utf-8 characters (#560)
* feature:packaging:Add support for custom authorizers with ``chalice package`` (#580)
## 1.0.3
* bugfix:packaging:Fix issue with some packages with `-` or `.` in their distribution name (#555)
* bugfix:rest-api:Fix issue where chalice local returned a 403 for successful OPTIONS requests (#554)
* bugfix:local:Fix issue with chalice local mode causing http clients to hang on responses
with no body (#525)
* enhancement:local:Add ``--stage`` parameter to ``chalice local`` (#545)
* bugfix:policy:Fix issue with analyzer that followed recursive functions infinitely (#531)
## 1.0.2
* bugfix:rest-api:Fix issue where requestParameters were not being mapped
correctly resulting in invalid generated javascript SDKs (#498)
* bugfix:rest-api:Fix issue where ``api_gateway_stage`` was being
ignored when set in the ``config.json`` file (#495)
* bugfix:rest-api:Fix bug where ``raw_body`` would raise an exception if no HTTP
body was provided (#503)
* bugfix:CLI:Fix bug where exit codes were not properly being propagated during packaging (#500)
* feature:local:Add support for Builtin Authorizers in local mode (#404)
* bugfix:packaging:Fix environment variables being passed to subprocess while packaging (#501)
* enhancement:rest-api:Allow view to require API keys as well as authorization (#473)
## 1.0.1
* bugfix:packaging:Only use alphanumeric characters for event names in SAM template (#450)
* enhancement:config:Print useful error message when config.json is invalid (#458)
* bugfix:rest-api:Fix api gateway stage being set incorrectly in non-default chalice stage
(`#$70 <https://github.com/aws/chalice/issues/470>`__)
## 1.0.0
* enhancement:rest-api:Change default API Gateway stage name to ``api`` (#431)
* enhancement:local:Add support for ``CORSConfig`` in ``chalice local`` (#436)
* enhancement:logging:Propagate ``DEBUG`` log level when setting ``app.debug`` (#386)
* feature:rest-api:Add support for wildcard routes and HTTP methods in ``AuthResponse`` (#403)
* bugfix:policy:Fix bug when analyzing list comprehensions (#412)
* enhancement:local:Update ``chalice local`` to use HTTP 1.1 (#448)
## 1.0.0b2
Please read the `upgrade notes for 1.0.0b2
<http://chalice.readthedocs.io/en/latest/upgrading.html#v1-0-0b2>`__
for more detailed information about upgrading to this release.
Note: to install this beta version of chalice you must specify
``pip install 'chalice>=1.0.0b2,<2.0.0'`` or
use the ``--pre`` flag for pip: ``pip install --pre chalice``.
* enhancement:local:Set env vars from config in ``chalice local`` (#396)
* bugfix:packaging:Fix edge case when building packages with optional c extensions (#421)
* enhancement:policy:Remove legacy ``policy.json`` file support. Policy files must
use the stage name, e.g. ``policy-dev.json`` (#430)
* bugfix:deployment:Fix issue where IAM role policies were updated twice on redeploys (#428)
* enhancement:rest-api:Validate route path is not an empty string (#432)
* enhancement:rest-api:Change route code to invoke view function with kwargs instead of
positional args (#429)
## 1.0.0b1
Please read the `upgrade notes for 1.0.0b1
<http://chalice.readthedocs.io/en/latest/upgrading.html#v1-0-0b1>`__
for more detailed information about upgrading to this release.
Note: to install this beta version of chalice you must specify
``pip install 'chalice>=1.0.0b1,<2.0.0'`` or
use the ``--pre`` flag for pip: ``pip install --pre chalice``.
* bugfix:rest-api:Fix unicode responses being quoted in python 2.7 (#262)
* feature:event-source:Add support for scheduled events (#390)
* feature:event-source:Add support for pure lambda functions (#390)
* feature:packaging:Add support for wheel packaging. (#249)
## 0.10.1
* bugfix:deployment:Fix deployment issue for projects deployed with versions
prior to 0.10.0 (#387)
* bugfix:policy:Fix crash in analyzer when encountering genexprs and listcomps (#263)
## 0.10.0
* bugfix:deployment:Fix issue where provided ``iam_role_arn`` was not respected on
redeployments of chalice applications and in the CloudFormation template
generated by ``chalice package`` (#339)
* bugfix:config:Fix ``autogen_policy`` in config being ignored (#367)
* feature:rest-api:Add support for view functions that share the same view url but
differ by HTTP method (#81)
* enhancement:deployment:Improve deployment error messages for deployment packages that are
too large (#246, #330, #380)
* feature:rest-api:Add support for built-in authorizers (#356)
## 0.9.0
* feature:rest-api:Add support for ``IAM`` authorizer (#334)
* feature:config:Add support for configuring ``lambda_timeout``, ``lambda_memory_size``,
and ``tags`` in your AWS Lambda function (#347)
* bugfix:packaging:Fix vendor directory contents not being importable locally (#350)
* feature:rest-api:Add support for binary payloads (#348)
## 0.8.2
* bugfix:CLI:Fix issue where ``--api-gateway-stage`` was being
ignored (#325)
* feature:CLI:Add ``chalice delete`` command (#40)
## 0.8.1
* enhancement:deployment:Alway overwrite existing API Gateway Rest API on updates (#305)
* enhancement:CORS:Added more granular support for CORS (#311)
* bugfix:local:Fix duplicate content type header in local model (#311)
* bugfix:rest-api:Fix content type validation when charset is provided (#306)
* enhancement:rest-api:Add back custom authorizer support (#322)
## 0.8.0
* feature:python:Add support for python3! (#296)
* bugfix:packaging:Fix swagger generation when using ``api_key_required=True`` (#279)
* bugfix:CI-CD:Fix ``generate-pipeline`` to install requirements file before packaging (#295)
## 0.7.0
* feature:CLI:Add ``chalice package`` command. This will
create a SAM template and Lambda deployment package that
can be subsequently deployed by AWS CloudFormation. (#258)
* feature:CLI:Add a ``--stage-name`` argument for creating chalice stages.
A chalice stage is a completely separate set of AWS resources.
As a result, most configuration values can also be specified
per chalice stage. (#264, #270)
* feature:policy:Add support for ``iam_role_file``, which allows you to
specify the file location of an IAM policy to use for your app (#272)
* feature:config:Add support for setting environment variables in your app (#273)
* feature:CI-CD:Add a ``generate-pipeline`` command (#277)
## 0.6.0
Check out the `upgrade notes for 0.6.0
<http://chalice.readthedocs.io/en/latest/upgrading.html#v0-6-0>`__
for more detailed information about changes in this release.
* feature:local:Add port parameter to local command (#220)
* feature:packaging:Add support for binary vendored packages (#182, #106, #42)
* feature:rest-api:Add support for customizing the returned HTTP response (#240, #218, #110, #30, #226)
* enhancement:packaging:Always inject latest runtime to allow for chalice upgrades (#245)
## 0.5.1
* enhancement:local:Add support for serializing decimals in ``chalice local`` (#187)
* enhancement:local:Add stdout handler for root logger when using ``chalice local`` (#186)
* enhancement:local:Map query string parameters when using ``chalice local`` (#184)
* enhancement:rest-api:Support Content-Type with a charset (#180)
* bugfix:deployment:Fix not all resources being retrieved due to pagination (#188)
* bugfix:deployment:Fix issue where root resource was not being correctly retrieved (#205)
* bugfix:deployment:Handle case where local policy does not exist
(`29 <https://github.com/awslabs/chalice/issues/29>`__)
## 0.5.0
* enhancement:logging:Add default application logger (#149)
* enhancement:local:Return 405 when method is not supported when running
``chalice local`` (#159)
* enhancement:SDK:Add path params as requestParameters so they can be used
in generated SDKs as well as cache keys (#163)
* enhancement:rest-api:Map cognito user pool claims as part of request context (#165)
* feature:CLI:Add ``chalice url`` command to print the deployed URL (#169)
* enhancement:deployment:Bump up retry limit on initial function creation to 30 seconds (#172)
* feature:local:Add support for ``DELETE`` and ``PATCH`` in ``chalice local`` (#167)
* feature:CLI:Add ``chalice generate-sdk`` command (#178)
## 0.4.0
* bugfix:deployment:Fix issue where role name to arn lookup was failing due to lack of pagination (#139)
* enhancement:rest-api:Raise errors when unknown kwargs are provided to ``app.route(...)`` (#144)
* enhancement:config:Raise validation error when configuring CORS and an OPTIONS method (#142)
* feature:rest-api:Add support for multi-file applications (#21)
* feature:local:Add support for ``chalice local``, which runs a local HTTP server for testing (#22)
## 0.3.0
* bugfix:rest-api:Fix bug with case insensitive headers (#129)
* feature:CORS:Add initial support for CORS (#133)
* enhancement:deployment:Only add API gateway permissions if needed (#48)
* bugfix:policy:Fix error when dict comprehension is encountered during policy generation (#131)
* enhancement:CLI:Add ``--version`` and ``--debug`` options to the chalice CLI
## 0.2.0
* enhancement:rest-api:Add support for input content types besides ``application/json`` (#96)
* enhancement:rest-api:Allow ``ChaliceViewErrors`` to propagate, so that API Gateway
can properly map HTTP status codes in non debug mode (#113)
* enhancement:deployment:Add windows compatibility (#31)
## 0.1.0
* enhancement:packaging:Require ``virtualenv`` as a package dependency. (#33)
* enhancement:CLI:Add ``--profile`` option when creating a new project (#28)
* enhancement:rest-api:Add support for more error codes exceptions (#34)
* enhancement:rest-api:Improve error validation when routes containing a
trailing ``/`` char (#65)
* enhancement:rest-api:Validate duplicate route entries (#79)
* enhancement:policy:Ignore lambda expressions in policy analyzer (#74)
* enhancement:rest-api:Print original error traceback in debug mode (#50)
* feature:rest-api:Add support for authenticate routes (#14)
* feature:policy:Add ability to disable IAM role management (#61)
================================================
FILE: CODE_OF_CONDUCT.rst
================================================
===============
Code of Conduct
===============
This project has adopted the
`Amazon Open Source Code of Conduct <https://aws.github.io/code-of-conduct>`__.
For more information see the
`Code of Conduct FAQ <https://aws.github.io/code-of-conduct-faq>`__
or contact opensource-codeofconduct@amazon.com with any additional
questions or comments.
================================================
FILE: CONTRIBUTING.rst
================================================
============
Contributing
============
We work hard to provide a high-quality and useful framework, and we greatly value
feedback and contributions from our community. Whether it's a new feature,
correction, or additional documentation, we welcome your pull requests. Please
submit any `issues <https://github.com/aws/chalice/issues>`__
or `pull requests <https://github.com/aws/chalice/pulls>`__ through GitHub.
This document contains guidelines for contributing code and filing issues.
Contributing Code
=================
This list below are guidelines to use when submitting pull requests.
These are the same set of guidelines that the core contributors use
when submitting changes, and we ask the same of all community
contributions as well:
* Chalice is released under the
`Apache license <http://aws.amazon.com/apache2.0/>`__.
Any code you submit will be released under that license.
* We maintain a high percentage of code coverage in our tests. As
a general rule of thumb, code changes should not lower the overall
code coverage percentage for the project. To help with this,
we use `codecov <https://codecov.io/gh/aws/chalice>`__, which will
comment on changes in code coverage for every pull request.
In practice, this means that every bug fix and feature addition should
include unit tests, and optionally functional and integration tests.
* All PRs must run cleanly through ``make prcheck``. This is described
in more detail in the sections below.
* All new features must include documentation before they can be merged.
Feature Development
===================
Any significant feature development for chalice should have a
corresponding github issue for discussion. This gives several benefits:
* Helps avoid wasted work by discussing the proposed API changes before
significant dev work is started.
* Gives a single place to capture discussion about the rationale for
a feature.
This applies to:
* Any feature that proposes modifying the public API for chalice
* Additions to the chalice config file
* Any new CLI commands
If you'd like to implement a significant feature for chalice,
please file an `issue <https://github.com/aws/chalice/issues>`__
to start the design discussion.
All of the existing proposals are tagged with `proposals
<https://github.com/aws/chalice/issues?q=is%3Aopen+is%3Aissue+label%3Aproposals>`__.
Development Environment Setup
=============================
First, create a virtual environment for chalice::
$ virtualenv venv
$ source venv/bin/activate
Keep in mind that chalice is designed to work with AWS Lambda.
Make sure to create your virtual environment using Python 3.9 to 3.12,
as these are versions currently supported by both AWS Lambda and chalice.
Next, you'll need to install chalice. The easiest way to configure this
is to use::
$ pip install -e ".[event-file-poller]"
Run this command in the root directory of the chalice repo.
Next, you have a few options. There are various requirements files
depending on what you'd like to do.
For example, if you'd like to work on chalice, either fixing bugs or
adding new features, install ``requirements-dev.txt``::
$ pip install -r requirements-dev.txt
Running Tests
-------------
Chalice uses `pytest <https://docs.pytest.org/en/latest/>`__ to run tests.
The tests are categorized into 3 categories:
* ``unit`` - Fast tests that don't make any IO calls (including file system
access). Object dependencies are usually mocked out.
* ``functional`` - These tests will test multiple components together,
typically through an interface that's close to what an end user would
be using. For example, there are CLI functional tests that will invoke the
same functions that would correspond to a ``chalice deploy`` command.
In the functional tests, AWS calls are stubbed, but they'll go through the
`botocore stubber
<http://botocore.readthedocs.io/en/latest/reference/stubber.html>`__.
* ``integration`` - These tests require an AWS account and will actually
create real AWS resources. The integration tests in chalice usually
involve deploying a sample app and making assertions about the deployed
app by making HTTP/AWS requests to external endpoints.
During development, you'll generally run the unit tests, and less
frequently you'll run the functional tests (the functional tests take
an order of magnitude longer than the unit tests). To run the unit tests,
you can run::
$ py.test tests/unit/
To run the functional tests you can run::
$ py.test tests/functional/
There's also a ``Makefile`` in the repo and you can run
``make test`` to run both the unit and functional tests.
Code Analysis
-------------
Chalice uses several python linters to help ensure high
code quality. This also helps to cut down on the noise
for pull request reviews because many issues are caught
locally during development.
To run all the linters, you can run ``make check``.
This will run:
* `flake8 <http://flake8.pycqa.org/en/latest/>`__, a tool
for checking pep8 as well as common lint checks
* `doc8 <https://pypi.python.org/pypi/doc8>`__, a style
checker for sphinx docs
* `pydocstyle <https://github.com/PyCQA/pydocstyle>`__, a
docstring checker
* `pylint <https://www.pylint.org/>`__, a much more
exhaustive linter that can catch additional issues
compared to ``flake8``.
Type Checking
-------------
Chalice leverages the type hints introduced in python 3.5
from `pep 484 <https://www.python.org/dev/peps/pep-0484/>`__
and `pep 526 <https://www.python.org/dev/peps/pep-0526/>`__.
`mypy <http://mypy-lang.org/>`__ is used to check types.
All chalice code must have type hints added or else the
CI build will fail. To check types you can run ``make typecheck``.
Chalice supports python2 as well as python3. Because of
the requirement of supporting python2, function annotations
are not allowed for specifying type hints, you must use
type comments as outlined in pep 484.
Keep in mind that ``mypy`` only runs in python3, so you'll need
to either use python3 when developing features or have mypy
globally installed.
PRCheck
-------
Before submitting a PR, ensure that ``make prcheck`` runs
without any errors. This command will run the linters,
the typecheckers and the unit and functional tests.
``make prcheck`` is also run as part of the travis CI build.
Pull requests must pass ``make prcheck`` before they can be merged.
================================================
FILE: LICENSE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: MANIFEST.in
================================================
include CONTRIBUTING.rst
include CHANGELOG.md
include LICENSE
include NOTICE
include README.rst
recursive-include chalice *.json
recursive-exclude * __pycache__
recursive-exclude * *.py[co]
================================================
FILE: Makefile
================================================
# Eventually I'll add:
# py.test --cov chalice --cov-report term-missing --cov-fail-under 95 tests/
# which will fail if tests are under 95%
TESTS=tests/unit tests/functional tests/integration
check:
###### FLAKE8 #####
# No unused imports, no undefined vars,
flake8 --ignore=E731,W503,W504 --exclude chalice/__init__.py,chalice/compat.py,chalice/vendored/botocore/regions.py --max-complexity 10 chalice/
flake8 --ignore=E731,W503,W504,F401 --max-complexity 10 chalice/compat.py
flake8 tests/unit/ tests/functional/ tests/integration tests/aws
#
# Proper docstring conventions according to pep257
#
#
pydocstyle --add-ignore=D100,D101,D102,D103,D104,D105,D107,D204,D301 --match='(?!(test_|regions)).*\.py' chalice/
pylint:
###### PYLINT ######
pylint --rcfile .pylintrc chalice
# Run our custom linter on test code.
pylint --disable=I,E,W,R,C,F --enable C9999,C9998 tests/
test:
py.test -v $(TESTS)
typecheck:
mypy --ignore-missing-imports --follow-imports=skip -p chalice --disallow-untyped-defs --strict-optional --warn-no-return
coverage:
py.test --cov chalice --cov-report term-missing $(TESTS)
coverage-unit:
py.test --cov chalice --cov-report term-missing tests/unit
htmlcov:
py.test --cov chalice --cov-report html $(TESTS)
rm -rf /tmp/htmlcov && mv htmlcov /tmp/
open /tmp/htmlcov/index.html
doccheck:
##### DOC8 ######
# Correct rst formatting for documentation
#
# TODO: Remove doc8
##
doc8 docs/source --ignore-path docs/source/topics/multifile.rst
#
#
# Verify we have no broken external links
# as well as no undefined internal references.
$(MAKE) -C docs linkcheck
# Verify we can build the docs. The
# treat warnings as errors flag is enabled
# so any sphinx-build warnings will fail the build.
$(MAKE) -C docs html
prcheck: check pylint coverage doccheck typecheck
install-dev-deps:
pip install -r requirements-dev.txt --upgrade --upgrade-strategy eager -e .
================================================
FILE: NOTICE
================================================
chalice
Copyright 2015 James Saryerwinnie. All Rights Reserved.
================================================
FILE: README.rst
================================================
===========
AWS Chalice
===========
.. image:: https://badges.gitter.im/awslabs/chalice.svg
:target: https://gitter.im/awslabs/chalice?utm_source=badge&utm_medium=badge
:alt: Gitter
.. image:: https://readthedocs.org/projects/chalice/badge/?version=latest
:target: http://aws.github.io/chalice/?badge=latest
:alt: Documentation Status
.. image:: https://aws.github.io/chalice/_images/chalice-logo-whitespace.png
:target: https://aws.github.io/chalice/
:alt: Chalice Logo
Chalice is a framework for writing serverless apps in python. It allows
you to quickly create and deploy applications that use AWS Lambda. It provides:
* A command line tool for creating, deploying, and managing your app
* A decorator based API for integrating with Amazon API Gateway, Amazon S3,
Amazon SNS, Amazon SQS, and other AWS services.
* Automatic IAM policy generation
You can create Rest APIs:
.. code-block:: python
from chalice import Chalice
app = Chalice(app_name="helloworld")
@app.route("/")
def index():
return {"hello": "world"}
Tasks that run on a periodic basis:
.. code-block:: python
from chalice import Chalice, Rate
app = Chalice(app_name="helloworld")
# Automatically runs every 5 minutes
@app.schedule(Rate(5, unit=Rate.MINUTES))
def periodic_task(event):
return {"hello": "world"}
You can connect a lambda function to an S3 event:
.. code-block:: python
from chalice import Chalice
app = Chalice(app_name="helloworld")
# Whenever an object is uploaded to 'mybucket'
# this lambda function will be invoked.
@app.on_s3_event(bucket='mybucket')
def handler(event):
print("Object uploaded for bucket: %s, key: %s"
% (event.bucket, event.key))
As well as an SQS queue:
.. code-block:: python
from chalice import Chalice
app = Chalice(app_name="helloworld")
# Invoke this lambda function whenever a message
# is sent to the ``my-queue-name`` SQS queue.
@app.on_sqs_message(queue='my-queue-name')
def handler(event):
for record in event:
print("Message body: %s" % record.body)
And several other AWS resources.
Once you've written your code, you just run ``chalice deploy``
and Chalice takes care of deploying your app.
::
$ chalice deploy
...
https://endpoint/dev
$ curl https://endpoint/api
{"hello": "world"}
Up and running in less than 30 seconds.
Give this project a try and share your feedback with us here on Github.
The documentation is available
`here <http://aws.github.io/chalice/>`__.
Quickstart
==========
.. quick-start-begin
In this tutorial, you'll use the ``chalice`` command line utility
to create and deploy a basic REST API. This quickstart uses Python 3.9,
but AWS Chalice supports all versions of python supported by AWS Lambda,
which includes Python 3.9 through python 3.13.
To install Chalice, we'll first create and activate a virtual environment
in python3.9::
$ python3 --version
Python 3.9.22
$ python3 -m venv venv39
$ . venv39/bin/activate
Next we'll install Chalice using ``pip``::
$ python3 -m pip install chalice
You can verify you have chalice installed by running::
$ chalice --help
Usage: chalice [OPTIONS] COMMAND [ARGS]...
...
Credentials
-----------
Before you can deploy an application, be sure you have
credentials configured. If you have previously configured your
machine to run boto3 (the AWS SDK for Python) or the AWS CLI then
you can skip this section.
If this is your first time configuring credentials for AWS you
can follow these steps to quickly get started::
$ mkdir ~/.aws
$ cat >> ~/.aws/config
[default]
aws_access_key_id=YOUR_ACCESS_KEY_HERE
aws_secret_access_key=YOUR_SECRET_ACCESS_KEY
region=YOUR_REGION (such as us-west-2, us-west-1, etc)
If you want more information on all the supported methods for
configuring credentials, see the
`boto3 docs
<http://boto3.readthedocs.io/en/latest/guide/configuration.html>`__.
Creating Your Project
---------------------
The next thing we'll do is use the ``chalice`` command to create a new
project::
$ chalice new-project helloworld
This will create a ``helloworld`` directory. Cd into this
directory. You'll see several files have been created for you::
$ cd helloworld
$ ls -la
drwxr-xr-x .chalice
-rw-r--r-- app.py
-rw-r--r-- requirements.txt
You can ignore the ``.chalice`` directory for now, the two main files
we'll focus on is ``app.py`` and ``requirements.txt``.
Let's take a look at the ``app.py`` file:
.. code-block:: python
from chalice import Chalice
app = Chalice(app_name='helloworld')
@app.route('/')
def index():
return {'hello': 'world'}
The ``new-project`` command created a sample app that defines a
single view, ``/``, that when called will return the JSON body
``{"hello": "world"}``.
Deploying
---------
Let's deploy this app. Make sure you're in the ``helloworld``
directory and run ``chalice deploy``::
$ chalice deploy
Creating deployment package.
Creating IAM role: helloworld-dev
Creating lambda function: helloworld-dev
Creating Rest API
Resources deployed:
- Lambda ARN: arn:aws:lambda:us-west-2:12345:function:helloworld-dev
- Rest API URL: https://abcd.execute-api.us-west-2.amazonaws.com/api/
You now have an API up and running using API Gateway and Lambda::
$ curl https://qxea58oupc.execute-api.us-west-2.amazonaws.com/api/
{"hello": "world"}
Try making a change to the returned dictionary from the ``index()``
function. You can then redeploy your changes by running ``chalice deploy``.
.. quick-start-end
Next Steps
----------
You've now created your first app using ``chalice``. You can make
modifications to your ``app.py`` file and rerun ``chalice deploy`` to
redeploy your changes.
At this point, there are several next steps you can take.
* `Tutorials <https://aws.github.io/chalice/tutorials/index.html>`__
- Choose from among several guided tutorials that will
give you step-by-step examples of various features of Chalice.
* `Topics <https://aws.github.io/chalice/topics/index.html>`__ - Deep
dive into documentation on specific areas of Chalice.
This contains more detailed documentation than the tutorials.
* `API Reference <https://aws.github.io/chalice/api.html>`__ - Low level
reference documentation on all the classes and methods that are part of the
public API of Chalice.
If you're done experimenting with Chalice and you'd like to cleanup, you can
use the ``chalice delete`` command, and Chalice will delete all the resources
it created when running the ``chalice deploy`` command.
::
$ chalice delete
Deleting Rest API: abcd4kwyl4
Deleting function aws:arn:lambda:region:123456789:helloworld-dev
Deleting IAM Role helloworld-dev
Feedback
========
We'd also love to hear from you. Please create any Github issues for
additional features you'd like to see over at
https://github.com/aws/chalice/issues. You can also chat with us
on gitter: https://gitter.im/awslabs/chalice
================================================
FILE: chalice/__init__.py
================================================
from chalice.app import Chalice, Blueprint
from chalice.app import (
ChaliceViewError, BadRequestError, UnauthorizedError, ForbiddenError,
NotFoundError, ConflictError, TooManyRequestsError, Response, CORSConfig,
CustomAuthorizer, CognitoUserPoolAuthorizer, IAMAuthorizer,
UnprocessableEntityError, WebsocketDisconnectedError,
AuthResponse, AuthRoute, Cron, Rate, __version__ as chalice_version,
ConvertToMiddleware, ChaliceUnhandledError
)
# We're reassigning version here to keep mypy happy.
__version__ = chalice_version
================================================
FILE: chalice/analyzer.py
================================================
"""Source code analyzer for chalice app.
The main point of this module is to analyze your source code
and track which AWS API calls you make.
We can then use this information to create IAM policies
automatically for you.
How it Works
============
This is basically a simplified abstract interpreter.
The type inference is greatly simplified because
we're only interested in boto3 client types.
In a nutshell:
* Create an AST and symbol table from the source code.
* Interpret the AST and track boto3 types. This is governed
by a few simple rules.
* Propagate inferred boto3 types as much as possible. Most of
the basic stuff is handled, for example:
* ``x = y`` if y is a boto3 type, so is x.
* ``a :: (x -> y), where y is a boto3 type, then given ``b = a()``,
b is of type y.
* Map inferred types across function params and return types.
At the end of the analysis, a final walk is performed to collect any
node of type ``Boto3ClientMethodCallType``. This represents an
API call being made. This also lets you be selective about which
API calls you care about. For example, if you want only want to see
which API calls happen in a particular function, only walk that
particular ``FunctionDef`` node.
"""
import ast
import symtable
from typing import Dict, Set, Any, Optional, List, Union, cast # noqa
APICallT = Dict[str, Set[str]]
OptASTSet = Optional[Set[ast.AST]]
ComprehensionNode = Union[ast.DictComp, ast.GeneratorExp, ast.ListComp]
def get_client_calls(source_code):
# type: (str) -> APICallT
"""Return all clients calls made in provided source code.
:returns: A dict of service_name -> set([client calls]).
Example: {"s3": set(["list_objects", "create_bucket"]),
"dynamodb": set(["describe_table"])}
"""
parsed = parse_code(source_code)
t = SymbolTableTypeInfer(parsed)
binder = t.bind_types()
collector = APICallCollector(binder)
api_calls = collector.collect_api_calls(parsed.parsed_ast)
return api_calls
def get_client_calls_for_app(source_code):
# type: (str) -> APICallT
"""Return client calls for a chalice app.
This is similar to ``get_client_calls`` except it will
automatically traverse into chalice views with the assumption
that they will be called.
"""
parsed = parse_code(source_code)
t = AppViewTypeInfer(parsed)
binder = t.bind_types()
collector = APICallCollector(binder)
api_calls = collector.collect_api_calls(parsed.parsed_ast)
return api_calls
def parse_code(source_code, filename='app.py'):
# type: (str, str) -> ParsedCode
parsed = ast.parse(source_code, filename)
table = symtable.symtable(source_code, filename, 'exec')
return ParsedCode(parsed, ChainedSymbolTable(table, table))
class BaseType(object):
def __repr__(self):
# type: () -> str
return "%s()" % self.__class__.__name__
def __eq__(self, other):
# type: (Any) -> bool
return isinstance(other, self.__class__)
# The next 5 classes are used to track the
# components needed to create a boto3 client.
# While we really only care about boto3 clients we need
# to track all the types it takes to get there:
#
# import boto3 <--- bind "boto3" as the boto3 module type
# c = boto.client <--- bind "c" as the boto3 create client type
# s3 = c('s3') <--- bind 's3' as the boto3 client type, subtype 's3'.
# m = s3.list_objects <--- bind as API call 's3', 'list_objects'
# r = m() <--- bind as API call invoked (what we care about).
#
# That way we can handle (in addition to the case above) things like:
# import boto3; boto3.client('s3').list_objects()
# import boto3; s3 = boto3.client('s3'); s3.list_objects()
class Boto3ModuleType(BaseType):
pass
class Boto3CreateClientType(BaseType):
pass
class Boto3ClientType(BaseType):
def __init__(self, service_name):
# type: (str) -> None
#: The name of the AWS service, e.g. 's3'.
self.service_name = service_name
def __eq__(self, other):
# type: (Any) -> bool
# NOTE: We can't use self.__class__ because of a mypy bug:
# https://github.com/python/mypy/issues/3061
# We can change this back once that bug is fixed.
if not isinstance(other, Boto3ClientType):
return False
return self.service_name == other.service_name
def __repr__(self):
# type: () -> str
return "%s(%s)" % (self.__class__.__name__, self.service_name)
class Boto3ClientMethodType(BaseType):
def __init__(self, service_name, method_name):
# type: (str, str) -> None
self.service_name = service_name
self.method_name = method_name
def __eq__(self, other):
# type: (Any) -> bool
if self.__class__ != other.__class__:
return False
return (
self.service_name == other.service_name and
self.method_name == other.method_name)
def __repr__(self):
# type: () -> str
return "%s(%s, %s)" % (
self.__class__.__name__,
self.service_name,
self.method_name
)
class Boto3ClientMethodCallType(Boto3ClientMethodType):
pass
class TypedSymbol(symtable.Symbol):
inferred_type = None # type: Any
ast_node = None # type: ast.AST
class FunctionType(BaseType):
def __init__(self, return_type):
# type: (Any) -> None
self.return_type = return_type
def __eq__(self, other):
# type: (Any) -> bool
if self.__class__ != other.__class__:
return False
return self.return_type == other.return_type
def __repr__(self):
# type: () -> str
return "%s(%s)" % (
self.__class__.__name__,
self.return_type,
)
class StringLiteral(object):
def __init__(self, value):
# type: (str) -> None
self.value = value
class ParsedCode(object):
def __init__(self, parsed_ast, symbol_table):
# type: (ast.AST, ChainedSymbolTable) -> None
self.parsed_ast = parsed_ast
self.symbol_table = symbol_table
class APICallCollector(ast.NodeVisitor):
"""Traverse a given AST and look for any inferred API call types.
This visitor assumes you've ran type inference on the AST.
It will search through the AST and collect any API calls.
"""
def __init__(self, binder):
# type: (TypeBinder) -> None
self.api_calls = {} # type: APICallT
self._binder = binder
def collect_api_calls(self, node):
# type: (ast.AST) -> APICallT
self.visit(node)
return self.api_calls
def visit(self, node):
# type: (ast.AST) -> None
inferred_type = self._binder.get_type_for_node(node)
if isinstance(inferred_type, Boto3ClientMethodCallType):
self.api_calls.setdefault(inferred_type.service_name, set()).add(
inferred_type.method_name)
ast.NodeVisitor.visit(self, node)
class ChainedSymbolTable(object):
def __init__(self, local_table, global_table):
# type: (symtable.SymbolTable, symtable.SymbolTable) -> None
# If you're in the module scope, then pass in
# the same symbol table for local and global.
self._local_table = local_table
self._global_table = global_table
def new_sub_table(self, local_table):
# type: (symtable.SymbolTable) -> ChainedSymbolTable
# Create a new symbol table using this instances
# local table as the new global table and the passed
# in local table as the new local table.
return self.__class__(local_table, self._local_table)
def get_inferred_type(self, name):
# type: (str) -> Any
# Given a symbol name, check whether a type
# has been inferred.
# The stdlib symtable will already fall back to
# global scope if necessary.
symbol = self._local_table.lookup(name)
if symbol.is_global():
try:
global_symbol = self._global_table.lookup(name)
except KeyError:
# It's not an error if a symbol.is_global()
# but is not in our "_global_table", because
# we're not considering the builtin scope.
# In this case we just say that there is no
# type we've inferred.
return None
return getattr(global_symbol, 'inferred_type', None)
return getattr(symbol, 'inferred_type', None)
def set_inferred_type(self, name, inferred_type):
# type: (str, Any) -> None
symbol = cast(TypedSymbol, self._local_table.lookup(name))
symbol.inferred_type = inferred_type
def lookup_sub_namespace(self, name, lineno=None):
# type: (str, Optional[int]) -> ChainedSymbolTable
for child in self._local_table.get_children():
if child.get_name() == name:
if lineno is not None:
if child.get_lineno() == lineno:
return self.__class__(child, self._local_table)
else:
return self.__class__(child, self._local_table)
for child in self._global_table.get_children():
if child.get_name() == name:
return self.__class__(child, self._global_table)
raise ValueError("Unknown symbol name: %s" % name)
def get_sub_namespaces(self):
# type: () -> List[symtable.SymbolTable]
return self._local_table.get_children()
def get_name(self):
# type: () -> str
return self._local_table.get_name()
def get_symbols(self):
# type: () -> List[symtable.Symbol]
return self._local_table.get_symbols()
def register_ast_node_for_symbol(self, name, node):
# type: (str, ast.AST) -> None
symbol = cast(TypedSymbol, self._local_table.lookup(name))
symbol.ast_node = node
def lookup_ast_node_for_symbol(self, name):
# type: (str) -> ast.AST
symbol = self._local_table.lookup(name)
if symbol.is_global():
symbol = self._global_table.lookup(name)
try:
return cast(TypedSymbol, symbol).ast_node
except AttributeError:
raise ValueError(
"No AST node registered for symbol: %s" % name)
def has_ast_node_for_symbol(self, name):
# type: (str) -> bool
try:
self.lookup_ast_node_for_symbol(name)
return True
except (ValueError, KeyError):
return False
class TypeBinder(object):
def __init__(self):
# type: () -> None
self._node_to_type = {} # type: Dict[ast.AST, Any]
def get_type_for_node(self, node):
# type: (Any) -> Any
return self._node_to_type.get(node)
def set_type_for_node(self, node, inferred_type):
# type: (Any, Any) -> None
self._node_to_type[node] = inferred_type
class SymbolTableTypeInfer(ast.NodeVisitor):
_SDK_PACKAGE = 'boto3'
_CREATE_CLIENT = 'client'
def __init__(self, parsed_code, binder=None, visited=None):
# type: (ParsedCode, Optional[TypeBinder], OptASTSet) -> None
self._symbol_table = parsed_code.symbol_table
self._current_ast_namespace = parsed_code.parsed_ast
self._node_inference = {} # type: Dict[ast.AST, Any]
if binder is None:
binder = TypeBinder()
if visited is None:
visited = set()
self._binder = binder
self._visited = visited
def bind_types(self):
# type: () -> TypeBinder
self.visit(self._current_ast_namespace)
return self._binder
def known_types(self, scope_name=None):
# type: (Optional[str]) -> Dict[str, Any]
table = None
if scope_name is None:
table = self._symbol_table
else:
table = self._symbol_table.lookup_sub_namespace(scope_name)
return {
s.get_name(): cast(TypedSymbol, s).inferred_type
for s in table.get_symbols()
if hasattr(s, 'inferred_type') and
cast(TypedSymbol, s).inferred_type is not None and
s.is_local()
}
def _set_inferred_type_for_name(self, name, inferred_type):
# type: (str, Any) -> None
self._symbol_table.set_inferred_type(name, inferred_type)
def _set_inferred_type_for_node(self, node, inferred_type):
# type: (Any, Any) -> None
self._binder.set_type_for_node(node, inferred_type)
def _get_inferred_type_for_node(self, node):
# type: (Any) -> Any
return self._binder.get_type_for_node(node)
def _new_inference_scope(self, parsed_code, binder, visited):
# type: (ParsedCode, TypeBinder, Set[ast.AST]) -> SymbolTableTypeInfer
instance = self.__class__(parsed_code, binder, visited)
return instance
def visit_Import(self, node):
# type: (ast.Import) -> None
for child in node.names:
if isinstance(child, ast.alias):
import_name = child.name
if import_name == self._SDK_PACKAGE:
self._set_inferred_type_for_name(
import_name, Boto3ModuleType())
self.generic_visit(node)
def visit_Name(self, node):
# type: (ast.Name) -> None
self._set_inferred_type_for_node(
node,
self._symbol_table.get_inferred_type(node.id)
)
self.generic_visit(node)
def visit_Assign(self, node):
# type: (ast.Assign) -> None
# The LHS gets the inferred type of the RHS.
# We do this post-traversal to let the type inference
# run on the children first.
self.generic_visit(node)
rhs_inferred_type = self._get_inferred_type_for_node(node.value)
if rhs_inferred_type is None:
# Special casing assignment to a string literal.
if isinstance(node.value, ast.Str):
rhs_inferred_type = StringLiteral(node.value.s)
self._set_inferred_type_for_node(node.value, rhs_inferred_type)
for t in node.targets:
if isinstance(t, ast.Name):
self._symbol_table.set_inferred_type(t.id, rhs_inferred_type)
self._set_inferred_type_for_node(node, rhs_inferred_type)
def visit_Attribute(self, node):
# type: (ast.Attribute) -> None
self.generic_visit(node)
lhs_inferred_type = self._get_inferred_type_for_node(node.value)
if lhs_inferred_type is None:
return
elif lhs_inferred_type == Boto3ModuleType():
# Check for attributes such as boto3.client.
if node.attr == self._CREATE_CLIENT:
# This is a "boto3.client" attribute.
self._set_inferred_type_for_node(node, Boto3CreateClientType())
elif isinstance(lhs_inferred_type, Boto3ClientType):
self._set_inferred_type_for_node(
node,
Boto3ClientMethodType(
lhs_inferred_type.service_name,
node.attr
)
)
def visit_Call(self, node):
# type: (ast.Call) -> None
self.generic_visit(node)
# func -> Node that's being called
# args -> Arguments being passed.
inferred_func_type = self._get_inferred_type_for_node(node.func)
if inferred_func_type == Boto3CreateClientType():
# e_0 : B3CCT -> B3CT[S]
# e_1 : S str which is a service name
# e_0(e_1) : B3CT[e_1]
if len(node.args) >= 1:
service_arg = node.args[0]
if isinstance(service_arg, ast.Str):
self._set_inferred_type_for_node(
node, Boto3ClientType(service_arg.s))
elif isinstance(self._get_inferred_type_for_node(service_arg),
StringLiteral):
sub_type = self._get_inferred_type_for_node(service_arg)
inferred_type = Boto3ClientType(sub_type.value)
self._set_inferred_type_for_node(node, inferred_type)
elif isinstance(inferred_func_type, Boto3ClientMethodType):
self._set_inferred_type_for_node(
node,
Boto3ClientMethodCallType(
inferred_func_type.service_name,
inferred_func_type.method_name
)
)
elif isinstance(inferred_func_type, FunctionType):
self._set_inferred_type_for_node(
node, inferred_func_type.return_type)
elif isinstance(node.func, ast.Name) and \
self._symbol_table.has_ast_node_for_symbol(node.func.id):
if node not in self._visited:
self._visited.add(node)
self._infer_function_call(node)
def visit_Lambda(self, node):
# type: (ast.Lambda) -> None
# Lambda is going to be a bit tricky because
# there's a new child namespace (via .get_children()),
# but it's not something that will show up in the
# current symbol table via .lookup().
# For now, we're going to ignore lambda expressions.
pass
def _infer_function_call(self, node):
# type: (Any) -> None
# Here we're calling a function we haven't analyzed
# yet. We're first going to analyze the function.
# This will set the inferred_type on the FunctionDef
# node.
# If we get a FunctionType as the inferred type of the
# function, then we know that the inferred type for
# calling the function is the .return_type type.
function_name = node.func.id
sub_table = self._symbol_table.lookup_sub_namespace(
function_name, node.lineno)
ast_node = self._symbol_table.lookup_ast_node_for_symbol(
function_name)
self._map_function_params(sub_table, node, ast_node)
child_infer = self._new_inference_scope(
ParsedCode(ast_node, sub_table), self._binder, self._visited)
child_infer.bind_types()
inferred_func_type = self._get_inferred_type_for_node(ast_node)
self._symbol_table.set_inferred_type(function_name, inferred_func_type)
# And finally the result of this Call() node will be
# the return type from the function we just analyzed.
if isinstance(inferred_func_type, FunctionType):
self._set_inferred_type_for_node(
node, inferred_func_type.return_type)
def _map_function_params(self, sub_table, node, def_node):
# type: (ChainedSymbolTable, Any, Any) -> None
# TODO: Handle the full calling syntax, kwargs, stargs, etc.
# Right now we just handle positional args.
defined_args = def_node.args
for arg, defined in zip(node.args, defined_args.args):
inferred_type = self._get_inferred_type_for_node(arg)
if inferred_type is not None:
name = self._get_name(defined)
sub_table.set_inferred_type(name, inferred_type)
def _get_name(self, node):
# type: (Any) -> str
try:
return getattr(node, 'id')
except AttributeError:
return getattr(node, 'arg')
def visit_FunctionDef(self, node):
# type: (ast.FunctionDef) -> None
if node.name == self._symbol_table.get_name():
# Not using generic_visit() because we don't want to
# visit the decorator_list attr.
for child in node.body:
self.visit(child)
else:
self._symbol_table.register_ast_node_for_symbol(node.name, node)
def visit_AsyncFunctionDef(self, node):
# type: (ast.AsyncFunctionDef) -> None
# this type is actually wrong but we can't use the actual type as it's
# not available in python 2
converted = cast(ast.FunctionDef, node)
self.visit_FunctionDef(converted)
def visit_ClassDef(self, node):
# type: (ast.ClassDef) -> None
# Not implemented yet. We want to ensure we don't
# traverse into the class body for now.
return
def visit_DictComp(self, node):
# type: (ast.DictComp) -> None
self._handle_comprehension(node, 'dictcomp')
def visit_Return(self, node):
# type: (Any) -> None
self.generic_visit(node)
inferred_type = self._get_inferred_type_for_node(node.value)
if inferred_type is not None:
self._set_inferred_type_for_node(node, inferred_type)
# We're making a pretty big assumption there's one return
# type per function. Will likely need to come back to this.
inferred_func_type = FunctionType(inferred_type)
self._set_inferred_type_for_node(self._current_ast_namespace,
inferred_func_type)
def visit_ListComp(self, node):
# type: (ast.ListComp) -> None
# 'listcomp' is the string literal used by python
# to creating the SymbolTable for the corresponding
# list comp function.
self._handle_comprehension(node, 'listcomp')
def visit_GeneratorExp(self, node):
# type: (ast.GeneratorExp) -> None
# Generator expressions are an interesting case.
# They create a new sub scope, but they're not
# explicitly named. Python just creates a table
# with the name "genexpr".
self._handle_comprehension(node, 'genexpr')
def _visit_first_comprehension_generator(self, node):
# type: (ComprehensionNode) -> None
if node.generators:
# first generator's iterator is visited in the current scope
first_generator = node.generators[0]
self.visit(first_generator.iter)
def _collect_comprehension_children(self, node):
# type: (ComprehensionNode) -> List[ast.expr]
if isinstance(node, ast.DictComp):
# dict comprehensions have two values to be checked
child_nodes = [node.key, node.value]
else:
child_nodes = [node.elt]
if node.generators:
first_generator = node.generators[0]
child_nodes.append(first_generator.target)
for if_expr in first_generator.ifs:
child_nodes.append(if_expr)
for generator in node.generators[1:]:
# rest need to be visited in the child scope
child_nodes.append(generator.iter)
child_nodes.append(generator.target)
for if_expr in generator.ifs:
child_nodes.append(if_expr)
return child_nodes
def _visit_comprehension_children(self, node, comprehension_type):
# type: (ComprehensionNode, str) -> None
child_nodes = self._collect_comprehension_children(node)
child_scope = self._get_matching_sub_namespace(comprehension_type,
node.lineno)
if child_scope is None:
# In Python 2 there's no child scope for list comp
# Or we failed to locate the child scope, this happens in Python 2
# when there are multiple comprehensions of the same type in the
# same scope. The line number trick doesn't work as Python 2 always
# passes line number 0, make a best effort
for child_node in child_nodes:
try:
self.visit(child_node)
except KeyError:
pass
return
for child_node in child_nodes:
# visit sub expressions in the child scope
child_table = self._symbol_table.new_sub_table(child_scope)
child_infer = self._new_inference_scope(
ParsedCode(child_node, child_table),
self._binder, self._visited)
child_infer.bind_types()
def _handle_comprehension(self, node, comprehension_type):
# type: (ComprehensionNode, str) -> None
self._visit_first_comprehension_generator(node)
self._visit_comprehension_children(node, comprehension_type)
def _get_matching_sub_namespace(self, name, lineno):
# type: (str, int) -> Optional[symtable.SymbolTable]
namespaces = [t for t in self._symbol_table.get_sub_namespaces()
if t.get_name() == name]
if len(namespaces) == 1:
# if there's only one match for the name, return it
return namespaces[0]
for namespace in namespaces:
# otherwise disambiguate by using the line number
if namespace.get_lineno() == lineno:
return namespace
return None
def visit(self, node):
# type: (Any) -> None
return ast.NodeVisitor.visit(self, node)
class AppViewTypeInfer(ast.NodeVisitor):
_CHALICE_DECORATORS = [
'route', 'authorizer', 'lambda_function',
'schedule', 'on_s3_event', 'on_sns_message',
'on_sqs_message', 'on_ws_connect', 'on_ws_message',
'on_ws_disconnect',
]
def __init__(self, parsed_code):
# type: (ParsedCode) -> None
self._binder = TypeBinder()
self._visited = set() # type: Set[ast.AST]
self._parsed_code = parsed_code
self._type_infer = SymbolTableTypeInfer(
self._parsed_code, self._binder, self._visited)
def bind_types(self):
# type: () -> TypeBinder
self._type_infer.bind_types()
self.visit(self._parsed_code.parsed_ast)
return self._binder
def visit_FunctionDef(self, node):
# type: (ast.FunctionDef) -> None
if self._is_chalice_view(node):
sub_table = self._parsed_code.symbol_table.lookup_sub_namespace(
node.name, node.lineno)
child_infer = SymbolTableTypeInfer(
ParsedCode(node, sub_table), self._binder, self._visited)
child_infer.bind_types()
def _is_chalice_view(self, node):
# type: (ast.FunctionDef) -> bool
# We can certainly improve on this, but this check is more
# of a heuristic for the time being. The ideal way to do this
# is to infer the Chalice type and ensure the function is
# decorated with the Chalice type's route() method.
decorator_list = node.decorator_list
if not decorator_list:
return False
for decorator in decorator_list:
if isinstance(decorator, ast.Call) and \
isinstance(decorator.func, ast.Attribute):
if decorator.func.attr in self._CHALICE_DECORATORS:
return True
return False
================================================
FILE: chalice/api/__init__.py
================================================
"""Control plane APIs for programatically building/deploying Chalice apps.
The eventual goal is to expose this as a public API that other tools can use
in their own integrations with Chalice, but this will need time for the APIs
to mature so for the time being this is an internal-only API.
"""
import os
from typing import Optional, Dict, Any
from chalice.cli.factory import CLIFactory
def package_app(project_dir: str,
output_dir: str,
stage: str,
chalice_config: Optional[Dict[str, Any]] = None,
package_format: str = 'cloudformation',
template_format: str = 'json') -> None:
factory = CLIFactory(project_dir, environ=os.environ)
if chalice_config is None:
chalice_config = {}
config = factory.create_config_obj(
stage, user_provided_params=chalice_config)
options = factory.create_package_options()
packager = factory.create_app_packager(config, options,
package_format=package_format,
template_format=template_format)
packager.package_app(config, output_dir, stage)
================================================
FILE: chalice/app.py
================================================
"""Chalice app and routing code."""
# pylint: disable=too-many-lines,ungrouped-imports
import re
import sys
import os
import logging
import json
import traceback
import decimal
import base64
import copy
import functools
import datetime
from collections import defaultdict
# Implementation note: This file is intended to be a standalone file
# that gets copied into the lambda deployment package. It has no dependencies
# on other parts of chalice, so it can stay small and lightweight, with minimal
# startup overhead.
from urllib.parse import unquote_plus
from collections.abc import Mapping
from collections.abc import MutableMapping
__version__: str = '1.32.0'
from typing import List, Dict, Any, Optional, Sequence, Union, Callable, Set, \
Iterator, TYPE_CHECKING, Tuple
if TYPE_CHECKING:
from chalice.local import LambdaContext
_PARAMS = re.compile(r'{\w+}')
MiddlewareFuncType = Callable[[Any, Callable[[Any], Any]], Any]
UserHandlerFuncType = Callable[..., Any]
HeadersType = Dict[str, Union[str, List[str]]]
# In python 3 string and bytes are different so we explicitly check
# for both.
_ANY_STRING = (str, bytes)
def handle_extra_types(
obj: Union[decimal.Decimal, 'MultiDict']
) -> Union[float, Dict]:
# Lambda will automatically serialize decimals so we need
# to support that as well.
if isinstance(obj, decimal.Decimal):
return float(obj)
# This is added for backwards compatibility.
# It will keep only the last value for every key as it used to.
if isinstance(obj, MultiDict):
return dict(obj)
raise TypeError('Object of type %s is not JSON serializable'
% obj.__class__.__name__)
def error_response(
message: str, error_code: str, http_status_code: int,
headers: Optional[HeadersType] = None
) -> 'Response':
body = {'Code': error_code, 'Message': message}
response = Response(body=body, status_code=http_status_code,
headers=headers)
return response
def _matches_content_type(content_type: str,
valid_content_types: List[str]) -> bool:
# If '*/*' is in the Accept header or the valid types,
# then all content_types match. Otherwise see of there are any common types
content_type = content_type.lower()
valid_content_types = [x.lower() for x in valid_content_types]
return '*/*' in content_type or \
'*/*' in valid_content_types or \
_content_type_header_contains(content_type, valid_content_types)
def _content_type_header_contains(
content_type_header: str,
valid_content_types: List[str]
) -> bool:
content_type_header_parts = [
p.strip() for p in
re.split('[,;]', content_type_header)
]
valid_parts = set(valid_content_types).intersection(
content_type_header_parts
)
return len(valid_parts) > 0
class ChaliceError(Exception):
pass
class WebsocketDisconnectedError(ChaliceError):
def __init__(self, connection_id: str):
self.connection_id: str = connection_id
class ChaliceViewError(ChaliceError):
STATUS_CODE: int = 500
class ChaliceUnhandledError(ChaliceError):
"""This error is not caught from a Chalice view function.
This exception is allowed to propagate from a view function so
that middleware handlers can process the exception.
"""
class BadRequestError(ChaliceViewError):
STATUS_CODE: int = 400
class UnauthorizedError(ChaliceViewError):
STATUS_CODE: int = 401
class ForbiddenError(ChaliceViewError):
STATUS_CODE: int = 403
class NotFoundError(ChaliceViewError):
STATUS_CODE: int = 404
class MethodNotAllowedError(ChaliceViewError):
STATUS_CODE: int = 405
class RequestTimeoutError(ChaliceViewError):
STATUS_CODE: int = 408
class ConflictError(ChaliceViewError):
STATUS_CODE: int = 409
class UnprocessableEntityError(ChaliceViewError):
STATUS_CODE: int = 422
class TooManyRequestsError(ChaliceViewError):
STATUS_CODE: int = 429
ALL_ERRORS = [
ChaliceViewError,
BadRequestError,
NotFoundError,
UnauthorizedError,
ForbiddenError,
MethodNotAllowedError,
RequestTimeoutError,
ConflictError,
UnprocessableEntityError,
TooManyRequestsError,
]
class MultiDict(MutableMapping): # pylint: disable=too-many-ancestors
"""A mapping of key to list of values.
Accessing it in the usual way will return the last value in the list.
Calling getlist will return a list of all the values associated with
the same key.
"""
def __init__(self, mapping: Optional[Dict]):
if mapping is None:
mapping = {}
self._dict = mapping
def __getitem__(self, k: Any) -> Any:
try:
return self._dict[k][-1]
except IndexError:
raise KeyError(k)
def __setitem__(self, k: Any, v: Any) -> None:
self._dict[k] = [v]
def __delitem__(self, k: Any) -> None:
del self._dict[k]
def getlist(self, k: Any) -> List:
return list(self._dict[k])
def __len__(self) -> int:
return len(self._dict)
def __iter__(self) -> Iterator:
return iter(self._dict)
def __repr__(self) -> str:
return 'MultiDict(%s)' % self._dict
def __str__(self) -> str:
return repr(self)
class CaseInsensitiveMapping(Mapping):
"""Case insensitive and read-only mapping."""
def __init__(self, mapping: Union[Dict[str, Any], MultiDict]) -> None:
mapping = mapping or {}
self._dict = {k.lower(): v for k, v in mapping.items()}
def __getitem__(self, key: str) -> Any:
return self._dict[key.lower()]
def __iter__(self) -> Iterator:
return iter(self._dict)
def __len__(self) -> int:
return len(self._dict)
def __repr__(self) -> str:
return 'CaseInsensitiveMapping(%s)' % repr(self._dict)
class Authorizer(object):
name: str = ''
scopes: List[str] = []
def to_swagger(self) -> Dict[str, Any]:
raise NotImplementedError("to_swagger")
def with_scopes(self, scopes: List[str]) -> 'Authorizer':
raise NotImplementedError("with_scopes")
class IAMAuthorizer(Authorizer):
_AUTH_TYPE: str = 'aws_iam'
def __init__(self) -> None:
self.name: str = 'sigv4'
self.scopes: List[str] = []
def to_swagger(self) -> Dict[str, str]:
return {
'in': 'header',
'type': 'apiKey',
'name': 'Authorization',
'x-amazon-apigateway-authtype': 'awsSigv4',
}
def with_scopes(self, scopes: List[str]) -> 'Authorizer':
raise NotImplementedError("with_scopes")
class CognitoUserPoolAuthorizer(Authorizer):
_AUTH_TYPE: str = 'cognito_user_pools'
def __init__(self, name: str, provider_arns: List[str],
header: Optional[str] = 'Authorization',
scopes: Optional[List] = None) -> None:
self.name = name
self._header = header
if not isinstance(provider_arns, list):
# This class is used directly by users so we're
# adding some validation to help them troubleshoot
# potential issues.
raise TypeError(
"provider_arns should be a list of ARNs, received: %s"
% provider_arns)
self._provider_arns = provider_arns
self.scopes = scopes or []
def to_swagger(self) -> Dict[str, Any]:
return {
'in': 'header',
'type': 'apiKey',
'name': self._header,
'x-amazon-apigateway-authtype': self._AUTH_TYPE,
'x-amazon-apigateway-authorizer': {
'type': self._AUTH_TYPE,
'providerARNs': self._provider_arns,
}
}
def with_scopes(self, scopes: List[str]) -> 'Authorizer':
authorizer_with_scopes = copy.deepcopy(self)
authorizer_with_scopes.scopes = scopes
return authorizer_with_scopes
class CustomAuthorizer(Authorizer):
_AUTH_TYPE = 'custom'
def __init__(self, name: str, authorizer_uri: str, ttl_seconds: int = 300,
header: str = 'Authorization',
invoke_role_arn: Optional[str] = None,
scopes: Optional[List[str]] = None) -> None:
self.name = name
self._header = header
self._authorizer_uri = authorizer_uri
self._ttl_seconds = ttl_seconds
self._invoke_role_arn = invoke_role_arn
self.scopes = scopes or []
def to_swagger(self) -> Dict[str, Any]:
swagger: Dict[str, Any] = {
'in': 'header',
'type': 'apiKey',
'name': self._header,
'x-amazon-apigateway-authtype': self._AUTH_TYPE,
'x-amazon-apigateway-authorizer': {
'type': 'token',
'authorizerUri': self._authorizer_uri,
'authorizerResultTtlInSeconds': self._ttl_seconds,
}
}
if self._invoke_role_arn is not None:
swagger['x-amazon-apigateway-authorizer'][
'authorizerCredentials'] = self._invoke_role_arn
return swagger
def with_scopes(self, scopes: List[str]) -> 'Authorizer':
authorizer_with_scopes = copy.deepcopy(self)
authorizer_with_scopes.scopes = scopes
return authorizer_with_scopes
class CORSConfig(object):
"""A cors configuration to attach to a route."""
_REQUIRED_HEADERS: List[str] = ['Content-Type', 'X-Amz-Date',
'Authorization', 'X-Api-Key',
'X-Amz-Security-Token']
def __init__(self, allow_origin: str = '*',
allow_headers: Optional[Sequence[str]] = None,
expose_headers: Optional[Sequence[str]] = None,
max_age: Optional[int] = None,
allow_credentials: Optional[bool] = None):
self.allow_origin = allow_origin
if allow_headers is None:
self._allow_headers = set(self._REQUIRED_HEADERS)
else:
self._allow_headers = set(
list(allow_headers) + self._REQUIRED_HEADERS
)
if expose_headers is None:
expose_headers = []
self._expose_headers = expose_headers
self._max_age = max_age
self._allow_credentials = allow_credentials
@property
def allow_headers(self) -> str:
return ','.join(sorted(self._allow_headers))
def get_access_control_headers(self) -> Dict[str, str]:
headers = {
'Access-Control-Allow-Origin': self.allow_origin,
'Access-Control-Allow-Headers': self.allow_headers
}
if self._expose_headers:
headers.update({
'Access-Control-Expose-Headers': ','.join(self._expose_headers)
})
if self._max_age is not None:
headers.update({
'Access-Control-Max-Age': str(self._max_age)
})
if self._allow_credentials is True:
headers.update({
'Access-Control-Allow-Credentials': 'true'
})
return headers
def __eq__(self, other: object) -> bool:
if isinstance(other, self.__class__):
return self.get_access_control_headers() == \
other.get_access_control_headers()
return False
class Request(object):
"""The current request from API gateway."""
_NON_SERIALIZED_ATTRS: List[str] = ['lambda_context']
body: Any
base64_body: str
def __init__(self, event_dict: Dict[str, Any],
lambda_context: Optional[Any] = None) -> None:
query_params = event_dict['multiValueQueryStringParameters']
self.query_params: Optional[MultiDict] = None \
if query_params is None else MultiDict(query_params)
self.headers: CaseInsensitiveMapping = \
CaseInsensitiveMapping(event_dict['headers'])
self.uri_params: Optional[Dict[str, str]] \
= event_dict['pathParameters']
self.method: str = event_dict['requestContext']['httpMethod']
self._is_base64_encoded = event_dict.get('isBase64Encoded', False)
self._body: Any = event_dict['body']
#: The parsed JSON from the body. This value should
#: only be set if the Content-Type header is application/json,
#: which is the default content type value in chalice.
self._json_body: Optional[Any] = None
self._raw_body = b''
self.context: Dict[str, Any] = event_dict['requestContext']
self.stage_vars: Optional[Dict[str, str]] \
= event_dict['stageVariables']
self.path: str = event_dict['requestContext']['resourcePath']
self.lambda_context = lambda_context
self._event_dict = event_dict
def _base64decode(self, encoded: Union[bytes, str]) -> bytes:
if not isinstance(encoded, bytes):
encoded = encoded.encode('ascii')
output = base64.b64decode(encoded)
return output
@property
def raw_body(self) -> Union[str, bytes]:
if not self._raw_body and self._body is not None:
if self._is_base64_encoded:
self._raw_body = self._base64decode(self._body)
elif not isinstance(self._body, bytes):
self._raw_body = self._body.encode('utf-8')
else:
self._raw_body = self._body
return self._raw_body
@property
def json_body(self) -> Any:
if self.headers.get('content-type', '').startswith('application/json'):
if self._json_body is None:
try:
self._json_body = json.loads(self.raw_body)
except ValueError:
raise BadRequestError('Error Parsing JSON')
return self._json_body
def to_dict(self) -> Dict[Any, Any]:
# Don't copy internal attributes.
copied = {
k: v for k, v in self.__dict__.items()
if not k.startswith('_') and
k not in self._NON_SERIALIZED_ATTRS
}
# We want the output of `to_dict()` to be
# JSON serializable, so we need to remove the CaseInsensitive dict.
copied['headers'] = dict(copied['headers'])
if copied['query_params'] is not None:
copied['query_params'] = dict(copied['query_params'])
return copied
def to_original_event(self) -> Dict[str, Any]:
# To bring consistency with the BaseLambdaEvents, every
# input event should have access to the original event
# dictionary as an escape hatch to the underlying data
# in case something gets added and we haven't mapped it yet.
# We unfortunately already have a `to_dict()` method which is
# what other events use so we have to use a different method name.
return self._event_dict
class Response(object):
def __init__(
self, body: Any,
headers: Optional[HeadersType] = None,
status_code: int = 200
):
self.body: Any = body
if headers is None:
headers = {}
self.headers: HeadersType = headers
self.status_code = status_code
def to_dict(
self,
binary_types: Optional[List[str]] = None
) -> Dict[str, Any]:
body = self.body
if not isinstance(body, _ANY_STRING):
body = json.dumps(body, separators=(',', ':'),
default=handle_extra_types)
single_headers, multi_headers = self._sort_headers(self.headers)
response = {
'headers': single_headers,
'multiValueHeaders': multi_headers,
'statusCode': self.status_code,
'body': body
}
if binary_types is not None:
self._b64encode_body_if_needed(response, binary_types)
return response
def _sort_headers(
self, all_headers: HeadersType
) -> Tuple[Dict[str, Any], Dict[str, List]]:
multi_headers: Dict[str, List] = {}
single_headers: Dict[str, Any] = {}
for name, value in all_headers.items():
if isinstance(value, list):
multi_headers[name] = value
else:
single_headers[name] = value
return single_headers, multi_headers
def _b64encode_body_if_needed(
self,
response_dict: Dict[str, Any],
binary_types: List[str]
) -> None:
response_headers = CaseInsensitiveMapping(response_dict['headers'])
content_type = response_headers.get('content-type', '')
body = response_dict['body']
if _matches_content_type(content_type, binary_types):
if _matches_content_type(content_type, ['application/json']) or \
not content_type:
# There's a special case when a user configures
# ``application/json`` as a binary type. The default
# json serialization results in a string type, but for binary
# content types we need a type bytes(). So we need to special
# case this scenario and encode the JSON body to bytes().
#
# If a user does not provide a content type header, which can
# happen if they return a python type instead of a ``Response``
# type, then we assume the content is application/json.
body = body if isinstance(body, bytes) \
else body.encode('utf-8')
body = self._base64encode(body)
response_dict['isBase64Encoded'] = True
response_dict['body'] = body
def _base64encode(self, data: bytes) -> str:
if not isinstance(data, bytes):
raise ValueError('Expected bytes type for body with binary '
'Content-Type. Got %s type body instead.'
% type(data))
data = base64.b64encode(data)
return data.decode('ascii')
class RouteEntry(object):
def __init__(self, view_function: Callable[..., Any], view_name: str,
path: str, method: str,
api_key_required: Optional[bool] = None,
content_types: Optional[List[str]] = None,
cors: Optional[Union[bool, CORSConfig]] = False,
authorizer: Optional[Authorizer] = None):
self.view_function: Callable[..., Any] = view_function
self.view_name: str = view_name
self.uri_pattern: str = path
self.method: str = method
self.api_key_required: Optional[bool] = api_key_required
#: A list of names to extract from path:
#: e.g, '/foo/{bar}/{baz}/qux -> ['bar', 'baz']
self.view_args: List[str] = self._parse_view_args()
self.content_types: List[str] = content_types or []
# cors is passed as either a boolean or a CORSConfig object. If it is a
# boolean it needs to be replaced with a real CORSConfig object to
# pass the typechecker. None in this context will not inject any cors
# headers, otherwise the CORSConfig object will determine which
# headers are injected.
if cors is True:
cors = CORSConfig()
elif cors is False:
cors = None
self.cors: CORSConfig = cors # type: ignore
self.authorizer: Optional[Authorizer] = authorizer
def _parse_view_args(self) -> List[str]:
if '{' not in self.uri_pattern:
return []
# The [1:-1] slice is to remove the braces
# e.g {foobar} -> foobar
results = [r[1:-1] for r in _PARAMS.findall(self.uri_pattern)]
return results
def __eq__(self, other: object) -> bool:
return self.__dict__ == other.__dict__
class APIGateway(object):
_DEFAULT_BINARY_TYPES = [
'application/octet-stream', 'application/x-tar', 'application/zip',
'audio/basic', 'audio/ogg', 'audio/mp4', 'audio/mpeg', 'audio/wav',
'audio/webm', 'image/png', 'image/jpg', 'image/jpeg', 'image/gif',
'video/ogg', 'video/mpeg', 'video/webm',
]
def __init__(self) -> None:
self.binary_types: List[str] = self.default_binary_types
self.cors: Union[bool, CORSConfig] = False
@property
def default_binary_types(self) -> List[str]:
return list(self._DEFAULT_BINARY_TYPES)
class WebsocketAPI(object):
_WEBSOCKET_ENDPOINT_TEMPLATE = 'https://{domain_name}/{stage}'
_REGION_ENV_VARS = ['AWS_REGION', 'AWS_DEFAULT_REGION']
def __init__(self, env: Optional[MutableMapping] = None) -> None:
self.session: Optional[Any] = None
self._endpoint: Optional[str] = None
self._client = None
if env is None:
self._env: MutableMapping = os.environ
else:
self._env = env
def configure(self, domain_name: str, stage: str) -> None:
if self._endpoint is not None:
return
self._endpoint = self._WEBSOCKET_ENDPOINT_TEMPLATE.format(
domain_name=domain_name,
stage=stage,
)
def configure_from_api_id(self, api_id: str, stage: str) -> None:
if self._endpoint is not None:
return
region_name = self._get_region()
if region_name.startswith("cn-"):
domain_name_template = (
'{api_id}.execute-api.{region}.amazonaws.com.cn'
)
else:
domain_name_template = (
'{api_id}.execute-api.{region}.amazonaws.com'
)
domain_name = domain_name_template.format(
api_id=api_id, region=region_name)
self.configure(domain_name, stage)
def _get_region(self) -> str:
# Attempt to get the region so we can configure the
# apigatewaymanagementapi client. We'll first try
# retrieving this value from env vars because these should
# always be set in the Lambda runtime environment.
for varname in self._REGION_ENV_VARS:
if varname in self._env:
return self._env[varname]
# As a last attempt we'll try to retrieve the region
# from the currently configured region. If the session
# isn't configured or we can't get the region, we have
# no choice but to error out.
if self.session is not None:
region_name = self.session.region_name
if region_name is not None:
return region_name
raise ValueError(
"Unable to retrieve the region name when configuring the "
"websocket client. Either set the 'AWS_REGION' environment "
"variable or assign 'app.websocket_api.session' to a boto3 "
"session."
)
def _get_client(self) -> Any:
if self.session is None:
raise ValueError(
'Assign app.websocket_api.session to a boto3 session before '
'using the WebsocketAPI'
)
if self._endpoint is None:
raise ValueError(
'WebsocketAPI.configure must be called before using the '
'WebsocketAPI'
)
if self._client is None:
self._client = self.session.client(
'apigatewaymanagementapi',
endpoint_url=self._endpoint,
)
return self._client
def send(self, connection_id: str, message: str) -> None:
client = self._get_client()
try:
client.post_to_connection(
ConnectionId=connection_id,
Data=message,
)
except client.exceptions.GoneException:
raise WebsocketDisconnectedError(connection_id)
def close(self, connection_id: str) -> None:
client = self._get_client()
try:
client.delete_connection(
ConnectionId=connection_id,
)
except client.exceptions.GoneException:
raise WebsocketDisconnectedError(connection_id)
def info(self, connection_id: str) -> Any:
client = self._get_client()
try:
return client.get_connection(
ConnectionId=connection_id,
)
except client.exceptions.GoneException:
raise WebsocketDisconnectedError(connection_id)
class DecoratorAPI(object):
websocket_api: Optional[WebsocketAPI] = None
def middleware(
self,
event_type: str = 'all'
) -> Callable[[Callable[..., Any]], Any]:
def _middleware_wrapper(
func: Callable[..., Any]
) -> Callable[..., Any]:
self.register_middleware(func, event_type)
return func
return _middleware_wrapper
def authorizer(self, ttl_seconds: Optional[int] = None,
execution_role: Optional[str] = None,
name: Optional[str] = None,
header: Optional[str] = 'Authorization'
) -> Callable[..., Any]:
return self._create_registration_function(
handler_type='authorizer',
name=name,
registration_kwargs={
'ttl_seconds': ttl_seconds,
'execution_role': execution_role,
'header': header
}
)
def on_s3_event(self, bucket: str, events: Optional[List[str]] = None,
prefix: Optional[str] = None, suffix: Optional[str] = None,
name: Optional[str] = None) -> Callable[..., Any]:
return self._create_registration_function(
handler_type='on_s3_event',
name=name,
registration_kwargs={
'bucket': bucket, 'events': events,
'prefix': prefix, 'suffix': suffix,
}
)
def on_sns_message(self, topic: str,
name: Optional[str] = None) -> Callable[..., Any]:
return self._create_registration_function(
handler_type='on_sns_message',
name=name,
registration_kwargs={'topic': topic}
)
def on_sqs_message(self, queue: Optional[str] = None, batch_size: int = 1,
name: Optional[str] = None,
queue_arn: Optional[str] = None,
maximum_batching_window_in_seconds: int = 0,
maximum_concurrency: Optional[int] = None,
) -> Callable[..., Any]:
return self._create_registration_function(
handler_type='on_sqs_message',
name=name,
registration_kwargs={
'queue': queue,
'queue_arn': queue_arn,
'batch_size': batch_size,
'maximum_batching_window_in_seconds':
maximum_batching_window_in_seconds,
'maximum_concurrency': maximum_concurrency,
}
)
def on_cw_event(self, event_pattern: Dict[str, Any],
name: Optional[str] = None) -> Callable[..., Any]:
return self._create_registration_function(
handler_type='on_cw_event',
name=name,
registration_kwargs={'event_pattern': event_pattern}
)
def schedule(self, expression: Union[str, 'ScheduleExpression'],
name: Optional[str] = None,
description: str = '') -> Callable[..., Any]:
return self._create_registration_function(
handler_type='schedule',
name=name,
registration_kwargs={'expression': expression,
'description': description},
)
def on_kinesis_record(self, stream: str, batch_size: int = 100,
starting_position: str = 'LATEST',
name: Optional[str] = None,
maximum_batching_window_in_seconds: int = 0
) -> Callable[..., Any]:
return self._create_registration_function(
handler_type='on_kinesis_record',
name=name,
registration_kwargs={
'stream': stream,
'batch_size': batch_size,
'starting_position': starting_position,
'maximum_batching_window_in_seconds':
maximum_batching_window_in_seconds},
)
def on_dynamodb_record(
self, stream_arn: str,
batch_size: int = 100,
starting_position: str = 'LATEST',
name: Optional[str] = None,
maximum_batching_window_in_seconds: int = 0
) -> Callable[..., Any]:
return self._create_registration_function(
handler_type='on_dynamodb_record',
name=name,
registration_kwargs={
'stream_arn': stream_arn,
'batch_size': batch_size,
'starting_position': starting_position,
'maximum_batching_window_in_seconds':
maximum_batching_window_in_seconds},
)
def route(self, path: str, **kwargs: Any) -> Callable[..., Any]:
return self._create_registration_function(
handler_type='route',
name=kwargs.pop('name', None),
# This looks a little weird taking kwargs as a key,
# but we want to preserve keep the **kwargs signature
# in the route decorator.
registration_kwargs={'path': path, 'kwargs': kwargs},
)
def lambda_function(self,
name: Optional[str] = None) -> Callable[..., Any]:
return self._create_registration_function(
handler_type='lambda_function', name=name)
def on_ws_connect(self,
name: Optional[str] = None) -> Callable[..., Any]:
return self._create_registration_function(
handler_type='on_ws_connect',
name=name,
registration_kwargs={'route_key': '$connect'},
)
def on_ws_disconnect(self,
name: Optional[str] = None) -> Callable[..., Any]:
return self._create_registration_function(
handler_type='on_ws_disconnect',
name=name,
registration_kwargs={'route_key': '$disconnect'},
)
def on_ws_message(self, name: Optional[str] = None) -> Callable[..., Any]:
return self._create_registration_function(
handler_type='on_ws_message',
name=name,
registration_kwargs={'route_key': '$default'},
)
def _create_registration_function(self, handler_type: str,
name: Optional[str] = None,
registration_kwargs: Optional[Any] = None
) -> Callable[..., Any]:
def _register_handler(
user_handler: UserHandlerFuncType
) -> Callable[..., Any]:
handler_name = name
if handler_name is None:
handler_name = user_handler.__name__
if registration_kwargs is not None:
kwargs = registration_kwargs
else:
kwargs = {}
wrapped = self._wrap_handler(handler_type, handler_name,
user_handler)
self._register_handler(handler_type, handler_name,
user_handler, wrapped, kwargs)
return wrapped
return _register_handler
def _wrap_handler(self, handler_type: str,
handler_name: str,
user_handler: UserHandlerFuncType
) -> UserHandlerFuncType:
if handler_type in _EVENT_CLASSES:
if handler_type == 'lambda_function':
# We have to wrap existing @app.lambda_function()
# handlers for backwards compat reasons so we can
# preserve the `def handler(event, context): ...`
# interface. However we need a consistent interface
# for middleware so we have to wrap the event
# here.
user_handler = PureLambdaWrapper(user_handler)
return EventSourceHandler(
user_handler, _EVENT_CLASSES[handler_type],
middleware_handlers=self._get_middleware_handlers(
event_type=_MIDDLEWARE_MAPPING[handler_type],
)
)
websocket_event_classes = [
'on_ws_connect',
'on_ws_message',
'on_ws_disconnect',
]
if self.websocket_api and handler_type in websocket_event_classes:
return WebsocketEventSourceHandler(
user_handler, WebsocketEvent,
self.websocket_api,
middleware_handlers=self._get_middleware_handlers(
event_type='websocket')
)
if handler_type == 'authorizer':
# Authorizer is special cased and doesn't quite fit the
# EventSourceHandler pattern.
return ChaliceAuthorizer(handler_name, user_handler)
return user_handler
def _get_middleware_handlers(self, event_type: str) -> List:
raise NotImplementedError("_get_middleware_handlers")
def _register_handler(self, handler_type: str, name: str,
user_handler: UserHandlerFuncType,
wrapped_handler: Callable[..., Any],
kwargs: Dict[str, Any],
options: Optional[Dict[Any, Any]] = None) -> None:
raise NotImplementedError("_register_handler")
def register_middleware(self, func: MiddlewareFuncType,
event_type: str = 'all') -> None:
raise NotImplementedError("register_middleware")
class _HandlerRegistration(object):
def __init__(self) -> None:
self.routes: Dict[str, Dict[str, RouteEntry]] = defaultdict(dict)
self.websocket_handlers: Dict[str, Any] = {}
self.builtin_auth_handlers: List['BuiltinAuthConfig'] = []
self.event_sources: List['BaseEventSourceConfig'] = []
self.pure_lambda_functions: List['LambdaFunction'] = []
self.api: APIGateway = APIGateway()
self.handler_map: Dict[str, Callable[..., Any]] = {}
self.middleware_handlers: List[Tuple[MiddlewareFuncType, str]] = []
def register_middleware(self, func: MiddlewareFuncType,
event_type: str = 'all') -> None:
self.middleware_handlers.append((func, event_type))
def _do_register_handler(self, handler_type: str, name: str,
user_handler: UserHandlerFuncType,
wrapped_handler: Callable[..., Any], kwargs: Any,
options: Optional[Dict[Any, Any]] = None) -> None:
module_name = 'app'
if options is not None:
name_prefix = options.get('name_prefix')
if name_prefix is not None:
name = name_prefix + name
url_prefix = options.get('url_prefix')
if url_prefix is not None and handler_type == 'route':
# Move url_prefix into kwargs so only the
# route() handler gets a url_prefix kwarg.
kwargs['url_prefix'] = url_prefix
# module_name is always provided if options is not None.
gitextract_8gh5n9v8/
├── .changes/
│ ├── 0.1.0.json
│ ├── 0.10.0.json
│ ├── 0.10.1.json
│ ├── 0.2.0.json
│ ├── 0.3.0.json
│ ├── 0.4.0.json
│ ├── 0.5.0.json
│ ├── 0.5.1.json
│ ├── 0.6.0.json
│ ├── 0.7.0.json
│ ├── 0.8.0.json
│ ├── 0.8.1.json
│ ├── 0.8.2.json
│ ├── 0.9.0.json
│ ├── 1.0.0.json
│ ├── 1.0.0b1.json
│ ├── 1.0.0b2.json
│ ├── 1.0.1.json
│ ├── 1.0.2.json
│ ├── 1.0.3.json
│ ├── 1.0.4.json
│ ├── 1.1.0.json
│ ├── 1.1.1.json
│ ├── 1.10.0.json
│ ├── 1.11.0.json
│ ├── 1.11.1.json
│ ├── 1.12.0.json
│ ├── 1.13.0.json
│ ├── 1.13.1.json
│ ├── 1.14.0.json
│ ├── 1.14.1.json
│ ├── 1.15.0.json
│ ├── 1.15.1.json
│ ├── 1.16.0.json
│ ├── 1.17.0.json
│ ├── 1.18.0.json
│ ├── 1.18.1.json
│ ├── 1.19.0.json
│ ├── 1.2.0.json
│ ├── 1.2.1.json
│ ├── 1.2.2.json
│ ├── 1.2.3.json
│ ├── 1.20.0.json
│ ├── 1.20.1.json
│ ├── 1.21.0.json
│ ├── 1.21.1.json
│ ├── 1.21.2.json
│ ├── 1.21.3.json
│ ├── 1.21.4.json
│ ├── 1.21.5.json
│ ├── 1.21.6.json
│ ├── 1.21.7.json
│ ├── 1.21.8.json
│ ├── 1.21.9.json
│ ├── 1.22.0.json
│ ├── 1.22.1.json
│ ├── 1.22.2.json
│ ├── 1.22.3.json
│ ├── 1.22.4.json
│ ├── 1.23.0.json
│ ├── 1.24.0.json
│ ├── 1.24.1.json
│ ├── 1.24.2.json
│ ├── 1.25.0.json
│ ├── 1.26.0.json
│ ├── 1.26.1.json
│ ├── 1.26.2.json
│ ├── 1.26.3.json
│ ├── 1.26.4.json
│ ├── 1.26.5.json
│ ├── 1.26.6.json
│ ├── 1.27.0.json
│ ├── 1.27.1.json
│ ├── 1.27.2.json
│ ├── 1.27.3.json
│ ├── 1.28.0.json
│ ├── 1.29.0.json
│ ├── 1.3.0.json
│ ├── 1.30.0.json
│ ├── 1.31.0.json
│ ├── 1.31.1.json
│ ├── 1.31.2.json
│ ├── 1.31.3.json
│ ├── 1.31.4.json
│ ├── 1.32.0.json
│ ├── 1.4.0.json
│ ├── 1.5.0.json
│ ├── 1.6.0.json
│ ├── 1.6.1.json
│ ├── 1.6.2.json
│ ├── 1.7.0.json
│ ├── 1.8.0.json
│ ├── 1.9.0.json
│ ├── 1.9.1.json
│ └── templates/
│ └── changelog
├── .coveragerc
├── .github/
│ ├── PULL_REQUEST_TEMPLATE.md
│ ├── dependabot.yml
│ └── workflows/
│ ├── run-tests.yml
│ └── stale-issue.yml
├── .gitignore
├── .pylintrc
├── .python-version
├── CHANGELOG.md
├── CODE_OF_CONDUCT.rst
├── CONTRIBUTING.rst
├── LICENSE
├── MANIFEST.in
├── Makefile
├── NOTICE
├── README.rst
├── chalice/
│ ├── __init__.py
│ ├── analyzer.py
│ ├── api/
│ │ └── __init__.py
│ ├── app.py
│ ├── awsclient.py
│ ├── cdk/
│ │ ├── __init__.py
│ │ └── construct.py
│ ├── cli/
│ │ ├── __init__.py
│ │ ├── factory.py
│ │ ├── filewatch/
│ │ │ ├── __init__.py
│ │ │ ├── eventbased.py
│ │ │ └── stat.py
│ │ ├── newproj.py
│ │ └── reloader.py
│ ├── compat.py
│ ├── config.py
│ ├── constants.py
│ ├── deploy/
│ │ ├── __init__.py
│ │ ├── appgraph.py
│ │ ├── deployer.py
│ │ ├── executor.py
│ │ ├── models.py
│ │ ├── packager.py
│ │ ├── planner.py
│ │ ├── swagger.py
│ │ ├── sweeper.py
│ │ └── validate.py
│ ├── invoke.py
│ ├── local.py
│ ├── logs.py
│ ├── package.py
│ ├── pipeline.py
│ ├── policies-extra.json
│ ├── policies.json
│ ├── policy.py
│ ├── py.typed
│ ├── templates/
│ │ ├── 0000-rest-api/
│ │ │ ├── .chalice/
│ │ │ │ └── config.json
│ │ │ ├── .gitignore
│ │ │ ├── app.py
│ │ │ ├── chalicelib/
│ │ │ │ └── __init__.py
│ │ │ ├── metadata.json
│ │ │ ├── requirements-dev.txt
│ │ │ ├── requirements.txt
│ │ │ └── tests/
│ │ │ ├── __init__.py
│ │ │ └── test_app.py
│ │ ├── 0002-s3-event-handler/
│ │ │ ├── .chalice/
│ │ │ │ └── config.json
│ │ │ ├── .gitignore
│ │ │ ├── app.py
│ │ │ ├── chalicelib/
│ │ │ │ └── __init__.py
│ │ │ ├── metadata.json
│ │ │ ├── requirements-dev.txt
│ │ │ ├── requirements.txt
│ │ │ └── tests/
│ │ │ ├── __init__.py
│ │ │ └── test_app.py
│ │ ├── 0007-lambda-only/
│ │ │ ├── .chalice/
│ │ │ │ └── config.json
│ │ │ ├── .gitignore
│ │ │ ├── app.py
│ │ │ ├── chalicelib/
│ │ │ │ └── __init__.py
│ │ │ ├── metadata.json
│ │ │ ├── requirements-dev.txt
│ │ │ ├── requirements.txt
│ │ │ └── tests/
│ │ │ ├── __init__.py
│ │ │ └── test_app.py
│ │ ├── 0009-legacy/
│ │ │ ├── .chalice/
│ │ │ │ └── config.json
│ │ │ ├── .gitignore
│ │ │ ├── app.py
│ │ │ ├── metadata.json
│ │ │ └── requirements.txt
│ │ └── 6001-cdk-ddb/
│ │ ├── README.rst
│ │ ├── infrastructure/
│ │ │ ├── app.py
│ │ │ ├── cdk.json
│ │ │ ├── requirements.txt
│ │ │ └── stacks/
│ │ │ ├── __init__.py
│ │ │ └── chaliceapp.py
│ │ ├── metadata.json
│ │ ├── requirements.txt
│ │ └── runtime/
│ │ ├── .chalice/
│ │ │ └── config.json
│ │ ├── .gitignore
│ │ ├── app.py
│ │ └── requirements.txt
│ ├── test.py
│ ├── utils.py
│ └── vendored/
│ ├── __init__.py
│ └── botocore/
│ ├── __init__.py
│ └── regions.py
├── docs/
│ ├── Makefile
│ └── source/
│ ├── _static/
│ │ ├── custom.css
│ │ └── fonts/
│ │ └── open-sans/
│ │ └── stylesheet.css
│ ├── _templates/
│ │ └── layout.html
│ ├── api.rst
│ ├── chalicedocs.py
│ ├── conf.py
│ ├── faq.rst
│ ├── index.rst
│ ├── main.rst
│ ├── quickstart.rst
│ ├── samples/
│ │ ├── index.rst
│ │ ├── media-query/
│ │ │ ├── code/
│ │ │ │ ├── .chalice/
│ │ │ │ │ ├── config.json
│ │ │ │ │ └── policy-dev.json
│ │ │ │ ├── app.py
│ │ │ │ ├── chalicelib/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── db.py
│ │ │ │ │ └── rekognition.py
│ │ │ │ ├── recordresources.py
│ │ │ │ ├── requirements.txt
│ │ │ │ └── resources.json
│ │ │ └── index.rst
│ │ └── todo-app/
│ │ ├── code/
│ │ │ ├── .chalice/
│ │ │ │ ├── config.json
│ │ │ │ └── policy-dev.json
│ │ │ ├── .gitignore
│ │ │ ├── app.py
│ │ │ ├── chalicelib/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── auth.py
│ │ │ │ └── db.py
│ │ │ ├── create-resources.py
│ │ │ ├── requirements-dev.txt
│ │ │ ├── requirements.txt
│ │ │ ├── tests/
│ │ │ │ ├── __init__.py
│ │ │ │ └── test_db.py
│ │ │ └── users.py
│ │ └── index.rst
│ ├── theme/
│ │ └── smithy/
│ │ ├── globaltoc.html
│ │ ├── landing.html
│ │ ├── layout.html
│ │ ├── static/
│ │ │ ├── asciinema-player.css
│ │ │ ├── asciinema-player.js
│ │ │ ├── bootstrap-reboot.css
│ │ │ ├── casts/
│ │ │ │ ├── chalice-quickstart-old.cast
│ │ │ │ └── chalice-quickstart.cast
│ │ │ ├── custom-tabs.css
│ │ │ └── default.css_t
│ │ └── theme.conf
│ ├── topics/
│ │ ├── authorizers.rst
│ │ ├── blueprints.rst
│ │ ├── cd.rst
│ │ ├── cfn.rst
│ │ ├── configfile.rst
│ │ ├── domainname.rst
│ │ ├── events.rst
│ │ ├── experimental.rst
│ │ ├── index.rst
│ │ ├── logging.rst
│ │ ├── middleware.rst
│ │ ├── multifile.rst
│ │ ├── packaging.rst
│ │ ├── purelambda.rst
│ │ ├── pyversion.rst
│ │ ├── routing.rst
│ │ ├── sdks.rst
│ │ ├── stages.rst
│ │ ├── testing.rst
│ │ ├── tf.rst
│ │ ├── views.rst
│ │ └── websockets.rst
│ ├── tutorials/
│ │ ├── basicrestapi.rst
│ │ ├── cdk.rst
│ │ ├── customdomain.rst
│ │ ├── events.rst
│ │ ├── index.rst
│ │ ├── wschat.rst
│ │ └── wsecho.rst
│ └── upgrading.rst
├── requirements-dev.in
├── requirements-dev.txt
├── requirements-test.in
├── requirements-test.txt
├── scripts/
│ ├── gh-page-docs
│ └── release
├── setup.cfg
├── setup.py
└── tests/
├── __init__.py
├── aws/
│ ├── __init__.py
│ ├── conftest.py
│ ├── test_features.py
│ ├── test_websockets.py
│ ├── testapp/
│ │ ├── .chalice/
│ │ │ └── config.json
│ │ ├── app-redeploy.py
│ │ ├── app.py
│ │ ├── chalicelib/
│ │ │ └── __init__.py
│ │ └── requirements.txt
│ └── testwebsocketapp/
│ ├── .chalice/
│ │ └── config.json
│ ├── .gitignore
│ ├── app-redeploy.py
│ ├── app.py
│ └── requirements.txt
├── conftest.py
├── functional/
│ ├── __init__.py
│ ├── api/
│ │ ├── __init__.py
│ │ └── test_package.py
│ ├── basicapp/
│ │ ├── .chalice/
│ │ │ └── config.json
│ │ ├── .gitignore
│ │ ├── app.py
│ │ └── requirements.txt
│ ├── cdk/
│ │ ├── __init__.py
│ │ └── test_construct.py
│ ├── cli/
│ │ ├── __init__.py
│ │ ├── test_cli.py
│ │ ├── test_factory.py
│ │ └── test_reloader.py
│ ├── conftest.py
│ ├── envapp/
│ │ ├── .chalice/
│ │ │ └── config.json
│ │ ├── .gitignore
│ │ ├── app.py
│ │ └── requirements.txt
│ ├── test_awsclient.py
│ ├── test_deployer.py
│ ├── test_local.py
│ ├── test_package.py
│ └── test_utils.py
├── integration/
│ ├── __init__.py
│ ├── conftest.py
│ ├── test_cli.py
│ └── test_package.py
├── plugins/
│ ├── codelinter.py
│ └── testlinter.py
└── unit/
├── __init__.py
├── cli/
│ ├── __init__.py
│ ├── filewatch/
│ │ ├── test_eventbased.py
│ │ └── test_stat.py
│ ├── test_cli.py
│ └── test_newproj.py
├── conftest.py
├── deploy/
│ ├── __init__.py
│ ├── test_appgraph.py
│ ├── test_deployer.py
│ ├── test_executor.py
│ ├── test_models.py
│ ├── test_packager.py
│ ├── test_planner.py
│ ├── test_swagger.py
│ └── test_validate.py
├── test_analyzer.py
├── test_app.py
├── test_awsclient.py
├── test_config.py
├── test_invoke.py
├── test_local.py
├── test_logs.py
├── test_package.py
├── test_pipeline.py
├── test_policy.py
├── test_test.py
├── test_utils.py
└── vendored/
├── __init__.py
└── botocore/
├── __init__.py
└── test_regions.py
Showing preview only (430K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (4600 symbols across 106 files)
FILE: chalice/analyzer.py
function get_client_calls (line 47) | def get_client_calls(source_code):
function get_client_calls_for_app (line 63) | def get_client_calls_for_app(source_code):
function parse_code (line 80) | def parse_code(source_code, filename='app.py'):
class BaseType (line 87) | class BaseType(object):
method __repr__ (line 88) | def __repr__(self):
method __eq__ (line 92) | def __eq__(self, other):
class Boto3ModuleType (line 111) | class Boto3ModuleType(BaseType):
class Boto3CreateClientType (line 115) | class Boto3CreateClientType(BaseType):
class Boto3ClientType (line 119) | class Boto3ClientType(BaseType):
method __init__ (line 120) | def __init__(self, service_name):
method __eq__ (line 125) | def __eq__(self, other):
method __repr__ (line 134) | def __repr__(self):
class Boto3ClientMethodType (line 139) | class Boto3ClientMethodType(BaseType):
method __init__ (line 140) | def __init__(self, service_name, method_name):
method __eq__ (line 145) | def __eq__(self, other):
method __repr__ (line 153) | def __repr__(self):
class Boto3ClientMethodCallType (line 162) | class Boto3ClientMethodCallType(Boto3ClientMethodType):
class TypedSymbol (line 166) | class TypedSymbol(symtable.Symbol):
class FunctionType (line 171) | class FunctionType(BaseType):
method __init__ (line 172) | def __init__(self, return_type):
method __eq__ (line 176) | def __eq__(self, other):
method __repr__ (line 182) | def __repr__(self):
class StringLiteral (line 190) | class StringLiteral(object):
method __init__ (line 191) | def __init__(self, value):
class ParsedCode (line 196) | class ParsedCode(object):
method __init__ (line 197) | def __init__(self, parsed_ast, symbol_table):
class APICallCollector (line 203) | class APICallCollector(ast.NodeVisitor):
method __init__ (line 209) | def __init__(self, binder):
method collect_api_calls (line 214) | def collect_api_calls(self, node):
method visit (line 219) | def visit(self, node):
class ChainedSymbolTable (line 228) | class ChainedSymbolTable(object):
method __init__ (line 229) | def __init__(self, local_table, global_table):
method new_sub_table (line 236) | def new_sub_table(self, local_table):
method get_inferred_type (line 243) | def get_inferred_type(self, name):
method set_inferred_type (line 263) | def set_inferred_type(self, name, inferred_type):
method lookup_sub_namespace (line 268) | def lookup_sub_namespace(self, name, lineno=None):
method get_sub_namespaces (line 282) | def get_sub_namespaces(self):
method get_name (line 286) | def get_name(self):
method get_symbols (line 290) | def get_symbols(self):
method register_ast_node_for_symbol (line 294) | def register_ast_node_for_symbol(self, name, node):
method lookup_ast_node_for_symbol (line 299) | def lookup_ast_node_for_symbol(self, name):
method has_ast_node_for_symbol (line 310) | def has_ast_node_for_symbol(self, name):
class TypeBinder (line 319) | class TypeBinder(object):
method __init__ (line 321) | def __init__(self):
method get_type_for_node (line 325) | def get_type_for_node(self, node):
method set_type_for_node (line 329) | def set_type_for_node(self, node, inferred_type):
class SymbolTableTypeInfer (line 334) | class SymbolTableTypeInfer(ast.NodeVisitor):
method __init__ (line 338) | def __init__(self, parsed_code, binder=None, visited=None):
method bind_types (line 350) | def bind_types(self):
method known_types (line 355) | def known_types(self, scope_name=None):
method _set_inferred_type_for_name (line 370) | def _set_inferred_type_for_name(self, name, inferred_type):
method _set_inferred_type_for_node (line 374) | def _set_inferred_type_for_node(self, node, inferred_type):
method _get_inferred_type_for_node (line 378) | def _get_inferred_type_for_node(self, node):
method _new_inference_scope (line 382) | def _new_inference_scope(self, parsed_code, binder, visited):
method visit_Import (line 387) | def visit_Import(self, node):
method visit_Name (line 397) | def visit_Name(self, node):
method visit_Assign (line 405) | def visit_Assign(self, node):
method visit_Attribute (line 422) | def visit_Attribute(self, node):
method visit_Call (line 442) | def visit_Call(self, node):
method visit_Lambda (line 479) | def visit_Lambda(self, node):
method _infer_function_call (line 488) | def _infer_function_call(self, node):
method _map_function_params (line 516) | def _map_function_params(self, sub_table, node, def_node):
method _get_name (line 527) | def _get_name(self, node):
method visit_FunctionDef (line 534) | def visit_FunctionDef(self, node):
method visit_AsyncFunctionDef (line 544) | def visit_AsyncFunctionDef(self, node):
method visit_ClassDef (line 551) | def visit_ClassDef(self, node):
method visit_DictComp (line 557) | def visit_DictComp(self, node):
method visit_Return (line 561) | def visit_Return(self, node):
method visit_ListComp (line 573) | def visit_ListComp(self, node):
method visit_GeneratorExp (line 580) | def visit_GeneratorExp(self, node):
method _visit_first_comprehension_generator (line 588) | def _visit_first_comprehension_generator(self, node):
method _collect_comprehension_children (line 595) | def _collect_comprehension_children(self, node):
method _visit_comprehension_children (line 617) | def _visit_comprehension_children(self, node, comprehension_type):
method _handle_comprehension (line 642) | def _handle_comprehension(self, node, comprehension_type):
method _get_matching_sub_namespace (line 647) | def _get_matching_sub_namespace(self, name, lineno):
method visit (line 660) | def visit(self, node):
class AppViewTypeInfer (line 665) | class AppViewTypeInfer(ast.NodeVisitor):
method __init__ (line 673) | def __init__(self, parsed_code):
method bind_types (line 681) | def bind_types(self):
method visit_FunctionDef (line 687) | def visit_FunctionDef(self, node):
method _is_chalice_view (line 696) | def _is_chalice_view(self, node):
FILE: chalice/api/__init__.py
function package_app (line 12) | def package_app(project_dir: str,
FILE: chalice/app.py
function handle_extra_types (line 43) | def handle_extra_types(
function error_response (line 58) | def error_response(
function _matches_content_type (line 68) | def _matches_content_type(content_type: str,
function _content_type_header_contains (line 79) | def _content_type_header_contains(
class ChaliceError (line 93) | class ChaliceError(Exception):
class WebsocketDisconnectedError (line 97) | class WebsocketDisconnectedError(ChaliceError):
method __init__ (line 98) | def __init__(self, connection_id: str):
class ChaliceViewError (line 102) | class ChaliceViewError(ChaliceError):
class ChaliceUnhandledError (line 106) | class ChaliceUnhandledError(ChaliceError):
class BadRequestError (line 114) | class BadRequestError(ChaliceViewError):
class UnauthorizedError (line 118) | class UnauthorizedError(ChaliceViewError):
class ForbiddenError (line 122) | class ForbiddenError(ChaliceViewError):
class NotFoundError (line 126) | class NotFoundError(ChaliceViewError):
class MethodNotAllowedError (line 130) | class MethodNotAllowedError(ChaliceViewError):
class RequestTimeoutError (line 134) | class RequestTimeoutError(ChaliceViewError):
class ConflictError (line 138) | class ConflictError(ChaliceViewError):
class UnprocessableEntityError (line 142) | class UnprocessableEntityError(ChaliceViewError):
class TooManyRequestsError (line 146) | class TooManyRequestsError(ChaliceViewError):
class MultiDict (line 164) | class MultiDict(MutableMapping): # pylint: disable=too-many-ancestors
method __init__ (line 172) | def __init__(self, mapping: Optional[Dict]):
method __getitem__ (line 178) | def __getitem__(self, k: Any) -> Any:
method __setitem__ (line 184) | def __setitem__(self, k: Any, v: Any) -> None:
method __delitem__ (line 187) | def __delitem__(self, k: Any) -> None:
method getlist (line 190) | def getlist(self, k: Any) -> List:
method __len__ (line 193) | def __len__(self) -> int:
method __iter__ (line 196) | def __iter__(self) -> Iterator:
method __repr__ (line 199) | def __repr__(self) -> str:
method __str__ (line 202) | def __str__(self) -> str:
class CaseInsensitiveMapping (line 206) | class CaseInsensitiveMapping(Mapping):
method __init__ (line 209) | def __init__(self, mapping: Union[Dict[str, Any], MultiDict]) -> None:
method __getitem__ (line 213) | def __getitem__(self, key: str) -> Any:
method __iter__ (line 216) | def __iter__(self) -> Iterator:
method __len__ (line 219) | def __len__(self) -> int:
method __repr__ (line 222) | def __repr__(self) -> str:
class Authorizer (line 226) | class Authorizer(object):
method to_swagger (line 230) | def to_swagger(self) -> Dict[str, Any]:
method with_scopes (line 233) | def with_scopes(self, scopes: List[str]) -> 'Authorizer':
class IAMAuthorizer (line 237) | class IAMAuthorizer(Authorizer):
method __init__ (line 240) | def __init__(self) -> None:
method to_swagger (line 244) | def to_swagger(self) -> Dict[str, str]:
method with_scopes (line 252) | def with_scopes(self, scopes: List[str]) -> 'Authorizer':
class CognitoUserPoolAuthorizer (line 256) | class CognitoUserPoolAuthorizer(Authorizer):
method __init__ (line 260) | def __init__(self, name: str, provider_arns: List[str],
method to_swagger (line 275) | def to_swagger(self) -> Dict[str, Any]:
method with_scopes (line 287) | def with_scopes(self, scopes: List[str]) -> 'Authorizer':
class CustomAuthorizer (line 293) | class CustomAuthorizer(Authorizer):
method __init__ (line 297) | def __init__(self, name: str, authorizer_uri: str, ttl_seconds: int = ...
method to_swagger (line 308) | def to_swagger(self) -> Dict[str, Any]:
method with_scopes (line 325) | def with_scopes(self, scopes: List[str]) -> 'Authorizer':
class CORSConfig (line 331) | class CORSConfig(object):
method __init__ (line 338) | def __init__(self, allow_origin: str = '*',
method allow_headers (line 360) | def allow_headers(self) -> str:
method get_access_control_headers (line 363) | def get_access_control_headers(self) -> Dict[str, str]:
method __eq__ (line 383) | def __eq__(self, other: object) -> bool:
class Request (line 390) | class Request(object):
method __init__ (line 396) | def __init__(self, event_dict: Dict[str, Any],
method _base64decode (line 420) | def _base64decode(self, encoded: Union[bytes, str]) -> bytes:
method raw_body (line 427) | def raw_body(self) -> Union[str, bytes]:
method json_body (line 438) | def json_body(self) -> Any:
method to_dict (line 447) | def to_dict(self) -> Dict[Any, Any]:
method to_original_event (line 461) | def to_original_event(self) -> Dict[str, Any]:
class Response (line 471) | class Response(object):
method __init__ (line 473) | def __init__(
method to_dict (line 484) | def to_dict(
method _sort_headers (line 503) | def _sort_headers(
method _b64encode_body_if_needed (line 515) | def _b64encode_body_if_needed(
method _base64encode (line 542) | def _base64encode(self, data: bytes) -> str:
class RouteEntry (line 551) | class RouteEntry(object):
method __init__ (line 553) | def __init__(self, view_function: Callable[..., Any], view_name: str,
method _parse_view_args (line 580) | def _parse_view_args(self) -> List[str]:
method __eq__ (line 588) | def __eq__(self, other: object) -> bool:
class APIGateway (line 592) | class APIGateway(object):
method __init__ (line 601) | def __init__(self) -> None:
method default_binary_types (line 606) | def default_binary_types(self) -> List[str]:
class WebsocketAPI (line 610) | class WebsocketAPI(object):
method __init__ (line 614) | def __init__(self, env: Optional[MutableMapping] = None) -> None:
method configure (line 623) | def configure(self, domain_name: str, stage: str) -> None:
method configure_from_api_id (line 631) | def configure_from_api_id(self, api_id: str, stage: str) -> None:
method _get_region (line 649) | def _get_region(self) -> str:
method _get_client (line 672) | def _get_client(self) -> Any:
method send (line 690) | def send(self, connection_id: str, message: str) -> None:
method close (line 700) | def close(self, connection_id: str) -> None:
method info (line 709) | def info(self, connection_id: str) -> Any:
class DecoratorAPI (line 719) | class DecoratorAPI(object):
method middleware (line 722) | def middleware(
method authorizer (line 733) | def authorizer(self, ttl_seconds: Optional[int] = None,
method on_s3_event (line 748) | def on_s3_event(self, bucket: str, events: Optional[List[str]] = None,
method on_sns_message (line 760) | def on_sns_message(self, topic: str,
method on_sqs_message (line 768) | def on_sqs_message(self, queue: Optional[str] = None, batch_size: int ...
method on_cw_event (line 787) | def on_cw_event(self, event_pattern: Dict[str, Any],
method schedule (line 795) | def schedule(self, expression: Union[str, 'ScheduleExpression'],
method on_kinesis_record (line 805) | def on_kinesis_record(self, stream: str, batch_size: int = 100,
method on_dynamodb_record (line 821) | def on_dynamodb_record(
method route (line 839) | def route(self, path: str, **kwargs: Any) -> Callable[..., Any]:
method lambda_function (line 849) | def lambda_function(self,
method on_ws_connect (line 854) | def on_ws_connect(self,
method on_ws_disconnect (line 862) | def on_ws_disconnect(self,
method on_ws_message (line 870) | def on_ws_message(self, name: Optional[str] = None) -> Callable[..., A...
method _create_registration_function (line 877) | def _create_registration_function(self, handler_type: str,
method _wrap_handler (line 898) | def _wrap_handler(self, handler_type: str,
method _get_middleware_handlers (line 936) | def _get_middleware_handlers(self, event_type: str) -> List:
method _register_handler (line 939) | def _register_handler(self, handler_type: str, name: str,
method register_middleware (line 946) | def register_middleware(self, func: MiddlewareFuncType,
class _HandlerRegistration (line 951) | class _HandlerRegistration(object):
method __init__ (line 953) | def __init__(self) -> None:
method register_middleware (line 963) | def register_middleware(self, func: MiddlewareFuncType,
method _do_register_handler (line 967) | def _do_register_handler(self, handler_type: str, name: str,
method _attach_websocket_handler (line 993) | def _attach_websocket_handler(self, handler: Union[
method _register_on_ws_connect (line 1011) | def _register_on_ws_connect(self, name: str,
method _register_on_ws_message (line 1022) | def _register_on_ws_message(self, name: str,
method _register_on_ws_disconnect (line 1036) | def _register_on_ws_disconnect(self, name: str,
method _register_lambda_function (line 1047) | def _register_lambda_function(self, name: str,
method _register_on_s3_event (line 1057) | def _register_on_s3_event(self, name: str,
method _register_on_sns_message (line 1074) | def _register_on_sns_message(self, name: str,
method _register_on_sqs_message (line 1086) | def _register_on_sqs_message(self, name: str,
method _register_on_kinesis_record (line 1111) | def _register_on_kinesis_record(self,
method _register_on_dynamodb_record (line 1128) | def _register_on_dynamodb_record(self, name: str,
method _register_on_cw_event (line 1143) | def _register_on_cw_event(self, name: str, handler_string: str,
method _register_schedule (line 1152) | def _register_schedule(self, name: str, handler_string: str,
method _register_authorizer (line 1162) | def _register_authorizer(self, name: str, handler_string: str,
method _register_route (line 1183) | def _register_route(self, name: str, user_handler: UserHandlerFuncType,
class Chalice (line 1225) | class Chalice(_HandlerRegistration, DecoratorAPI):
method __init__ (line 1231) | def __init__(self, app_name: str, debug: bool = False,
method _initialize (line 1248) | def _initialize(self, env: MutableMapping) -> None:
method debug (line 1257) | def debug(self) -> bool:
method debug (line 1261) | def debug(self, value: bool) -> None:
method _configure_logging (line 1265) | def _configure_logging(self) -> None:
method _already_configured (line 1277) | def _already_configured(self, log: logging.Logger) -> bool:
method _configure_log_level (line 1286) | def _configure_log_level(self) -> None:
method register_blueprint (line 1293) | def register_blueprint(self, blueprint: 'Blueprint',
method _register_handler (line 1299) | def _register_handler(self, handler_type: str, name: str,
method _register_on_ws_connect (line 1309) | def _register_on_ws_connect(self, name: str,
method _register_on_ws_message (line 1317) | def _register_on_ws_message(self, name: str,
method _register_on_ws_disconnect (line 1325) | def _register_on_ws_disconnect(self, name: str,
method _get_middleware_handlers (line 1333) | def _get_middleware_handlers(self, event_type: str) -> Any:
method __call__ (line 1342) | def __call__(self, event: Any, context: Any) -> Dict[str, Any]:
class BuiltinAuthConfig (line 1359) | class BuiltinAuthConfig(object):
method __init__ (line 1360) | def __init__(self, name: str, handler_string: str,
class ChaliceAuthorizer (line 1393) | class ChaliceAuthorizer(object):
method __init__ (line 1394) | def __init__(self, name: str, func: Callable[..., Any],
method __call__ (line 1405) | def __call__(
method _transform_event (line 1416) | def _transform_event(self, event: Dict[str, Any]) -> 'AuthRequest':
method with_scopes (line 1421) | def with_scopes(self, scopes: List[str]) -> 'ChaliceAuthorizer':
class AuthRequest (line 1427) | class AuthRequest(object):
method __init__ (line 1428) | def __init__(self, auth_type: str, token: str, method_arn: str) -> None:
class AuthResponse (line 1434) | class AuthResponse(object):
method __init__ (line 1438) | def __init__(self, routes: List[Union[str, 'AuthRoute']],
method to_dict (line 1449) | def to_dict(self, request: AuthRequest) -> Dict[str, Any]:
method _generate_policy (line 1456) | def _generate_policy(self, request: AuthRequest) -> Dict[str, Any]:
method _generate_allowed_resources (line 1469) | def _generate_allowed_resources(self, request: AuthRequest) -> List[str]:
method _generate_arn (line 1491) | def _generate_arn(
class AuthRoute (line 1524) | class AuthRoute(object):
method __init__ (line 1525) | def __init__(self, path: str, methods: List[str]):
class LambdaFunction (line 1530) | class LambdaFunction(object):
method __init__ (line 1531) | def __init__(self, func: Callable[..., Any], name: str,
method __call__ (line 1537) | def __call__(self, event: Dict[str, Any],
class BaseEventSourceConfig (line 1543) | class BaseEventSourceConfig(object):
method __init__ (line 1544) | def __init__(self, name: str, handler_string: str) -> None:
class ScheduledEventConfig (line 1549) | class ScheduledEventConfig(BaseEventSourceConfig):
method __init__ (line 1550) | def __init__(self, name: str, handler_string: str,
class CloudWatchEventConfig (line 1559) | class CloudWatchEventConfig(BaseEventSourceConfig):
method __init__ (line 1561) | def __init__(self, name: str, handler_string: str,
class ScheduleExpression (line 1567) | class ScheduleExpression(object):
method to_string (line 1568) | def to_string(self) -> str:
class Rate (line 1572) | class Rate(ScheduleExpression):
method __init__ (line 1577) | def __init__(self, value: int, unit: str) -> None:
method to_string (line 1581) | def to_string(self) -> str:
class Cron (line 1590) | class Cron(ScheduleExpression):
method __init__ (line 1591) | def __init__(self, minutes: Union[str, int], hours: Union[str, int],
method to_string (line 1601) | def to_string(self) -> str:
class S3EventConfig (line 1612) | class S3EventConfig(BaseEventSourceConfig):
method __init__ (line 1613) | def __init__(self, name: str, bucket: str, events: List[str], prefix: ...
class SNSEventConfig (line 1622) | class SNSEventConfig(BaseEventSourceConfig):
method __init__ (line 1624) | def __init__(self, name: str, handler_string: str, topic: str):
class SQSEventConfig (line 1629) | class SQSEventConfig(BaseEventSourceConfig):
method __init__ (line 1630) | def __init__(self, name: str, handler_string: str, queue: Optional[str],
class KinesisEventConfig (line 1643) | class KinesisEventConfig(BaseEventSourceConfig):
method __init__ (line 1644) | def __init__(self, name: str, handler_string: str, stream: str,
class DynamoDBEventConfig (line 1655) | class DynamoDBEventConfig(BaseEventSourceConfig):
method __init__ (line 1656) | def __init__(self, name: str, handler_string: str, stream_arn: str,
class WebsocketConnectConfig (line 1667) | class WebsocketConnectConfig(BaseEventSourceConfig):
method __init__ (line 1670) | def __init__(self, name: str, handler_string: str,
class WebsocketMessageConfig (line 1677) | class WebsocketMessageConfig(BaseEventSourceConfig):
method __init__ (line 1678) | def __init__(self, name: str, route_key_handled: str, handler_string: ...
class WebsocketDisconnectConfig (line 1685) | class WebsocketDisconnectConfig(BaseEventSourceConfig):
method __init__ (line 1688) | def __init__(self, name: str, handler_string: str,
class PureLambdaWrapper (line 1695) | class PureLambdaWrapper(object):
method __init__ (line 1696) | def __init__(self,
method __call__ (line 1703) | def __call__(self, event: 'BaseLambdaEvent') -> Any:
class MiddlewareHandler (line 1711) | class MiddlewareHandler(object):
method __init__ (line 1712) | def __init__(self, handler: Callable[..., Any],
method __call__ (line 1717) | def __call__(self, request: Any) -> Any:
class BaseLambdaHandler (line 1721) | class BaseLambdaHandler(object):
method __call__ (line 1722) | def __call__(self, event: Any, context: Any) -> Any:
method _build_middleware_handlers (line 1725) | def _build_middleware_handlers(self, handlers: List[Callable[..., Any]],
class EventSourceHandler (line 1734) | class EventSourceHandler(BaseLambdaHandler):
method __init__ (line 1736) | def __init__(
method middleware_handlers (line 1749) | def middleware_handlers(self) -> List[Callable[..., Any]]:
method middleware_handlers (line 1753) | def middleware_handlers(self, value: List[Callable[..., Any]]) -> None:
method __call__ (line 1756) | def __call__(self, event: Any, context: Any) -> Any:
class WebsocketEventSourceHandler (line 1765) | class WebsocketEventSourceHandler(EventSourceHandler):
method __init__ (line 1768) | def __init__(self, func: Callable[..., Any],
method __call__ (line 1776) | def __call__(self, event: Dict[str, Any],
class RestAPIEventHandler (line 1794) | class RestAPIEventHandler(BaseLambdaHandler):
method __init__ (line 1795) | def __init__(self, route_table: Dict[str, Dict[str, RouteEntry]],
method _global_error_handler (line 1810) | def _global_error_handler(self, event: Any,
method create_request_object (line 1817) | def create_request_object(self, event: Any,
method __call__ (line 1830) | def __call__(self, event: Any, context: Any) -> Any:
method _main_rest_api_handler (line 1841) | def _main_rest_api_handler(self, event: Any, context: Any) -> Response:
method _validate_binary_response (line 1900) | def _validate_binary_response(self,
method _get_view_function_response (line 1920) | def _get_view_function_response(self, view_function: Callable[..., Any],
method _unhandled_exception_to_response (line 1941) | def _unhandled_exception_to_response(self) -> Response:
method _validate_response (line 1958) | def _validate_response(self, response: Response) -> None:
method _cors_enabled_for_route (line 1964) | def _cors_enabled_for_route(self, route_entry: RouteEntry) -> bool:
method _get_cors_headers (line 1967) | def _get_cors_headers(self, cors: CORSConfig) -> Dict[str, Any]:
method _add_cors_headers (line 1970) | def _add_cors_headers(self, response: Response,
class BaseLambdaEvent (line 1981) | class BaseLambdaEvent(object):
method __init__ (line 1982) | def __init__(self, event_dict: Dict[str, Any],
method _extract_attributes (line 1988) | def _extract_attributes(self, event_dict: Dict[str, Any]) -> None:
method to_dict (line 1991) | def to_dict(self) -> Dict[str, Any]:
class LambdaFunctionEvent (line 1999) | class LambdaFunctionEvent(BaseLambdaEvent):
method __init__ (line 2000) | def __init__(self, event_dict: Dict[str, Any], context: Any) -> None:
method _extract_attributes (line 2004) | def _extract_attributes(self, event_dict: Dict[str, Any]) -> None:
method to_dict (line 2007) | def to_dict(self) -> Dict[str, Any]:
class CloudWatchEvent (line 2011) | class CloudWatchEvent(BaseLambdaEvent):
method _extract_attributes (line 2012) | def _extract_attributes(self, event_dict: Dict[str, Any]) -> None:
class WebsocketEvent (line 2024) | class WebsocketEvent(BaseLambdaEvent):
method __init__ (line 2025) | def __init__(self, event_dict: Dict[str, Any], context: Any):
method _extract_attributes (line 2029) | def _extract_attributes(self, event_dict: Dict[str, Any]) -> None:
method json_body (line 2037) | def json_body(self) -> Dict[str, Any]:
class SNSEvent (line 2046) | class SNSEvent(BaseLambdaEvent):
method _extract_attributes (line 2048) | def _extract_attributes(self, event_dict: Dict[str, Any]) -> None:
class S3Event (line 2056) | class S3Event(BaseLambdaEvent):
method _extract_attributes (line 2057) | def _extract_attributes(self, event_dict: Dict[str, Any]) -> None:
class SQSEvent (line 2063) | class SQSEvent(BaseLambdaEvent):
method _extract_attributes (line 2064) | def _extract_attributes(self, event_dict: Dict[str, Any]) -> None:
method __iter__ (line 2069) | def __iter__(self) -> Iterator['SQSRecord']:
class SQSRecord (line 2074) | class SQSRecord(BaseLambdaEvent):
method _extract_attributes (line 2076) | def _extract_attributes(self, event_dict: Dict[str, Any]) -> None:
class KinesisEvent (line 2081) | class KinesisEvent(BaseLambdaEvent):
method _extract_attributes (line 2082) | def _extract_attributes(self, event_dict: Dict[str, Any]) -> None:
method __iter__ (line 2085) | def __iter__(self) -> Iterator['KinesisRecord']:
class KinesisRecord (line 2090) | class KinesisRecord(BaseLambdaEvent):
method _extract_attributes (line 2091) | def _extract_attributes(self, event_dict: Dict[str, Any]) -> None:
class DynamoDBEvent (line 2102) | class DynamoDBEvent(BaseLambdaEvent):
method _extract_attributes (line 2103) | def _extract_attributes(self, event_dict: Dict[str, Any]) -> None:
method __iter__ (line 2106) | def __iter__(self) -> Iterator['DynamoDBRecord']:
class DynamoDBRecord (line 2111) | class DynamoDBRecord(BaseLambdaEvent):
method _extract_attributes (line 2113) | def _extract_attributes(self, event_dict: Dict[str, Any]) -> None:
method table_name (line 2130) | def table_name(self) -> str:
class Blueprint (line 2147) | class Blueprint(DecoratorAPI):
method __init__ (line 2148) | def __init__(self, import_name: str) -> None:
method log (line 2156) | def log(self) -> logging.Logger:
method current_request (line 2164) | def current_request(self) -> Request:
method current_app (line 2174) | def current_app(self) -> Chalice:
method lambda_context (line 2183) | def lambda_context(self) -> 'LambdaContext':
method register (line 2191) | def register(self, app: Chalice, options: Dict[str, Any]) -> None:
method register_middleware (line 2208) | def register_middleware(self, func: Callable,
method _register_handler (line 2216) | def _register_handler(self, handler_type: str, name: str,
method _get_middleware_handlers (line 2240) | def _get_middleware_handlers(self, event_type: str) -> List:
class ConvertToMiddleware (line 2261) | class ConvertToMiddleware(object):
method __init__ (line 2262) | def __init__(self, lambda_wrapper: Callable[..., Any]) -> None:
method __call__ (line 2265) | def __call__(self, event: Any, get_response: Callable[..., Any]) -> Any:
method _extract_original_param (line 2273) | def _extract_original_param(self, event: Any) -> Tuple[Any, Optional[A...
FILE: chalice/awsclient.py
class AWSClientError (line 101) | class AWSClientError(Exception):
class ReadTimeout (line 105) | class ReadTimeout(AWSClientError):
method __init__ (line 106) | def __init__(self, message: str) -> None:
class ResourceDoesNotExistError (line 110) | class ResourceDoesNotExistError(AWSClientError):
class LambdaClientError (line 114) | class LambdaClientError(AWSClientError):
method __init__ (line 115) | def __init__(
class DeploymentPackageTooLargeError (line 123) | class DeploymentPackageTooLargeError(LambdaClientError):
class LambdaErrorContext (line 127) | class LambdaErrorContext(object):
method __init__ (line 128) | def __init__(
class TypedAWSClient (line 139) | class TypedAWSClient(object):
method __init__ (line 145) | def __init__(
method resolve_endpoint (line 157) | def resolve_endpoint(
method endpoint_from_arn (line 168) | def endpoint_from_arn(self, arn: str) -> Optional[OrderedDict[str, Any]]:
method endpoint_dns_suffix (line 179) | def endpoint_dns_suffix(self, service: str, region: str) -> str:
method endpoint_dns_suffix_from_arn (line 190) | def endpoint_dns_suffix_from_arn(self, arn: str) -> str:
method service_principal (line 201) | def service_principal(
method lambda_function_exists (line 285) | def lambda_function_exists(self, name: str) -> bool:
method api_mapping_exists (line 293) | def api_mapping_exists(self, domain_name: str, api_map_key: str) -> bool:
method get_domain_name (line 308) | def get_domain_name(self, domain_name: str) -> Dict[str, Any]:
method domain_name_exists (line 317) | def domain_name_exists(self, domain_name: str) -> bool:
method domain_name_exists_v2 (line 324) | def domain_name_exists_v2(self, domain_name: str) -> bool:
method get_function_configuration (line 332) | def get_function_configuration(self, name: str) -> Dict[str, Any]:
method _create_vpc_config (line 338) | def _create_vpc_config(
method publish_layer (line 355) | def publish_layer(
method delete_layer_version (line 370) | def delete_layer_version(self, layer_version_arn: str) -> None:
method get_layer_version (line 380) | def get_layer_version(self, layer_version_arn: str) -> Dict[str, Any]:
method create_function (line 388) | def create_function(
method _wait_for_active (line 436) | def _wait_for_active(self, function_name: str) -> None:
method create_api_mapping (line 441) | def create_api_mapping(
method create_base_path_mapping (line 452) | def create_base_path_mapping(
method _create_base_path_mapping (line 463) | def _create_base_path_mapping(
method _create_api_mapping (line 476) | def _create_api_mapping(self, api_args: Dict[str, Any]) -> Dict[str, s...
method create_domain_name (line 485) | def create_domain_name(
method _create_domain_name (line 523) | def _create_domain_name(
method _create_domain_name_v2 (line 558) | def _create_domain_name_v2(
method _create_lambda_function (line 580) | def _create_lambda_function(
method _is_settling_error (line 598) | def _is_settling_error(
method invoke_function (line 606) | def invoke_function(
method _is_iam_role_related_error (line 621) | def _is_iam_role_related_error(
method _get_lambda_code_deployment_error (line 636) | def _get_lambda_code_deployment_error(
method delete_function (line 664) | def delete_function(self, function_name: str) -> None:
method get_custom_domain_params_v2 (line 671) | def get_custom_domain_params_v2(
method get_custom_domain_patch_operations (line 695) | def get_custom_domain_patch_operations(
method update_domain_name (line 728) | def update_domain_name(
method _update_resource_tags (line 767) | def _update_resource_tags(
method _remove_unrequested_resource_tags (line 783) | def _remove_unrequested_resource_tags(
method _add_missing_or_differing_value_resource_tags (line 795) | def _add_missing_or_differing_value_resource_tags(
method _update_domain_name (line 811) | def _update_domain_name(
method _update_domain_name_v2 (line 854) | def _update_domain_name_v2(
method delete_domain_name (line 877) | def delete_domain_name(self, domain_name: str) -> None:
method delete_api_mapping (line 890) | def delete_api_mapping(self, domain_name: str, path_key: str) -> None:
method update_function (line 895) | def update_function(
method _update_function_code (line 935) | def _update_function_code(
method _wait_for_function_update (line 952) | def _wait_for_function_update(self, function_name: str) -> None:
method put_function_concurrency (line 957) | def put_function_concurrency(
method delete_function_concurrency (line 966) | def delete_function_concurrency(self, function_name: str) -> None:
method _update_function_config (line 970) | def _update_function_config(
method _do_update_function_config (line 1005) | def _do_update_function_config(
method _update_function_tags (line 1018) | def _update_function_tags(
method _remove_unrequested_remote_tags (line 1031) | def _remove_unrequested_remote_tags(
method _add_missing_or_differing_value_requested_tags (line 1043) | def _add_missing_or_differing_value_requested_tags(
method get_role_arn_for_name (line 1059) | def get_role_arn_for_name(self, name: str) -> str:
method get_role (line 1063) | def get_role(self, name: str) -> Dict[str, Any]:
method delete_role_policy (line 1071) | def delete_role_policy(self, role_name: str, policy_name: str) -> None:
method put_role_policy (line 1076) | def put_role_policy(
method create_role (line 1086) | def create_role(
method delete_role (line 1103) | def delete_role(self, name: str) -> None:
method log_group_exists (line 1113) | def log_group_exists(self, name: str) -> bool:
method create_log_group (line 1123) | def create_log_group(self, log_group_name: str) -> None:
method delete_retention_policy (line 1128) | def delete_retention_policy(self, log_group_name: str) -> None:
method delete_log_group (line 1133) | def delete_log_group(self, log_group_name: str) -> None:
method put_retention_policy (line 1138) | def put_retention_policy(self, name: str, retention_in_days: int) -> N...
method get_rest_api_id (line 1144) | def get_rest_api_id(self, name: str) -> Optional[str]:
method get_rest_api (line 1161) | def get_rest_api(self, rest_api_id: str) -> Dict[str, Any]:
method import_rest_api (line 1171) | def import_rest_api(
method update_api_from_swagger (line 1182) | def update_api_from_swagger(
method update_rest_api (line 1192) | def update_rest_api(
method delete_rest_api (line 1200) | def delete_rest_api(self, rest_api_id: str) -> None:
method deploy_rest_api (line 1207) | def deploy_rest_api(
method add_permission_for_apigateway (line 1217) | def add_permission_for_apigateway(
method add_permission_for_apigateway_v2 (line 1241) | def add_permission_for_apigateway_v2(
method get_function_policy (line 1259) | def get_function_policy(self, function_name: str) -> Dict[str, Any]:
method download_sdk (line 1273) | def download_sdk(
method get_sdk_download_stream (line 1313) | def get_sdk_download_stream(
method subscribe_function_to_topic (line 1332) | def subscribe_function_to_topic(
method unsubscribe_from_topic (line 1341) | def unsubscribe_from_topic(self, subscription_arn: str) -> None:
method verify_sns_subscription_current (line 1345) | def verify_sns_subscription_current(
method add_permission_for_sns_topic (line 1368) | def add_permission_for_sns_topic(
method remove_permission_for_sns_topic (line 1377) | def remove_permission_for_sns_topic(
method _build_source_arn_str (line 1386) | def _build_source_arn_str(
method partition_name (line 1402) | def partition_name(self) -> str:
method region_name (line 1406) | def region_name(self) -> str:
method iter_log_events (line 1409) | def iter_log_events(
method _iter_log_messages (line 1429) | def _iter_log_messages(
method _convert_to_datetime (line 1446) | def _convert_to_datetime(self, integer_timestamp: int) -> datetime:
method filter_log_events (line 1449) | def filter_log_events(
method _convert_types_on_response (line 1476) | def _convert_types_on_response(self, response: Dict[str, Any]) -> None:
method _client (line 1479) | def _client(self, service_name: str) -> Any:
method add_permission_for_authorizer (line 1486) | def add_permission_for_authorizer(
method get_or_create_rule_arn (line 1532) | def get_or_create_rule_arn(
method delete_rule (line 1554) | def delete_rule(self, rule_name: str) -> None:
method connect_rule_to_lambda (line 1561) | def connect_rule_to_lambda(
method add_permission_for_cloudwatch_event (line 1569) | def add_permission_for_cloudwatch_event(
method connect_s3_bucket_to_lambda (line 1578) | def connect_s3_bucket_to_lambda(
method _merge_s3_notification_config (line 1630) | def _merge_s3_notification_config(
method add_permission_for_s3_event (line 1654) | def add_permission_for_s3_event(
method remove_permission_for_s3_event (line 1667) | def remove_permission_for_s3_event(
method disconnect_s3_bucket_from_lambda (line 1680) | def disconnect_s3_bucket_from_lambda(
method _add_lambda_permission_if_needed (line 1702) | def _add_lambda_permission_if_needed(
method _policy_gives_access (line 1727) | def _policy_gives_access(
method _statement_gives_arn_access (line 1760) | def _statement_gives_arn_access(
method _remove_lambda_permission_if_needed (line 1795) | def _remove_lambda_permission_if_needed(
method create_lambda_event_source (line 1818) | def create_lambda_event_source(
method update_lambda_event_source (line 1847) | def update_lambda_event_source(
method remove_lambda_event_source (line 1872) | def remove_lambda_event_source(self, event_uuid: str) -> None:
method verify_event_source_current (line 1881) | def verify_event_source_current(
method verify_event_source_arn_current (line 1913) | def verify_event_source_arn_current(
method create_websocket_api (line 1934) | def create_websocket_api(self, name: str) -> str:
method get_websocket_api_id (line 1947) | def get_websocket_api_id(self, name: str) -> Optional[str]:
method websocket_api_exists (line 1954) | def websocket_api_exists(self, api_id: str) -> bool:
method delete_websocket_api (line 1963) | def delete_websocket_api(self, api_id: str) -> None:
method create_websocket_integration (line 1970) | def create_websocket_integration(
method create_websocket_route (line 1986) | def create_websocket_route(
method delete_websocket_routes (line 1997) | def delete_websocket_routes(self, api_id: str, routes: List[str]) -> N...
method delete_websocket_integrations (line 2005) | def delete_websocket_integrations(
method deploy_websocket_api (line 2015) | def deploy_websocket_api(self, api_id: str) -> str:
method get_websocket_routes (line 2021) | def get_websocket_routes(self, api_id: str) -> List[str]:
method get_websocket_integrations (line 2030) | def get_websocket_integrations(self, api_id: str) -> List[str]:
method create_stage (line 2037) | def create_stage(
method _call_client_method_with_retries (line 2047) | def _call_client_method_with_retries(
method _random_id (line 2081) | def _random_id(self) -> str:
FILE: chalice/cdk/construct.py
class Chalice (line 23) | class Chalice(Construct):
method __init__ (line 32) | def __init__(self,
method _package_app (line 89) | def _package_app(self):
method _generate_sam_template_with_assets (line 98) | def _generate_sam_template_with_assets(self, chalice_out_dir, package_...
method _filter_resources (line 131) | def _filter_resources(self, template, resource_type):
method get_resource (line 136) | def get_resource(self, resource_name):
method get_role (line 140) | def get_role(self, role_name):
method get_function (line 151) | def get_function(self, function_name):
method add_environment_variable (line 164) | def add_environment_variable(self, key, value, function_name):
FILE: chalice/cli/__init__.py
function _configure_logging (line 43) | def _configure_logging(level, format_string=None):
function get_system_info (line 56) | def get_system_info():
function cli (line 78) | def cli(ctx, project_dir, debug=False):
function _configure_cli_env_vars (line 93) | def _configure_cli_env_vars():
function local (line 111) | def local(ctx, host='127.0.0.1', port=8000, stage=DEFAULT_STAGE_NAME,
function create_local_server (line 139) | def create_local_server(factory, host, port, stage):
function run_local_server (line 153) | def run_local_server(factory, host, port, stage):
function deploy (line 175) | def deploy(ctx, autogen_policy, profile, api_gateway_stage, stage,
function dev (line 196) | def dev():
function plan (line 226) | def plan(ctx, autogen_policy, profile, api_gateway_stage, stage):
function appgraph (line 260) | def appgraph(ctx, autogen_policy, profile, api_gateway_stage, stage):
function invoke (line 288) | def invoke(ctx, name, profile, stage):
function delete (line 329) | def delete(ctx, profile, stage):
function logs (line 370) | def logs(ctx, num_entries, include_lambda_messages, stage,
function gen_policy (line 394) | def gen_policy(ctx, filename):
function new_project (line 413) | def new_project(ctx, project_name, profile, project_type):
function url (line 433) | def url(ctx, stage):
function generate_sdk (line 455) | def generate_sdk(ctx, sdk_type, stage, outdir):
function generate_models (line 478) | def generate_models(ctx, stage):
function package (line 527) | def package(ctx, single_file, stage, merge_template,
function generate_pipeline (line 587) | def generate_pipeline(ctx, pipeline_version, codebuild_image, source,
function main (line 630) | def main():
FILE: chalice/cli/factory.py
function create_botocore_session (line 42) | def create_botocore_session(
function _add_chalice_user_agent (line 66) | def _add_chalice_user_agent(session: Session) -> None:
function _inject_large_request_body_filter (line 73) | def _inject_large_request_body_filter() -> None:
class NoSuchFunctionError (line 78) | class NoSuchFunctionError(Exception):
method __init__ (line 81) | def __init__(self, name: str) -> None:
class UnknownConfigFileVersion (line 86) | class UnknownConfigFileVersion(Exception):
method __init__ (line 87) | def __init__(self, version: str) -> None:
class LargeRequestBodyFilter (line 93) | class LargeRequestBodyFilter(logging.Filter):
method filter (line 94) | def filter(self, record: Any) -> bool:
class CLIFactory (line 111) | class CLIFactory(object):
method __init__ (line 112) | def __init__(
method create_botocore_session (line 126) | def create_botocore_session(
method create_default_deployer (line 140) | def create_default_deployer(
method create_plan_only_deployer (line 145) | def create_plan_only_deployer(
method create_deletion_deployer (line 150) | def create_deletion_deployer(
method create_deployment_reporter (line 155) | def create_deployment_reporter(
method create_config_obj (line 160) | def create_config_obj(
method _validate_config_from_disk (line 205) | def _validate_config_from_disk(self, config: Dict[str, Any]) -> None:
method create_app_packager (line 214) | def create_app_packager(
method create_log_retriever (line 230) | def create_log_retriever(
method create_stdin_reader (line 247) | def create_stdin_reader(self) -> PipeReader:
method create_lambda_invoke_handler (line 252) | def create_lambda_invoke_handler(
method load_chalice_app (line 283) | def load_chalice_app(
method load_project_config (line 328) | def load_project_config(self) -> Dict[str, Any]:
method create_local_server (line 338) | def create_local_server(
method create_package_options (line 343) | def create_package_options(self) -> PackageOptions:
FILE: chalice/cli/filewatch/__init__.py
class FileWatcher (line 10) | class FileWatcher(object):
method watch_for_file_changes (line 13) | def watch_for_file_changes(self, root_dir, callback):
class WorkerProcess (line 24) | class WorkerProcess(object):
method __init__ (line 26) | def __init__(self, http_thread):
method main (line 31) | def main(self, project_dir, timeout=None):
method _start_file_watcher (line 40) | def _start_file_watcher(self, project_dir):
FILE: chalice/cli/filewatch/eventbased.py
class WatchdogWorkerProcess (line 10) | class WatchdogWorkerProcess(WorkerProcess):
method _start_file_watcher (line 13) | def _start_file_watcher(self, project_dir):
class WatchdogFileWatcher (line 21) | class WatchdogFileWatcher(FileWatcher):
method watch_for_file_changes (line 22) | def watch_for_file_changes(self, root_dir, callback):
class WatchdogRestarter (line 29) | class WatchdogRestarter(events.FileSystemEventHandler):
method __init__ (line 31) | def __init__(self, restart_event):
method on_any_event (line 36) | def on_any_event(self, event):
method __call__ (line 45) | def __call__(self):
FILE: chalice/cli/filewatch/stat.py
class StatWorkerProcess (line 14) | class StatWorkerProcess(WorkerProcess):
method _start_file_watcher (line 15) | def _start_file_watcher(self, project_dir):
method _on_file_change (line 20) | def _on_file_change(self):
class StatFileWatcher (line 25) | class StatFileWatcher(FileWatcher):
method __init__ (line 28) | def __init__(self, osutils=None):
method watch_for_file_changes (line 37) | def watch_for_file_changes(self, root_dir, callback):
method poll_for_changes_until_shutdown (line 47) | def poll_for_changes_until_shutdown(self, root_dir, callback):
method _seed_mtime_cache (line 54) | def _seed_mtime_cache(self, root_dir):
method _single_pass_poll (line 61) | def _single_pass_poll(self, root_dir, callback):
method _is_changed_file (line 75) | def _is_changed_file(self, path, new_mtimes):
method _recursive_walk_files (line 91) | def _recursive_walk_files(self, root_dir):
FILE: chalice/cli/newproj.py
class BadTemplateError (line 52) | class BadTemplateError(Exception):
function create_new_project_skeleton (line 56) | def create_new_project_skeleton(
class ProjectTemplate (line 75) | class ProjectTemplate:
method description (line 81) | def description(self) -> str:
class ProjectCreator (line 87) | class ProjectCreator(object):
method __init__ (line 88) | def __init__(self, osutils: Optional[OSUtils] = None) -> None:
method create_new_project (line 93) | def create_new_project(
method _iter_files (line 115) | def _iter_files(
method _should_ignore (line 130) | def _should_ignore(self, filename: str) -> bool:
function get_templated_content (line 137) | def get_templated_content(
function list_available_projects (line 155) | def list_available_projects(
function getting_started_prompt (line 167) | def getting_started_prompt() -> Dict[str, Any]:
FILE: chalice/cli/reloader.py
function get_best_worker_process (line 41) | def get_best_worker_process():
function start_parent_process (line 53) | def start_parent_process(env):
function start_worker_process (line 59) | def start_worker_process(server_factory, root_dir, worker_process_cls=No...
class ParentProcess (line 71) | class ParentProcess(object):
method __init__ (line 73) | def __init__(self, env, popen):
method main (line 78) | def main(self):
function run_with_reloader (line 96) | def run_with_reloader(server_factory, env, root_dir, worker_process_cls=...
FILE: chalice/compat.py
function pip_import_string (line 14) | def pip_import_string():
function prevent_msvc_compiling_patch (line 53) | def prevent_msvc_compiling_patch(): # type: ignore
function is_broken_pipe_error (line 132) | def is_broken_pipe_error(error):
FILE: chalice/config.py
class Config (line 16) | class Config(object):
method __init__ (line 77) | def __init__(self,
method create (line 103) | def create(cls, chalice_stage: str = DEFAULT_STAGE_NAME,
method profile (line 110) | def profile(self) -> str:
method app_name (line 114) | def app_name(self) -> str:
method project_dir (line 118) | def project_dir(self) -> str:
method chalice_app (line 122) | def chalice_app(self) -> Chalice:
method config_from_disk (line 142) | def config_from_disk(self) -> StrMap:
method lambda_python_version (line 146) | def lambda_python_version(self) -> str:
method log_retention_in_days (line 160) | def log_retention_in_days(self) -> int:
method layers (line 166) | def layers(self) -> List:
method api_gateway_custom_domain (line 172) | def api_gateway_custom_domain(self) -> StrMap:
method websocket_api_custom_domain (line 177) | def websocket_api_custom_domain(self) -> StrMap:
method _chain_lookup (line 181) | def _chain_lookup(self, name: str, varies_per_chalice_stage: bool = Fa...
method _chain_merge (line 205) | def _chain_merge(self, name: str) -> Dict[str, Any]:
method config_file_version (line 227) | def config_file_version(self) -> str:
method api_gateway_stage (line 234) | def api_gateway_stage(self) -> str:
method api_gateway_endpoint_type (line 239) | def api_gateway_endpoint_type(self) -> str:
method api_gateway_endpoint_vpce (line 244) | def api_gateway_endpoint_vpce(self) -> Union[str, List[str]]:
method api_gateway_policy_file (line 249) | def api_gateway_policy_file(self) -> str:
method minimum_compression_size (line 254) | def minimum_compression_size(self) -> int:
method iam_policy_file (line 259) | def iam_policy_file(self) -> str:
method lambda_memory_size (line 265) | def lambda_memory_size(self) -> int:
method lambda_timeout (line 271) | def lambda_timeout(self) -> int:
method automatic_layer (line 277) | def automatic_layer(self) -> bool:
method iam_role_arn (line 286) | def iam_role_arn(self) -> str:
method manage_iam_role (line 292) | def manage_iam_role(self) -> bool:
method autogen_policy (line 306) | def autogen_policy(self) -> bool:
method xray_enabled (line 312) | def xray_enabled(self) -> bool:
method environment_variables (line 318) | def environment_variables(self) -> Dict[str, str]:
method tags (line 322) | def tags(self) -> Dict[str, str]:
method security_group_ids (line 329) | def security_group_ids(self) -> List[str]:
method subnet_ids (line 335) | def subnet_ids(self) -> List[str]:
method reserved_concurrency (line 341) | def reserved_concurrency(self) -> int:
method scope (line 346) | def scope(self, chalice_stage: str, function_name: str) -> Config:
method deployed_resources (line 361) | def deployed_resources(self, chalice_stage_name: str) -> DeployedResou...
method _try_old_deployer_values (line 382) | def _try_old_deployer_values(self,
method _load_json_file (line 393) | def _load_json_file(self, deployed_file: str) -> Any:
method _upgrade_deployed_values (line 399) | def _upgrade_deployed_values(self, chalice_stage_name: str,
method _upgrade_lambda_functions (line 409) | def _upgrade_lambda_functions(self,
method _upgrade_rest_api (line 439) | def _upgrade_rest_api(self,
class DeployedResources (line 452) | class DeployedResources(object):
method __init__ (line 453) | def __init__(self, deployed_values: Dict[str, Any]) -> None:
method empty (line 461) | def empty(cls) -> DeployedResources:
method resource_values (line 464) | def resource_values(self, name: str) -> Dict[str, Any]:
method resource_names (line 473) | def resource_names(self) -> List[str]:
FILE: chalice/deploy/appgraph.py
class ChaliceBuildError (line 17) | class ChaliceBuildError(Exception):
class ApplicationGraphBuilder (line 21) | class ApplicationGraphBuilder(object):
method __init__ (line 22) | def __init__(self) -> None:
method build (line 26) | def build(self, config: Config, stage_name: str) -> models.Application:
method _create_log_group (line 54) | def _create_log_group(
method _create_custom_domain_name (line 63) | def _create_custom_domain_name(
method _create_api_mapping_model (line 82) | def _create_api_mapping_model(
method _create_lambda_event_resources (line 93) | def _create_lambda_event_resources(
method _create_rest_api_model (line 157) | def _create_rest_api_model(
method _get_default_private_api_policy (line 234) | def _get_default_private_api_policy(self, config: Config) -> StrMapAny:
method _create_websocket_api_model (line 250) | def _create_websocket_api_model(
method _create_cwe_subscription (line 316) | def _create_cwe_subscription(
method _create_scheduled_model (line 345) | def _create_scheduled_model(
method _create_domain_name_model (line 389) | def _create_domain_name_model(
method _create_lambda_model (line 413) | def _create_lambda_model(
method _get_managed_lambda_layer (line 440) | def _get_managed_lambda_layer(
method _get_role_reference (line 457) | def _get_role_reference(
method _get_role_identifier (line 470) | def _get_role_identifier(self, role: models.IAMRole) -> str:
method _create_role_reference (line 478) | def _create_role_reference(
method _get_vpc_params (line 524) | def _get_vpc_params(
method _get_lambda_layers (line 542) | def _get_lambda_layers(self, config: Config) -> List[str]:
method _build_lambda_function (line 546) | def _build_lambda_function(
method _inject_role_traits (line 582) | def _inject_role_traits(
method _create_bucket_notification (line 593) | def _create_bucket_notification(
method _create_sns_subscription (line 618) | def _create_sns_subscription(
method _create_sqs_subscription (line 640) | def _create_sqs_subscription(
method _create_kinesis_subscription (line 671) | def _create_kinesis_subscription(
method _create_ddb_subscription (line 697) | def _create_ddb_subscription(
class DependencyBuilder (line 724) | class DependencyBuilder(object):
method __init__ (line 725) | def __init__(self) -> None:
method build_dependencies (line 728) | def build_dependencies(self, graph: models.Model) -> List[models.Model]:
method _traverse (line 735) | def _traverse(
class GraphPrettyPrint (line 752) | class GraphPrettyPrint(object):
method __init__ (line 757) | def __init__(self, ui: UI) -> None:
method display_graph (line 760) | def display_graph(self, graph: models.Model) -> None:
method _traverse (line 765) | def _traverse(self, graph: models.Model, level: int) -> None:
method _get_model_text (line 774) | def _get_model_text(
method _add_remaining_lines (line 791) | def _add_remaining_lines(
method _get_filtered_params (line 800) | def _get_filtered_params(self, model: models.Model) -> StrMapAny:
FILE: chalice/deploy/deployer.py
class ChaliceDeploymentError (line 146) | class ChaliceDeploymentError(Exception):
method __init__ (line 147) | def __init__(self, error):
method _get_error_location (line 162) | def _get_error_location(self, error):
method _get_error_message (line 176) | def _get_error_message(self, error):
method _get_error_message_for_connection_error (line 185) | def _get_error_message_for_connection_error(self, connection_error):
method _get_error_suggestion (line 208) | def _get_error_suggestion(self, error):
method _wrap_text (line 230) | def _wrap_text(self, text, indent=''):
method _get_verb_from_client_method (line 239) | def _get_verb_from_client_method(self, client_method_name):
method _get_mb (line 248) | def _get_mb(self, value):
function create_plan_only_deployer (line 253) | def create_plan_only_deployer(session, config, ui):
function create_default_deployer (line 259) | def create_default_deployer(session, config, ui):
function _create_deployer (line 264) | def _create_deployer(session, # type: Session
function create_build_stage (line 289) | def create_build_stage(osutils, ui, swagger_gen, config):
function create_deletion_deployer (line 339) | def create_deletion_deployer(client, ui):
class Deployer (line 352) | class Deployer(object):
method __init__ (line 355) | def __init__(self,
method deploy (line 373) | def deploy(self, config, chalice_stage_name):
method _deploy (line 380) | def _deploy(self, config, chalice_stage_name):
method _validate_config (line 405) | def _validate_config(self, config):
class BaseDeployStep (line 413) | class BaseDeployStep(object):
method handle (line 414) | def handle(self, config, resource):
class InjectDefaults (line 422) | class InjectDefaults(BaseDeployStep):
method __init__ (line 423) | def __init__(self, lambda_timeout=DEFAULT_LAMBDA_TIMEOUT,
method handle_lambdafunction (line 431) | def handle_lambdafunction(self, config, resource):
method handle_domainname (line 438) | def handle_domainname(self, config, resource):
class DeploymentPackager (line 445) | class DeploymentPackager(BaseDeployStep):
method __init__ (line 446) | def __init__(self, packager):
method handle_deploymentpackage (line 450) | def handle_deploymentpackage(self, config, resource):
class ManagedLayerDeploymentPackager (line 458) | class ManagedLayerDeploymentPackager(BaseDeployStep):
method __init__ (line 462) | def __init__(self,
method handle_lambdafunction (line 470) | def handle_lambdafunction(self, config, resource):
method handle_lambdalayer (line 486) | def handle_lambdalayer(self, config, resource):
class SwaggerBuilder (line 503) | class SwaggerBuilder(BaseDeployStep):
method __init__ (line 504) | def __init__(self, swagger_generator):
method handle_restapi (line 508) | def handle_restapi(self, config, resource):
class LambdaEventSourcePolicyInjector (line 515) | class LambdaEventSourcePolicyInjector(BaseDeployStep):
method __init__ (line 516) | def __init__(self):
method handle_sqseventsource (line 522) | def handle_sqseventsource(self, config, resource):
method handle_kinesiseventsource (line 539) | def handle_kinesiseventsource(self, config, resource):
method handle_dynamodbeventsource (line 551) | def handle_dynamodbeventsource(self, config, resource):
method _needs_policy_injected (line 563) | def _needs_policy_injected(self, role):
method _inject_trigger_policy (line 571) | def _inject_trigger_policy(self, document, policy):
class WebsocketPolicyInjector (line 576) | class WebsocketPolicyInjector(BaseDeployStep):
method __init__ (line 577) | def __init__(self):
method handle_websocketapi (line 581) | def handle_websocketapi(self, config, resource):
method _inject_into_function (line 587) | def _inject_into_function(self, config, lambda_function):
method _inject_policy (line 604) | def _inject_policy(self, document, policy):
class PolicyGenerator (line 609) | class PolicyGenerator(BaseDeployStep):
method __init__ (line 610) | def __init__(self, policy_gen, osutils):
method _read_document_from_file (line 615) | def _read_document_from_file(self, filename):
method handle_filebasediampolicy (line 623) | def handle_filebasediampolicy(self, config, resource):
method handle_restapi (line 627) | def handle_restapi(self, config, resource):
method handle_autogeniampolicy (line 634) | def handle_autogeniampolicy(self, config, resource):
class BuildStage (line 643) | class BuildStage(object):
method __init__ (line 644) | def __init__(self, steps):
method execute (line 648) | def execute(self, config, resources):
class ResultsRecorder (line 655) | class ResultsRecorder(object):
method __init__ (line 656) | def __init__(self, osutils):
method record_results (line 660) | def record_results(self, results, chalice_stage_name, project_dir):
class NoopResultsRecorder (line 676) | class NoopResultsRecorder(ResultsRecorder):
method record_results (line 677) | def record_results(self, results, chalice_stage_name, project_dir):
class DeploymentReporter (line 682) | class DeploymentReporter(object):
method __init__ (line 692) | def __init__(self, ui):
method generate_report (line 696) | def generate_report(self, deployed_values):
method _report_rest_api (line 711) | def _report_rest_api(self, resource, report):
method _report_websocket_api (line 715) | def _report_websocket_api(self, resource, report):
method _report_domain_name (line 720) | def _report_domain_name(self, resource, report):
method _report_lambda_function (line 730) | def _report_lambda_function(self, resource, report):
method _report_lambda_layer (line 734) | def _report_lambda_layer(self, resource, report):
method _default_report (line 739) | def _default_report(self, resource, report):
method display_report (line 745) | def display_report(self, deployed_values):
FILE: chalice/deploy/executor.py
class BaseExecutor (line 13) | class BaseExecutor(object):
method __init__ (line 14) | def __init__(self, client, ui):
method execute (line 20) | def execute(self, plan):
class Executor (line 25) | class Executor(BaseExecutor):
method __init__ (line 26) | def __init__(self, client, ui):
method execute (line 35) | def execute(self, plan):
method _default_handler (line 45) | def _default_handler(self, instruction):
method _do_apicall (line 51) | def _do_apicall(self, instruction):
method _do_copyvariable (line 59) | def _do_copyvariable(self, instruction):
method _do_storevalue (line 65) | def _do_storevalue(self, instruction):
method _do_storemultiplevalue (line 71) | def _do_storemultiplevalue(self, instruction):
method _do_recordresourcevariable (line 81) | def _do_recordresourcevariable(self, instruction):
method _do_recordresourcevalue (line 90) | def _do_recordresourcevalue(self, instruction):
method _add_to_deployed_values (line 99) | def _add_to_deployed_values(self, payload):
method _do_jpsearch (line 110) | def _do_jpsearch(self, instruction):
method _do_builtinfunction (line 116) | def _do_builtinfunction(self, instruction):
method _resolve_variables (line 160) | def _resolve_variables(self, api_call):
class VariableResolver (line 170) | class VariableResolver(object):
method resolve_variables (line 171) | def resolve_variables(self, value, variables):
method _resolve_variable (line 182) | def _resolve_variable(self, value, variables):
method _resolve_stringformat (line 186) | def _resolve_stringformat(self, value, variables):
method _resolve_keydatavariable (line 191) | def _resolve_keydatavariable(self, value, variables):
method _resolve_placeholder (line 195) | def _resolve_placeholder(self, value, variables):
method _resolve_dict (line 201) | def _resolve_dict(self, value, variables):
method _resolve_list (line 212) | def _resolve_list(self, value, variables):
class DisplayOnlyExecutor (line 223) | class DisplayOnlyExecutor(BaseExecutor):
method execute (line 228) | def execute(self, plan):
method _write_spillover (line 238) | def _write_spillover(self, spillover_values):
method _default_handler (line 248) | def _default_handler(self, instruction, spillover_values):
method _format_dict (line 267) | def _format_dict(self, dict_value, spillover_values):
method _upper_snake_case (line 289) | def _upper_snake_case(self, v):
class UnresolvedValueError (line 298) | class UnresolvedValueError(Exception):
method __init__ (line 304) | def __init__(self, key, value, method_name):
method __str__ (line 311) | def __str__(self):
FILE: chalice/deploy/models.py
class Placeholder (line 9) | class Placeholder(enum.Enum):
class Instruction (line 13) | class Instruction(object):
class RoleTraits (line 17) | class RoleTraits(enum.Enum):
class APIType (line 21) | class APIType(enum.Enum):
class TLSVersion (line 26) | class TLSVersion(enum.Enum):
method create (line 32) | def create(cls, str_version: str) -> Opt[TLSVersion]:
class Plan (line 45) | class Plan:
class APICall (line 51) | class APICall(Instruction):
class StoreValue (line 58) | class StoreValue(Instruction):
class StoreMultipleValue (line 64) | class StoreMultipleValue(Instruction):
class CopyVariable (line 70) | class CopyVariable(Instruction):
class CopyVariableFromDict (line 76) | class CopyVariableFromDict(Instruction):
class RecordResource (line 83) | class RecordResource(Instruction):
class RecordResourceVariable (line 90) | class RecordResourceVariable(RecordResource):
class RecordResourceValue (line 95) | class RecordResourceValue(RecordResource):
class JPSearch (line 100) | class JPSearch(Instruction):
class BuiltinFunction (line 107) | class BuiltinFunction(Instruction):
class Model (line 114) | class Model(object):
method dependencies (line 115) | def dependencies(self) -> List[Model]:
class ManagedModel (line 120) | class ManagedModel(Model):
class Application (line 127) | class Application(Model):
method dependencies (line 131) | def dependencies(self) -> List[Model]:
class DeploymentPackage (line 136) | class DeploymentPackage(Model):
class IAMPolicy (line 141) | class IAMPolicy(Model):
class FileBasedIAMPolicy (line 146) | class FileBasedIAMPolicy(IAMPolicy):
class AutoGenIAMPolicy (line 151) | class AutoGenIAMPolicy(IAMPolicy):
class IAMRole (line 156) | class IAMRole(Model):
class PreCreatedIAMRole (line 161) | class PreCreatedIAMRole(IAMRole):
class ManagedIAMRole (line 166) | class ManagedIAMRole(IAMRole, ManagedModel):
method dependencies (line 172) | def dependencies(self) -> List[Model]:
class LambdaLayer (line 177) | class LambdaLayer(ManagedModel):
method dependencies (line 184) | def dependencies(self) -> List[Model]:
class LambdaFunction (line 189) | class LambdaFunction(ManagedModel):
method dependencies (line 209) | def dependencies(self) -> List[Model]:
class FunctionEventSubscriber (line 220) | class FunctionEventSubscriber(ManagedModel):
method dependencies (line 223) | def dependencies(self) -> List[Model]:
class CloudWatchEventBase (line 228) | class CloudWatchEventBase(FunctionEventSubscriber):
class CloudWatchEvent (line 233) | class CloudWatchEvent(CloudWatchEventBase):
class ScheduledEvent (line 239) | class ScheduledEvent(CloudWatchEventBase):
class LogGroup (line 246) | class LogGroup(ManagedModel):
class APIMapping (line 253) | class APIMapping(ManagedModel):
class DomainName (line 260) | class DomainName(ManagedModel):
method dependencies (line 269) | def dependencies(self) -> List[Model]:
class RestAPI (line 274) | class RestAPI(ManagedModel):
method dependencies (line 287) | def dependencies(self) -> List[Model]:
class WebsocketAPI (line 296) | class WebsocketAPI(ManagedModel):
method dependencies (line 306) | def dependencies(self) -> List[Model]:
class S3BucketNotification (line 320) | class S3BucketNotification(FunctionEventSubscriber):
class SNSLambdaSubscription (line 329) | class SNSLambdaSubscription(FunctionEventSubscriber):
class QueueARN (line 335) | class QueueARN(object):
method queue_name (line 339) | def queue_name(self) -> str:
class SQSEventSource (line 346) | class SQSEventSource(FunctionEventSubscriber):
class KinesisEventSource (line 355) | class KinesisEventSource(FunctionEventSubscriber):
class DynamoDBEventSource (line 364) | class DynamoDBEventSource(FunctionEventSubscriber):
FILE: chalice/deploy/packager.py
class InvalidSourceDistributionNameError (line 37) | class InvalidSourceDistributionNameError(Exception):
class MissingDependencyError (line 41) | class MissingDependencyError(Exception):
method __init__ (line 44) | def __init__(self, missing: Set[Package]) -> None:
class NoSuchPackageError (line 48) | class NoSuchPackageError(Exception):
method __init__ (line 51) | def __init__(self, package_name: str) -> None:
class PackageDownloadError (line 57) | class PackageDownloadError(Exception):
class EmptyPackageError (line 61) | class EmptyPackageError(Exception):
class UnsupportedPackageError (line 65) | class UnsupportedPackageError(Exception):
method __init__ (line 68) | def __init__(self, package_name: str) -> None:
class BaseLambdaDeploymentPackager (line 74) | class BaseLambdaDeploymentPackager(object):
method __init__ (line 86) | def __init__(
method create_deployment_package (line 93) | def create_deployment_package(
method _get_requirements_filename (line 98) | def _get_requirements_filename(self, project_dir: str) -> str:
method _add_vendor_files (line 102) | def _add_vendor_files(
method deployment_package_filename (line 118) | def deployment_package_filename(
method _deployment_package_filename (line 131) | def _deployment_package_filename(
method _add_py_deps (line 146) | def _add_py_deps(
method _add_app_files (line 162) | def _add_app_files(self, zip_fileobj: ZipFile, project_dir: str) -> None:
method _iter_app_filenames (line 166) | def _iter_app_filenames(
method _hash_project_dir (line 181) | def _hash_project_dir(
method _hash_vendor_dir (line 203) | def _hash_vendor_dir(self, vendor_dir: str, md5: Any) -> None:
method inject_latest_app (line 223) | def inject_latest_app(
method _needs_latest_version (line 262) | def _needs_latest_version(self, filename: str) -> bool:
method _iter_chalice_lib_if_needed (line 267) | def _iter_chalice_lib_if_needed(
method _create_output_dir_if_needed (line 280) | def _create_output_dir_if_needed(self, package_filename: str) -> None:
method _build_python_dependencies (line 287) | def _build_python_dependencies(
class LambdaDeploymentPackager (line 303) | class LambdaDeploymentPackager(BaseLambdaDeploymentPackager):
method create_deployment_package (line 304) | def create_deployment_package(
class AppOnlyDeploymentPackager (line 335) | class AppOnlyDeploymentPackager(BaseLambdaDeploymentPackager):
method create_deployment_package (line 336) | def create_deployment_package(
method deployment_package_filename (line 355) | def deployment_package_filename(
method _deployment_package_filename (line 362) | def _deployment_package_filename(
class LayerDeploymentPackager (line 379) | class LayerDeploymentPackager(BaseLambdaDeploymentPackager):
method create_deployment_package (line 386) | def create_deployment_package(
method _check_valid_package (line 421) | def _check_valid_package(self, package_filename: str) -> None:
method deployment_package_filename (line 441) | def deployment_package_filename(
method _deployment_package_filename (line 448) | def _deployment_package_filename(
class DependencyBuilder (line 473) | class DependencyBuilder(object):
method __init__ (line 515) | def __init__(
method _is_compatible_wheel_filename (line 523) | def _is_compatible_wheel_filename(
method _is_compatible_platform_tag (line 548) | def _is_compatible_platform_tag(
method _iter_all_compatibility_tags (line 584) | def _iter_all_compatibility_tags(
method _has_at_least_one_package (line 603) | def _has_at_least_one_package(self, filename: str) -> bool:
method _download_all_dependencies (line 617) | def _download_all_dependencies(
method _download_binary_wheels (line 633) | def _download_binary_wheels(
method _download_sdists (line 642) | def _download_sdists(self, packages: Set[Package], directory: str) -> ...
method _find_sdists (line 648) | def _find_sdists(self, directory: str) -> Set[Package]:
method _build_sdists (line 658) | def _build_sdists(
method _categorize_wheel_files (line 670) | def _categorize_wheel_files(
method _categorize_deps (line 687) | def _categorize_deps(self, abi: str, deps: Set[Package]) -> Any:
method _download_dependencies (line 701) | def _download_dependencies(
method _apply_wheel_whitelist (line 810) | def _apply_wheel_whitelist(
method _install_purelib_and_platlib (line 824) | def _install_purelib_and_platlib(self, wheel: Package, root: str) -> N...
method _install_wheels (line 847) | def _install_wheels(
method build_site_packages (line 858) | def build_site_packages(
class Package (line 871) | class Package(object):
method __init__ (line 874) | def __init__(
method name (line 886) | def name(self) -> str:
method data_dir (line 890) | def data_dir(self) -> str:
method matches_data_dir (line 894) | def matches_data_dir(self, dirname: str) -> bool:
method identifier (line 908) | def identifier(self) -> str:
method __str__ (line 911) | def __str__(self) -> str:
method __repr__ (line 914) | def __repr__(self) -> str:
method __eq__ (line 917) | def __eq__(self, other: Any) -> bool:
method __hash__ (line 922) | def __hash__(self) -> int:
method _calculate_name_and_version (line 925) | def _calculate_name_and_version(self) -> Tuple[str, str]:
method _normalize_name (line 940) | def _normalize_name(self, name: str) -> str:
class SDistMetadataFetcher (line 945) | class SDistMetadataFetcher(object):
method __init__ (line 957) | def __init__(self, osutils: Optional[OSUtils] = None) -> None:
method _parse_pkg_info_file (line 962) | def _parse_pkg_info_file(self, filepath: str) -> Message:
method _get_pkg_info_filepath (line 971) | def _get_pkg_info_filepath(self, package_dir: str) -> str:
method _unpack_sdist_into_dir (line 1018) | def _unpack_sdist_into_dir(self, sdist_path: str, unpack_dir: str) -> ...
method get_package_name_and_version (line 1029) | def get_package_name_and_version(self, sdist_path: str) -> Tuple[str, ...
class SubprocessPip (line 1039) | class SubprocessPip(object):
method __init__ (line 1042) | def __init__(
method main (line 1052) | def main(
class PipRunner (line 1080) | class PipRunner(object):
method __init__ (line 1087) | def __init__(
method _execute (line 1095) | def _execute(
method build_wheel (line 1110) | def build_wheel(
method download_all_dependencies (line 1125) | def download_all_dependencies(
method download_manylinux_wheels (line 1164) | def download_manylinux_wheels(
method download_sdists (line 1192) | def download_sdists(self, packages: List[str], directory: str) -> None:
FILE: chalice/deploy/planner.py
class RemoteState (line 21) | class RemoteState(object):
method __init__ (line 22) | def __init__(self, client, deployed_resources):
method _cache_key (line 28) | def _cache_key(self, resource):
method resource_deployed_values (line 38) | def resource_deployed_values(self, resource):
method _dynamically_lookup_values (line 46) | def _dynamically_lookup_values(self, resource):
method resource_exists (line 59) | def resource_exists(self, resource, *args):
method _resource_exists_snslambdasubscription (line 74) | def _resource_exists_snslambdasubscription(self, resource):
method _resource_exists_sqseventsource (line 87) | def _resource_exists_sqseventsource(self, resource):
method _resource_exists_kinesiseventsource (line 105) | def _resource_exists_kinesiseventsource(self, resource):
method _resource_exists_dynamodbeventsource (line 119) | def _resource_exists_dynamodbeventsource(self, resource):
method _resource_exists_lambdalayer (line 132) | def _resource_exists_lambdalayer(self, resource):
method _resource_exists_loggroup (line 142) | def _resource_exists_loggroup(self, resource):
method _resource_exists_lambdafunction (line 146) | def _resource_exists_lambdafunction(self, resource):
method _resource_exists_managediamrole (line 150) | def _resource_exists_managediamrole(self, resource):
method _resource_exists_apimapping (line 158) | def _resource_exists_apimapping(self, resource, domain_name):
method _resource_exists_domainname (line 168) | def _resource_exists_domainname(self, resource):
method _resource_exists_restapi (line 175) | def _resource_exists_restapi(self, resource):
method _resource_exists_websocketapi (line 185) | def _resource_exists_websocketapi(self, resource):
class PlanStage (line 196) | class PlanStage(object):
method __init__ (line 197) | def __init__(self, remote_state, osutils):
method execute (line 202) | def execute(self, resources):
method _add_result_to_plan (line 215) | def _add_result_to_plan(self,
method _add_apimapping_plan (line 233) | def _add_apimapping_plan(self,
method _add_domainname_plan (line 307) | def _add_domainname_plan(self, resource, endpoint_type):
method _plan_lambdalayer (line 396) | def _plan_lambdalayer(self, resource):
method _plan_lambdafunction (line 438) | def _plan_lambdafunction(self, resource):
method _plan_managediamrole (line 549) | def _plan_managediamrole(self, resource):
method _plan_snslambdasubscription (line 627) | def _plan_snslambdasubscription(self, resource):
method _plan_sqseventsource (line 698) | def _plan_sqseventsource(self, resource):
method _plan_kinesiseventsource (line 772) | def _plan_kinesiseventsource(self, resource):
method _plan_loggroup (line 831) | def _plan_loggroup(self, resource):
method _plan_dynamodbeventsource (line 866) | def _plan_dynamodbeventsource(self, resource):
method _arn_parse_instructions (line 912) | def _arn_parse_instructions(self, function_arn):
method _plan_s3bucketnotification (line 926) | def _plan_s3bucketnotification(self, resource):
method _create_cloudwatchevent (line 962) | def _create_cloudwatchevent(self, resource):
method _plan_cloudwatchevent (line 1006) | def _plan_cloudwatchevent(self, resource):
method _plan_scheduledevent (line 1010) | def _plan_scheduledevent(self, resource):
method _create_websocket_function_configs (line 1014) | def _create_websocket_function_configs(self, resource):
method _create_websocket_function_config (line 1028) | def _create_websocket_function_config(self, function):
method _inject_websocket_integrations (line 1038) | def _inject_websocket_integrations(self, configs):
method _create_route_for_key (line 1068) | def _create_route_for_key(self, route_key):
method _plan_websocketapi (line 1083) | def _plan_websocketapi(self, resource):
method _plan_restapi (line 1222) | def _plan_restapi(self, resource):
method _add_custom_domain_plan (line 1356) | def _add_custom_domain_plan(self, resource, endpoint_type):
method _get_role_arn (line 1369) | def _get_role_arn(self, resource):
method _batch_record_resource (line 1378) | def _batch_record_resource(self, resource_type, resource_name,
class NoopPlanner (line 1407) | class NoopPlanner(PlanStage):
method __init__ (line 1408) | def __init__(self):
method execute (line 1412) | def execute(self, resources):
class Variable (line 1417) | class Variable(object):
method __init__ (line 1418) | def __init__(self, name):
method __repr__ (line 1422) | def __repr__(self):
method __eq__ (line 1426) | def __eq__(self, other):
class StringFormat (line 1431) | class StringFormat(object):
method __init__ (line 1432) | def __init__(self, template, variables):
method __repr__ (line 1437) | def __repr__(self):
method __eq__ (line 1441) | def __eq__(self, other):
class PlanEncoder (line 1450) | class PlanEncoder(json.JSONEncoder):
method default (line 1453) | def default(self, o): # pylint: disable=E0202
class KeyDataVariable (line 1460) | class KeyDataVariable(object):
method __init__ (line 1461) | def __init__(self, name, key):
method __repr__ (line 1466) | def __repr__(self):
method __eq__ (line 1470) | def __eq__(self, other):
FILE: chalice/deploy/swagger.py
class SwaggerGenerator (line 13) | class SwaggerGenerator(object):
method __init__ (line 31) | def __init__(self, region, deployed_resources):
method generate_swagger (line 36) | def generate_swagger(self, app, rest_api=None):
method _add_resource_policy (line 46) | def _add_resource_policy(self, api, rest_api):
method _add_vpc_endpoint (line 51) | def _add_vpc_endpoint(self, api, rest_api):
method _add_binary_types (line 58) | def _add_binary_types(self, api, app):
method _add_route_paths (line 62) | def _add_route_paths(self, api, app):
method _generate_security_from_auth_obj (line 87) | def _generate_security_from_auth_obj(self, api_config, authorizer):
method _auth_uri (line 113) | def _auth_uri(self, authorizer):
method _add_to_security_definition (line 122) | def _add_to_security_definition(self, security,
method _generate_route_method (line 139) | def _generate_route_method(self, view):
method _generate_precanned_responses (line 167) | def _generate_precanned_responses(self):
method _uri (line 179) | def _uri(self, lambda_arn=None):
method _generate_apig_integ (line 189) | def _generate_apig_integ(self, view):
method _add_view_args (line 205) | def _add_view_args(self, single_method, view_args):
method _add_preflight_request (line 212) | def _add_preflight_request(self, cors, methods, swagger_for_path):
class CFNSwaggerGenerator (line 254) | class CFNSwaggerGenerator(SwaggerGenerator):
method __init__ (line 255) | def __init__(self):
method _uri (line 259) | def _uri(self, lambda_arn=None):
method _auth_uri (line 269) | def _auth_uri(self, authorizer):
class TemplatedSwaggerGenerator (line 281) | class TemplatedSwaggerGenerator(SwaggerGenerator):
method __init__ (line 282) | def __init__(self):
method _uri (line 286) | def _uri(self, lambda_arn=None):
method _auth_uri (line 294) | def _auth_uri(self, authorizer):
class TerraformSwaggerGenerator (line 304) | class TerraformSwaggerGenerator(SwaggerGenerator):
method __init__ (line 306) | def __init__(self):
method _uri (line 310) | def _uri(self, lambda_arn=None):
method _auth_uri (line 314) | def _auth_uri(self, authorizer):
FILE: chalice/deploy/sweeper.py
class ResourceSweeper (line 23) | class ResourceSweeper(object):
method __init__ (line 34) | def __init__(self):
method execute (line 39) | def execute(self, plan, config):
method _determine_sns_event (line 49) | def _determine_sns_event(self, name, resource_values):
method _determine_s3_event (line 60) | def _determine_s3_event(self, name, resource_values):
method _determine_sqs_event (line 78) | def _determine_sqs_event(self, name, resource_values):
method _determine_kinesis_event (line 89) | def _determine_kinesis_event(self, name, resource_values):
method _determine_dynamodb_event (line 100) | def _determine_dynamodb_event(self, name, resource_values):
method _determine_domain_name (line 111) | def _determine_domain_name(self, name, resource_values):
method _determine_remaining (line 146) | def _determine_remaining(self, deployed):
method _mark_resources (line 166) | def _mark_resources(self):
method _delete_domain_name (line 175) | def _delete_domain_name(self,
method _delete_api_mapping (line 193) | def _delete_api_mapping(self,
method _delete_lambda_function (line 220) | def _delete_lambda_function(self,
method _delete_log_group (line 235) | def _delete_log_group(self,
method _delete_lambda_layer (line 251) | def _delete_lambda_layer(self, resource_values):
method _delete_iam_role (line 265) | def _delete_iam_role(self, resource_values):
method _delete_cloudwatch_event (line 277) | def _delete_cloudwatch_event(self, resource_values):
method _delete_rest_api (line 288) | def _delete_rest_api(self, resource_values):
method _delete_s3_event (line 301) | def _delete_s3_event(self, resource_values):
method _delete_sns_event (line 323) | def _delete_sns_event(self, resource_values):
method _delete_sqs_event (line 342) | def _delete_sqs_event(self, resource_values):
method _delete_kinesis_event (line 353) | def _delete_kinesis_event(self, resource_values):
method _delete_dynamodb_event (line 364) | def _delete_dynamodb_event(self, resource_values):
method _delete_websocket_api (line 375) | def _delete_websocket_api(self, resource_values):
method _default_delete (line 390) | def _default_delete(self, *resource_values):
method _update_plan (line 396) | def _update_plan(self, instructions, message=None, insert=False):
method _delete_domain_api_mappings (line 413) | def _delete_domain_api_mappings(self, resource_values, name):
method _plan_deletion (line 430) | def _plan_deletion(self,
FILE: chalice/deploy/validate.py
class ExperimentalFeatureError (line 14) | class ExperimentalFeatureError(Exception):
method __init__ (line 15) | def __init__(self, features_missing_opt_in):
method _generate_msg (line 21) | def _generate_msg(self, missing_features):
function validate_configuration (line 31) | def validate_configuration(config):
function validate_resource_policy (line 55) | def validate_resource_policy(config):
function validate_endpoint_type (line 76) | def validate_endpoint_type(config):
function validate_feature_flags (line 87) | def validate_feature_flags(chalice_app):
function validate_routes (line 98) | def validate_routes(routes):
function validate_python_version (line 114) | def validate_python_version(config, actual_py_version=None):
function validate_route_content_types (line 140) | def validate_route_content_types(routes, binary_types):
function _validate_entry_content_type (line 147) | def _validate_entry_content_type(route_entry, binary_types):
function _validate_cors_for_route (line 163) | def _validate_cors_for_route(route_url, route_methods):
function validate_minimum_compression_size (line 189) | def validate_minimum_compression_size(config):
function _validate_manage_iam_role (line 202) | def _validate_manage_iam_role(config):
function validate_unique_function_names (line 218) | def validate_unique_function_names(config):
function _get_all_function_names (line 229) | def _get_all_function_names(chalice_app):
function validate_sqs_configuration (line 239) | def validate_sqs_configuration(chalice_app):
function _is_valid_queue_name (line 251) | def _is_valid_queue_name(queue_name, queue_arn):
function validate_environment_variables_type (line 265) | def validate_environment_variables_type(config):
function _validate_environment_variables (line 273) | def _validate_environment_variables(environment_variables):
FILE: chalice/invoke.py
function _response_is_error (line 17) | def _response_is_error(response):
class UnhandledLambdaError (line 22) | class UnhandledLambdaError(Exception):
class LambdaInvokeHandler (line 26) | class LambdaInvokeHandler(object):
method __init__ (line 33) | def __init__(self, invoker, formatter, ui):
method invoke (line 39) | def invoke(self, payload=None):
class LambdaInvoker (line 49) | class LambdaInvoker(object):
method __init__ (line 50) | def __init__(self, lambda_arn, client):
method invoke (line 55) | def invoke(self, payload=None):
class LambdaResponseFormatter (line 63) | class LambdaResponseFormatter(object):
method format_response (line 68) | def format_response(self, response):
method _format_error (line 78) | def _format_error(self, formatted, payload):
method _format_stacktrace (line 93) | def _format_stacktrace(self, formatted, stack_trace):
method _format_frame (line 99) | def _format_frame(self, formatted, frame):
method _format_success (line 116) | def _format_success(self, formatted, payload):
FILE: chalice/local.py
class Clock (line 53) | class Clock(object):
method time (line 54) | def time(self) -> float:
function create_local_server (line 58) | def create_local_server(app_obj: Chalice,
class LocalARNBuilder (line 66) | class LocalARNBuilder(object):
method build_arn (line 74) | def build_arn(self, method: str, path: str) -> str:
class ARNMatcher (line 92) | class ARNMatcher(object):
method __init__ (line 93) | def __init__(self, target_arn: str) -> None:
method _resource_match (line 96) | def _resource_match(self, resource: str) -> bool:
method does_any_resource_match (line 107) | def does_any_resource_match(self, resources: List[str]) -> bool:
class RouteMatcher (line 114) | class RouteMatcher(object):
method __init__ (line 115) | def __init__(self, route_urls: List[str]) -> None:
method match_route (line 122) | def match_route(self, url: str) -> MatchResult:
class LambdaEventConverter (line 157) | class LambdaEventConverter(object):
method __init__ (line 162) | def __init__(self, route_matcher: RouteMatcher,
method _is_binary (line 169) | def _is_binary(self, headers: Dict[str, Any]) -> bool:
method create_lambda_event (line 172) | def create_lambda_event(self,
class LocalGatewayException (line 205) | class LocalGatewayException(Exception):
method __init__ (line 208) | def __init__(self,
class InvalidAuthorizerError (line 215) | class InvalidAuthorizerError(LocalGatewayException):
class ForbiddenError (line 219) | class ForbiddenError(LocalGatewayException):
class NotAuthorizedError (line 223) | class NotAuthorizedError(LocalGatewayException):
class LambdaContext (line 227) | class LambdaContext(object):
method __init__ (line 228) | def __init__(self, function_name: str, memory_size: int,
method _current_time_millis (line 287) | def _current_time_millis(self) -> float:
method get_remaining_time_in_millis (line 290) | def get_remaining_time_in_millis(self) -> float:
class LocalGatewayAuthorizer (line 298) | class LocalGatewayAuthorizer(object):
method __init__ (line 300) | def __init__(self, app_object: Chalice) -> None:
method authorize (line 304) | def authorize(self,
method _check_can_invoke_view_function (line 376) | def _check_can_invoke_view_function(self,
method _route_for_event (line 392) | def _route_for_event(self,
method _update_lambda_event (line 409) | def _update_lambda_event(self, lambda_event: EventType,
method _prepare_authorizer_event (line 418) | def _prepare_authorizer_event(self, arn: str,
method _decode_jwt_payload (line 435) | def _decode_jwt_payload(self, jwt: str) -> Dict:
method _base64_pad (line 440) | def _base64_pad(self, value: str) -> str:
class LocalGateway (line 447) | class LocalGateway(object):
method __init__ (line 452) | def __init__(self, app_object: Chalice, config: Config) -> None:
method _generate_lambda_context (line 461) | def _generate_lambda_context(self) -> LambdaContext:
method _generate_lambda_event (line 472) | def _generate_lambda_event(self,
method _has_user_defined_options_method (line 483) | def _has_user_defined_options_method(self,
method handle_request (line 488) | def handle_request(self,
method _autogen_options_headers (line 549) | def _autogen_options_headers(self, lambda_event: EventType) -> HeaderT...
class ChaliceRequestHandler (line 581) | class ChaliceRequestHandler(BaseHTTPRequestHandler):
method __init__ (line 585) | def __init__(self,
method _parse_payload (line 595) | def _parse_payload(self) -> Tuple[HeaderType, Optional[bytes]]:
method _generic_handle (line 603) | def _generic_handle(self) -> None:
method _handle_binary (line 621) | def _handle_binary(self, response: Dict[str, Any]) -> Dict[str, Any]:
method _send_error_response (line 627) | def _send_error_response(self, error: LocalGatewayException) -> None:
method _send_http_response (line 633) | def _send_http_response(self,
method _send_http_response_with_body (line 642) | def _send_http_response_with_body(self,
method _send_http_response_no_body (line 659) | def _send_http_response_no_body(self,
method _send_headers (line 666) | def _send_headers(self, headers: HeaderType) -> None:
class ThreadedHTTPServer (line 676) | class ThreadedHTTPServer(ThreadingMixIn, HTTPServer):
class LocalDevServer (line 689) | class LocalDevServer(object):
method __init__ (line 690) | def __init__(self,
method handle_single_request (line 702) | def handle_single_request(self) -> None:
method serve_forever (line 705) | def serve_forever(self) -> None:
method shutdown (line 709) | def shutdown(self) -> None:
class HTTPServerThread (line 715) | class HTTPServerThread(threading.Thread):
method __init__ (line 723) | def __init__(self, server_factory: Callable[[], LocalDevServer]) -> None:
method run (line 729) | def run(self) -> None:
method shutdown (line 733) | def shutdown(self) -> None:
class LocalChalice (line 738) | class LocalChalice(Chalice):
method current_request (line 748) | def current_request(self) -> Request: # type: ignore
method current_request (line 752) | def current_request(self, value: Request) -> None: # type: ignore
class CustomLocalChalice (line 756) | class CustomLocalChalice(LocalChalice):
FILE: chalice/logs.py
class LogRetrieveOptions (line 21) | class LogRetrieveOptions(object):
method create (line 27) | def create(
function display_logs (line 46) | def display_logs(
class LogRetriever (line 63) | class LogRetriever(object):
method __init__ (line 64) | def __init__(
method create_from_lambda_arn (line 71) | def create_from_lambda_arn(
method _is_lambda_message (line 89) | def _is_lambda_message(self, event: CWLogEvent) -> bool:
method retrieve_logs (line 105) | def retrieve_logs(
class BaseLogEventGenerator (line 155) | class BaseLogEventGenerator(object):
method __init__ (line 156) | def __init__(self, client: TypedAWSClient) -> None:
method iter_log_events (line 159) | def iter_log_events(
class LogEventGenerator (line 165) | class LogEventGenerator(BaseLogEventGenerator):
method iter_log_events (line 166) | def iter_log_events(
class FollowLogEventGenerator (line 175) | class FollowLogEventGenerator(BaseLogEventGenerator):
method __init__ (line 179) | def __init__(
method iter_log_events (line 190) | def iter_log_events(
method _loop_on_filter_log_events (line 201) | def _loop_on_filter_log_events(
method _in_cache (line 240) | def _in_cache(self, event: CWLogEvent) -> bool:
method _add_to_cache (line 243) | def _add_to_cache(self, event: CWLogEvent) -> None:
method _prune_old_cache_entries (line 246) | def _prune_old_cache_entries(self, timestamp: datetime) -> None:
FILE: chalice/package.py
function create_app_packager (line 30) | def create_app_packager(
class UnsupportedFeatureError (line 80) | class UnsupportedFeatureError(Exception):
class DuplicateResourceNameError (line 84) | class DuplicateResourceNameError(Exception):
class PackageOptions (line 88) | class PackageOptions(object):
method __init__ (line 89) | def __init__(self, client):
method service_principal (line 93) | def service_principal(self, service):
class ResourceBuilder (line 102) | class ResourceBuilder(object):
method __init__ (line 103) | def __init__(self,
method construct_resources (line 113) | def construct_resources(self, config, chalice_stage_name):
class TemplateGenerator (line 125) | class TemplateGenerator(object):
method __init__ (line 128) | def __init__(self, config, options):
method dispatch (line 133) | def dispatch(self, resource, template):
method generate (line 139) | def generate(self, resources):
method _generate_filebasediampolicy (line 143) | def _generate_filebasediampolicy(self, resource, template):
method _generate_autogeniampolicy (line 147) | def _generate_autogeniampolicy(self, resource, template):
method _generate_deploymentpackage (line 151) | def _generate_deploymentpackage(self, resource, template):
method _generate_precreatediamrole (line 155) | def _generate_precreatediamrole(self, resource, template):
method _default (line 159) | def _default(self, resource, template):
class SAMTemplateGenerator (line 164) | class SAMTemplateGenerator(TemplateGenerator):
method __init__ (line 174) | def __init__(self, config, options):
method generate (line 180) | def generate(self, resources):
method _generate_lambdalayer (line 188) | def _generate_lambdalayer(self, resource, template):
method _generate_scheduledevent (line 202) | def _generate_scheduledevent(self, resource, template):
method _generate_cloudwatchevent (line 218) | def _generate_cloudwatchevent(self, resource, template):
method _generate_lambdafunction (line 236) | def _generate_lambdafunction(self, resource, template):
method _add_iam_role (line 303) | def _add_iam_role(self, resource, cfn_resource):
method _generate_loggroup (line 318) | def _generate_loggroup(self, resource, template):
method _generate_restapi (line 323) | def _generate_restapi(self, resource, template):
method _inject_restapi_outputs (line 379) | def _inject_restapi_outputs(self, template):
method _add_websocket_lambda_integration (line 413) | def _add_websocket_lambda_integration(
method _add_websocket_lambda_invoke_permission (line 438) | def _add_websocket_lambda_invoke_permission(
method _add_websocket_lambda_integrations (line 458) | def _add_websocket_lambda_integrations(self, api_ref, resources):
method _create_route_for_key (line 472) | def _create_route_for_key(self, route_key, api_ref):
method _generate_websocketapi (line 496) | def _generate_websocketapi(self, resource, template):
method _inject_websocketapi_outputs (line 538) | def _inject_websocketapi_outputs(self, template):
method _generate_managediamrole (line 593) | def _generate_managediamrole(self, resource, template):
method _generate_s3bucketnotification (line 610) | def _generate_s3bucketnotification(self, resource, template):
method _generate_snslambdasubscription (line 620) | def _generate_snslambdasubscription(self, resource, template):
method _generate_sqseventsource (line 647) | def _generate_sqseventsource(self, resource, template):
method _generate_kinesiseventsource (line 679) | def _generate_kinesiseventsource(self, resource, template):
method _generate_dynamodbeventsource (line 706) | def _generate_dynamodbeventsource(self, resource, template):
method _generate_apimapping (line 727) | def _generate_apimapping(self, resource, template):
method _generate_domainname (line 731) | def _generate_domainname(self, resource, template):
method _add_domain_name (line 735) | def _add_domain_name(self, resource, template):
method _add_websocket_domain_name (line 773) | def _add_websocket_domain_name(self, resource, template):
method _register_cfn_resource_name (line 802) | def _register_cfn_resource_name(self, name):
class TerraformGenerator (line 814) | class TerraformGenerator(TemplateGenerator):
method __init__ (line 817) | def __init__(self, config, options):
method generate (line 822) | def generate(self, resources):
method _fref (line 853) | def _fref(self, lambda_function, attr='arn'):
method _arnref (line 858) | def _arnref(self, arn_template, **kw):
method _generate_managediamrole (line 867) | def _generate_managediamrole(self, resource, template):
method _add_websocket_lambda_integration (line 886) | def _add_websocket_lambda_integration(
method _add_websocket_lambda_invoke_permission (line 909) | def _add_websocket_lambda_invoke_permission(
method _add_websockets_route (line 929) | def _add_websockets_route(self, websocket_api_id, route_key, template):
method _add_websocket_domain_name (line 955) | def _add_websocket_domain_name(self, websocket_api_id, resource, templ...
method _inject_websocketapi_outputs (line 985) | def _inject_websocketapi_outputs(self, websocket_api_id, template):
method _generate_websocketapi (line 1028) | def _generate_websocketapi(self, resource, template):
method _generate_s3bucketnotification (line 1083) | def _generate_s3bucketnotification(self, resource, template):
method _generate_sqseventsource (line 1121) | def _generate_sqseventsource(self, resource, template):
method _generate_kinesiseventsource (line 1146) | def _generate_kinesiseventsource(self, resource, template):
method _generate_dynamodbeventsource (line 1161) | def _generate_dynamodbeventsource(self, resource, template):
method _generate_snslambdasubscription (line 1173) | def _generate_snslambdasubscription(self, resource, template):
method _generate_cloudwatchevent (line 1197) | def _generate_cloudwatchevent(self, resource, template):
method _generate_scheduledevent (line 1208) | def _generate_scheduledevent(self, resource, template):
method _cwe_helper (line 1220) | def _cwe_helper(self, resource, template):
method _generate_lambdalayer (line 1240) | def _generate_lambdalayer(self, resource, template):
method _generate_lambdafunction (line 1251) | def _generate_lambdafunction(self, resource, template):
method _generate_log_group (line 1309) | def _generate_log_group(self, resource, remplate):
method _generate_restapi (line 1314) | def _generate_restapi(self, resource, template):
method _add_domain_name (line 1394) | def _add_domain_name(self, resource, template):
method _add_domain_name_outputs (line 1427) | def _add_domain_name_outputs(self, domain_resource_name,
method _generate_apimapping (line 1446) | def _generate_apimapping(self, resource, template):
method _generate_domainname (line 1450) | def _generate_domainname(self, resource, template):
class AppPackager (line 1455) | class AppPackager(object):
method __init__ (line 1456) | def __init__(self,
method _to_json (line 1470) | def _to_json(self, doc):
method _to_yaml (line 1474) | def _to_yaml(self, doc):
method package_app (line 1478) | def package_app(self, config, outdir, chalice_stage_name):
class TemplatePostProcessor (line 1500) | class TemplatePostProcessor(object):
method __init__ (line 1501) | def __init__(self, osutils):
method process (line 1505) | def process(self, template, config, outdir, chalice_stage_name):
class SAMCodeLocationPostProcessor (line 1510) | class SAMCodeLocationPostProcessor(TemplatePostProcessor):
method process (line 1512) | def process(self, template, config, outdir, chalice_stage_name):
method _fixup_deployment_package (line 1516) | def _fixup_deployment_package(self, template, outdir):
class TerraformCodeLocationPostProcessor (line 1540) | class TerraformCodeLocationPostProcessor(TemplatePostProcessor):
method process (line 1542) | def process(self, template, config, outdir, chalice_stage_name):
class TemplateMergePostProcessor (line 1566) | class TemplateMergePostProcessor(TemplatePostProcessor):
method __init__ (line 1567) | def __init__(self,
method process (line 1579) | def process(self, template, config, outdir, chalice_stage_name):
method _load_template_to_merge (line 1588) | def _load_template_to_merge(self):
class CompositePostProcessor (line 1600) | class CompositePostProcessor(TemplatePostProcessor):
method __init__ (line 1601) | def __init__(self, processors):
method process (line 1605) | def process(self, template, config, outdir, chalice_stage_name):
class TemplateMerger (line 1611) | class TemplateMerger(object):
method merge (line 1612) | def merge(self, file_template, chalice_template):
class TemplateDeepMerger (line 1617) | class TemplateDeepMerger(TemplateMerger):
method merge (line 1618) | def merge(self, file_template, chalice_template):
method _merge (line 1622) | def _merge(self, file_template, chalice_template):
method _merge_dict (line 1629) | def _merge_dict(self, file_template, chalice_template):
class TemplateSerializer (line 1637) | class TemplateSerializer(object):
method load_template (line 1640) | def load_template(self, file_contents, filename=''):
method serialize_template (line 1644) | def serialize_template(self, contents):
class JSONTemplateSerializer (line 1649) | class JSONTemplateSerializer(TemplateSerializer):
method serialize_template (line 1652) | def serialize_template(self, contents):
method load_template (line 1656) | def load_template(self, file_contents, filename=''):
class YAMLTemplateSerializer (line 1665) | class YAMLTemplateSerializer(TemplateSerializer):
method is_yaml_template (line 1669) | def is_yaml_template(cls, template_name):
method serialize_template (line 1674) | def serialize_template(self, contents):
method load_template (line 1678) | def load_template(self, file_contents, filename=''):
method _custom_sam_instrinsics (line 1691) | def _custom_sam_instrinsics(self, loader, tag_prefix, node):
method _get_value (line 1699) | def _get_value(self, loader, node):
FILE: chalice/pipeline.py
function create_buildspec_v2 (line 12) | def create_buildspec_v2(pipeline_params):
function create_buildspec_legacy (line 48) | def create_buildspec_legacy(pipeline_params):
class InvalidCodeBuildPythonVersion (line 76) | class InvalidCodeBuildPythonVersion(Exception):
method __init__ (line 77) | def __init__(self, version, msg=None):
class PipelineParameters (line 84) | class PipelineParameters(object):
method __init__ (line 88) | def __init__(self, app_name, lambda_python_version,
method _extract_version (line 104) | def _extract_version(self, lambda_python_version):
method _lock_to_minor_version (line 111) | def _lock_to_minor_version(self):
class BasePipelineTemplate (line 119) | class BasePipelineTemplate(object):
method create_template (line 120) | def create_template(self, pipeline_params):
class CreatePipelineTemplateV2 (line 125) | class CreatePipelineTemplateV2(BasePipelineTemplate):
method create_template (line 144) | def create_template(self, pipeline_params):
method _validate_python_version (line 160) | def _validate_python_version(self, python_version):
class CreatePipelineTemplateLegacy (line 174) | class CreatePipelineTemplateLegacy(BasePipelineTemplate):
method create_template (line 200) | def create_template(self, pipeline_params):
method _get_codebuild_image (line 218) | def _get_codebuild_image(self, params):
class BaseResource (line 229) | class BaseResource(object):
method add_to_template (line 230) | def add_to_template(self, template, pipeline_params):
class CodeCommitSourceRepository (line 235) | class CodeCommitSourceRepository(BaseResource):
method add_to_template (line 236) | def add_to_template(self, template, pipeline_params):
class GithubSource (line 257) | class GithubSource(BaseResource):
method add_to_template (line 258) | def add_to_template(self, template, pipeline_params):
class CodeBuild (line 299) | class CodeBuild(BaseResource):
method __init__ (line 300) | def __init__(self, buildspec_generator=create_buildspec_legacy):
method add_to_template (line 304) | def add_to_template(self, template, pipeline_params):
method _add_package_build (line 315) | def _add_package_build(self, resources, pipeline_params):
method _add_s3_bucket (line 353) | def _add_s3_bucket(self, resources, outputs):
method _add_codebuild_role (line 360) | def _add_codebuild_role(self, resources, outputs):
method _add_codebuild_policy (line 389) | def _add_codebuild_policy(self, resources):
class CodePipeline (line 405) | class CodePipeline(BaseResource):
method add_to_template (line 406) | def add_to_template(self, template, pipeline_params):
method _add_cfn_deploy_role (line 415) | def _add_cfn_deploy_role(self, resources, outputs):
method _add_pipeline (line 458) | def _add_pipeline(self, resources, pipeline_params):
method _create_pipeline_stages (line 478) | def _create_pipeline_stages(self, pipeline_params):
method _code_commit_source (line 490) | def _code_commit_source(self):
method _create_source_stage (line 519) | def _create_source_stage(self, pipeline_params):
method _github_source (line 525) | def _github_source(self, pipeline_version):
method _create_build_stage (line 562) | def _create_build_stage(self):
method _create_beta_stage (line 595) | def _create_beta_stage(self):
method _add_bucket_store (line 657) | def _add_bucket_store(self, resources, outputs):
method _add_codepipeline_role (line 671) | def _add_codepipeline_role(self, resources, outputs):
class BuildSpecExtractor (line 706) | class BuildSpecExtractor(object):
method extract_buildspec (line 707) | def extract_buildspec(self, template):
FILE: chalice/policy.py
function policy_from_source_code (line 25) | def policy_from_source_code(source_code: str) -> Dict[str, Any]:
function load_api_policy_actions (line 33) | def load_api_policy_actions() -> APIPolicyT:
function load_custom_policy_actions (line 37) | def load_custom_policy_actions() -> CustomPolicyT:
function _load_json_file (line 41) | def _load_json_file(relative_filename: str) -> Dict[str, Any]:
function diff_policies (line 49) | def diff_policies(old: Dict[str, Any],
function _create_simple_format (line 63) | def _create_simple_format(policy: Dict[str, Any]) -> Set[str]:
class AppPolicyGenerator (line 72) | class AppPolicyGenerator(object):
method __init__ (line 73) | def __init__(self, osutils: OSUtils) -> None:
method generate_policy (line 76) | def generate_policy(self, config: Config) -> Dict[str, Any]:
class PolicyBuilder (line 95) | class PolicyBuilder(object):
method __init__ (line 98) | def __init__(self,
method build_policy_from_api_calls (line 120) | def build_policy_from_api_calls(self,
method _build_statements_from_client_calls (line 130) | def _build_statements_from_client_calls(self,
method _get_actions_from_api_calls (line 153) | def _get_actions_from_api_calls(self,
method _get_actions_from_high_level_calls (line 175) | def _get_actions_from_high_level_calls(self,
FILE: chalice/templates/0000-rest-api/app.py
function index (line 7) | def index():
FILE: chalice/templates/0000-rest-api/tests/test_app.py
function test_index (line 5) | def test_index():
FILE: chalice/templates/0002-s3-event-handler/app.py
function s3_handler (line 14) | def s3_handler(event):
FILE: chalice/templates/0002-s3-event-handler/tests/test_app.py
function test_s3_handler (line 5) | def test_s3_handler():
FILE: chalice/templates/0007-lambda-only/app.py
function first_function (line 7) | def first_function(event, context):
function second_function (line 12) | def second_function(event, context):
FILE: chalice/templates/0007-lambda-only/tests/test_app.py
function test_index (line 5) | def test_index():
FILE: chalice/templates/0009-legacy/app.py
function index (line 7) | def index():
FILE: chalice/templates/6001-cdk-ddb/infrastructure/stacks/chaliceapp.py
class ChaliceApp (line 17) | class ChaliceApp(cdk.Stack):
method __init__ (line 19) | def __init__(self, scope, id, **kwargs):
method _create_ddb_table (line 34) | def _create_ddb_table(self):
FILE: chalice/templates/6001-cdk-ddb/runtime/app.py
function create_user (line 12) | def create_user():
function get_user (line 24) | def get_user(username):
FILE: chalice/test.py
class FunctionNotFoundError (line 16) | class FunctionNotFoundError(Exception):
class Client (line 20) | class Client(object):
method __init__ (line 21) | def __init__(self,
method _chalice_config (line 38) | def _chalice_config(self) -> Config:
method http (line 51) | def http(self) -> TestHTTPClient:
method lambda_ (line 57) | def lambda_(self) -> TestLambdaClient:
method events (line 64) | def events(self) -> TestEventsClient:
method __enter__ (line 69) | def __enter__(self) -> Client:
method __exit__ (line 72) | def __exit__(self,
class BaseClient (line 80) | class BaseClient(object):
method _patched_env_vars (line 83) | def _patched_env_vars(self, environment_variables): # type: ignore
class TestHTTPClient (line 99) | class TestHTTPClient(BaseClient):
method __init__ (line 100) | def __init__(self, app: Chalice, config: Config) -> None:
method request (line 105) | def request(self,
method _error_response (line 123) | def _error_response(self, e: LocalGatewayException) -> HTTPResponse:
method get (line 130) | def get(self, path: str, **kwargs: Any) -> HTTPResponse:
method post (line 133) | def post(self, path: str, **kwargs: Any) -> HTTPResponse:
method put (line 136) | def put(self, path: str, **kwargs: Any) -> HTTPResponse:
method patch (line 139) | def patch(self, path: str, **kwargs: Any) -> HTTPResponse:
method options (line 142) | def options(self, path: str, **kwargs: Any) -> HTTPResponse:
method delete (line 145) | def delete(self, path: str, **kwargs: Any) -> HTTPResponse:
method head (line 148) | def head(self, path: str, **kwargs: Any) -> HTTPResponse:
class HTTPResponse (line 152) | class HTTPResponse(object):
method __init__ (line 153) | def __init__(self,
method json_body (line 162) | def json_body(self) -> Any:
method create_from_dict (line 169) | def create_from_dict(cls, response_dict: Dict[str, Any]) -> HTTPResponse:
class TestEventsClient (line 185) | class TestEventsClient(BaseClient):
method __init__ (line 186) | def __init__(self, app: Chalice) -> None:
method generate_sns_event (line 189) | def generate_sns_event(self,
method generate_s3_event (line 222) | def generate_s3_event(self,
method generate_sqs_event (line 262) | def generate_sqs_event(self,
method generate_cw_event (line 284) | def generate_cw_event(self,
method generate_kinesis_event (line 303) | def generate_kinesis_event(self, message_bodies: List[bytes],
class TestLambdaClient (line 327) | class TestLambdaClient(BaseClient):
method __init__ (line 328) | def __init__(self, app: Chalice, config: Config) -> None:
method invoke (line 332) | def invoke(self,
class InvokeResponse (line 348) | class InvokeResponse(object):
method __init__ (line 349) | def __init__(self, payload: Any) -> None:
FILE: chalice/utils.py
class AbortedError (line 32) | class AbortedError(Exception):
function to_cfn_resource_name (line 36) | def to_cfn_resource_name(name: str) -> str:
function remove_stage_from_deployed_values (line 54) | def remove_stage_from_deployed_values(key: str, filename: str) -> None:
function record_deployed_values (line 74) | def record_deployed_values(
function serialize_to_json (line 92) | def serialize_to_json(data: Any) -> str:
class ChaliceZipFile (line 103) | class ChaliceZipFile(zipfile.ZipFile):
method __init__ (line 113) | def __init__(self, *args: Any, **kwargs: Any) -> None:
method write (line 118) | def write(
method _create_zipinfo (line 132) | def _create_zipinfo(
function create_zip_file (line 160) | def create_zip_file(source_dir: str, outfile: str) -> None:
class OSUtils (line 179) | class OSUtils(object):
method environ (line 182) | def environ(self) -> MutableMapping:
method open (line 185) | def open(self, filename: str, mode: str) -> IO:
method open_zip (line 188) | def open_zip(
method remove_file (line 195) | def remove_file(self, filename: str) -> None:
method file_exists (line 204) | def file_exists(self, filename: str) -> bool:
method get_file_contents (line 207) | def get_file_contents(
method set_file_contents (line 222) | def set_file_contents(
method extract_zipfile (line 232) | def extract_zipfile(self, zipfile_path: str, unpack_dir: str) -> None:
method extract_tarfile (line 236) | def extract_tarfile(self, tarfile_path: str, unpack_dir: str) -> None:
method _validate_safe_extract (line 248) | def _validate_safe_extract(
method _validate_single_tar_member (line 256) | def _validate_single_tar_member(
method directory_exists (line 292) | def directory_exists(self, path: str) -> bool:
method get_directory_contents (line 295) | def get_directory_contents(self, path: str) -> List[str]:
method makedirs (line 298) | def makedirs(self, path: str) -> None:
method dirname (line 301) | def dirname(self, path: str) -> str:
method abspath (line 304) | def abspath(self, path: str) -> str:
method joinpath (line 307) | def joinpath(self, *args: str) -> str:
method walk (line 310) | def walk(
method copytree (line 315) | def copytree(self, source: str, destination: str) -> None:
method rmtree (line 327) | def rmtree(self, directory: str) -> None:
method copy (line 330) | def copy(self, source: str, destination: str) -> None:
method move (line 333) | def move(self, source: str, destination: str) -> None:
method tempdir (line 337) | def tempdir(self) -> Any:
method popen (line 344) | def popen(
method mtime (line 354) | def mtime(self, path: str) -> float:
method stat (line 357) | def stat(self, path: str) -> os.stat_result:
method normalized_filename (line 360) | def normalized_filename(self, path: str) -> str:
method pipe (line 370) | def pipe(self) -> int:
method basename (line 373) | def basename(self, path: str) -> str:
function getting_started_prompt (line 377) | def getting_started_prompt(prompter: Any) -> bool:
class UI (line 381) | class UI(object):
method __init__ (line 382) | def __init__(
method write (line 402) | def write(self, msg: str) -> None:
method error (line 405) | def error(self, msg: str) -> None:
method confirm (line 408) | def confirm(
class PipeReader (line 417) | class PipeReader(object):
method __init__ (line 418) | def __init__(self, stream: IO[bytes]) -> None:
method read (line 421) | def read(self) -> OptBytes:
class TimestampConverter (line 427) | class TimestampConverter(object):
method __init__ (line 440) | def __init__(self, now: Optional[Callable[[], datetime]] = None) -> None:
method timestamp_to_datetime (line 445) | def timestamp_to_datetime(self, timestamp: str) -> datetime:
method _relative_timestamp_to_datetime (line 461) | def _relative_timestamp_to_datetime(
method parse_iso8601_timestamp (line 467) | def parse_iso8601_timestamp(self, timestamp: str) -> datetime:
FILE: chalice/vendored/botocore/regions.py
class BaseEndpointResolver (line 29) | class BaseEndpointResolver(object):
method construct_endpoint (line 31) | def construct_endpoint(self, service_name, region_name=None):
method get_available_partitions (line 60) | def get_available_partitions(self):
method get_available_endpoints (line 67) | def get_available_endpoints(self, service_name, partition_name='aws',
class EndpointResolver (line 88) | class EndpointResolver(BaseEndpointResolver):
method __init__ (line 90) | def __init__(self, endpoint_data):
method get_available_partitions (line 98) | def get_available_partitions(self):
method get_available_endpoints (line 104) | def get_available_endpoints(self, service_name, partition_name='aws',
method construct_endpoint (line 118) | def construct_endpoint(self, service_name, region_name=None, partition...
method _endpoint_for_partition (line 138) | def _endpoint_for_partition(self, partition, service_name, region_name,
method _region_match (line 168) | def _region_match(self, partition, region_name):
method _resolve (line 175) | def _resolve(self, partition, service_name, service_data, endpoint_name):
method _merge_keys (line 192) | def _merge_keys(self, from_data, result):
method _expand_template (line 197) | def _expand_template(self, partition, template, service_name,
FILE: docs/source/chalicedocs.py
function get_size (line 13) | def get_size(d, key):
function css (line 22) | def css(d):
class youtube (line 26) | class youtube(nodes.General, nodes.Element):
function visit_youtube_node (line 30) | def visit_youtube_node(self, node):
function depart_youtube_node (line 86) | def depart_youtube_node(self, node):
class YouTube (line 90) | class YouTube(Directive):
method run (line 101) | def run(self):
function unsupported_visit_youtube (line 120) | def unsupported_visit_youtube(self, node):
function setup (line 134) | def setup(app):
FILE: docs/source/samples/media-query/code/app.py
function get_media_db (line 25) | def get_media_db():
function get_rekognition_client (line 34) | def get_rekognition_client():
function handle_object_created (line 45) | def handle_object_created(event):
function handle_object_removed (line 54) | def handle_object_removed(event):
function add_video_file (line 60) | def add_video_file(event):
function list_media_files (line 70) | def list_media_files():
function get_media_file (line 78) | def get_media_file(name):
function _extract_db_list_params (line 86) | def _extract_db_list_params(query_params):
function _is_image (line 98) | def _is_image(key):
function _handle_created_image (line 102) | def _handle_created_image(bucket, key):
function _is_video (line 107) | def _is_video(key):
function _handle_created_video (line 111) | def _handle_created_video(bucket, key):
FILE: docs/source/samples/media-query/code/chalicelib/db.py
class MediaDB (line 8) | class MediaDB(object):
method list_media_files (line 9) | def list_media_files(self, label=None):
method add_media_file (line 12) | def add_media_file(self, name, media_type, labels=None):
method get_media_file (line 15) | def get_media_file(self, name):
method delete_media_file (line 18) | def delete_media_file(self, name):
class DynamoMediaDB (line 22) | class DynamoMediaDB(MediaDB):
method __init__ (line 23) | def __init__(self, table_resource):
method list_media_files (line 26) | def list_media_files(self, startswith=None, media_type=None, label=None):
method add_media_file (line 46) | def add_media_file(self, name, media_type, labels=None):
method get_media_file (line 57) | def get_media_file(self, name):
method delete_media_file (line 65) | def delete_media_file(self, name):
method _add_to_filter_expression (line 72) | def _add_to_filter_expression(self, expression, condition):
FILE: docs/source/samples/media-query/code/chalicelib/rekognition.py
class RekognitonClient (line 4) | class RekognitonClient(object):
method __init__ (line 5) | def __init__(self, boto3_client):
method get_image_labels (line 8) | def get_image_labels(self, bucket, key):
method start_video_label_job (line 20) | def start_video_label_job(self, bucket, key, topic_arn, role_arn):
method get_video_job_labels (line 37) | def get_video_job_labels(self, job_id):
method _collect_video_labels (line 50) | def _collect_video_labels(self, labels, response):
FILE: docs/source/samples/media-query/code/recordresources.py
function record_as_env_var (line 9) | def record_as_env_var(stack_name, stage):
function _to_env_var_name (line 28) | def _to_env_var_name(name):
function main (line 32) | def main():
FILE: docs/source/samples/todo-app/code/app.py
function login (line 18) | def login():
function jwt_auth (line 28) | def jwt_auth(auth_request):
function get_auth_key (line 34) | def get_auth_key():
function get_users_db (line 45) | def get_users_db():
function get_app_db (line 53) | def get_app_db():
function get_authorized_username (line 63) | def get_authorized_username(current_request):
function list_todos (line 68) | def list_todos():
function create_todo (line 74) | def create_todo():
function get_todo (line 85) | def get_todo(uid):
function update_todo (line 91) | def update_todo(uid):
function delete_todo (line 103) | def delete_todo(uid):
FILE: docs/source/samples/todo-app/code/chalicelib/auth.py
function get_jwt_token (line 10) | def get_jwt_token(username, password, record, secret):
function decode_jwt_token (line 32) | def decode_jwt_token(token, secret):
FILE: docs/source/samples/todo-app/code/chalicelib/db.py
class TodoDB (line 9) | class TodoDB(object):
method list_items (line 10) | def list_items(self):
method add_item (line 13) | def add_item(self, description, metadata=None):
method get_item (line 16) | def get_item(self, uid):
method delete_item (line 19) | def delete_item(self, uid):
method update_item (line 22) | def update_item(self, uid, description=None, state=None,
class InMemoryTodoDB (line 27) | class InMemoryTodoDB(TodoDB):
method __init__ (line 28) | def __init__(self, state=None):
method list_all_items (line 33) | def list_all_items(self):
method list_items (line 39) | def list_items(self, username=DEFAULT_USERNAME):
method add_item (line 42) | def add_item(self, description, metadata=None, username=DEFAULT_USERNA...
method get_item (line 55) | def get_item(self, uid, username=DEFAULT_USERNAME):
method delete_item (line 58) | def delete_item(self, uid, username=DEFAULT_USERNAME):
method update_item (line 61) | def update_item(self, uid, description=None, state=None,
class DynamoDBTodo (line 72) | class DynamoDBTodo(TodoDB):
method __init__ (line 73) | def __init__(self, table_resource):
method list_all_items (line 76) | def list_all_items(self):
method list_items (line 80) | def list_items(self, username=DEFAULT_USERNAME):
method add_item (line 86) | def add_item(self, description, metadata=None, username=DEFAULT_USERNA...
method get_item (line 99) | def get_item(self, uid, username=DEFAULT_USERNAME):
method delete_item (line 108) | def delete_item(self, uid, username=DEFAULT_USERNAME):
method update_item (line 116) | def update_item(self, uid, description=None, state=None,
FILE: docs/source/samples/todo-app/code/create-resources.py
function create_table (line 26) | def create_table(table_name_prefix, hash_key, range_key=None):
function record_as_env_var (line 59) | def record_as_env_var(key, value, stage):
function _already_in_config (line 70) | def _already_in_config(env_var, stage):
function create_auth_key_if_needed (line 76) | def create_auth_key_if_needed(stage):
function create_resources (line 89) | def create_resources(args):
function cleanup_resources (line 104) | def cleanup_resources(args):
function main (line 132) | def main():
FILE: docs/source/samples/todo-app/code/tests/test_db.py
class TestTodoDB (line 10) | class TestTodoDB(unittest.TestCase):
method setUp (line 11) | def setUp(self):
method tearDown (line 15) | def tearDown(self):
method test_can_add_and_retrieve_data (line 20) | def test_can_add_and_retrieve_data(self):
method test_can_add_and_list_data (line 28) | def test_can_add_and_list_data(self):
method test_can_add_and_delete_data (line 34) | def test_can_add_and_delete_data(self):
method test_can_add_and_update_data (line 40) | def test_can_add_and_update_data(self):
method test_can_add_and_retrieve_data_with_specified_username (line 45) | def test_can_add_and_retrieve_data_with_specified_username(self):
method test_can_add_and_list_data_with_specified_username (line 57) | def test_can_add_and_list_data_with_specified_username(self):
method test_can_add_and_delete_data_with_specified_username (line 65) | def test_can_add_and_delete_data_with_specified_username(self):
method test_can_add_and_update_data_with_specified_username (line 72) | def test_can_add_and_update_data_with_specified_username(self):
method test_list_all_items (line 79) | def test_list_all_items(self):
class TestDynamoDB (line 92) | class TestDynamoDB(TestTodoDB):
method setUpClass (line 94) | def setUpClass(cls):
method tearDownClass (line 128) | def tearDownClass(cls):
method setUp (line 134) | def setUp(self):
FILE: docs/source/samples/todo-app/code/users.py
function get_table_name (line 13) | def get_table_name(stage):
function create_user (line 21) | def create_user(stage):
function encode_password (line 37) | def encode_password(password, salt=None):
function list_users (line 51) | def list_users(stage):
function get_user (line 58) | def get_user(username, stage):
function test_password (line 70) | def test_password(stage):
function main (line 83) | def main():
FILE: docs/source/theme/smithy/static/asciinema-player.js
function CustomEvent (line 13) | function CustomEvent ( event, params ) {
function t (line 35) | function t(e){E.push(e),b||(b=!0,w(o))}
function n (line 35) | function n(e){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill....
function o (line 35) | function o(){b=!1;var e=E;E=[],e.sort(function(e,t){return e.uid_-t.uid_...
function r (line 35) | function r(e){e.nodes_.forEach(function(t){var n=v.get(t);n&&n.forEach(f...
function i (line 35) | function i(e,t){for(var n=e;n;n=n.parentNode){var o=v.get(n);if(o)for(va...
function a (line 35) | function a(e){this.callback_=e,this.nodes_=[],this.records_=[],this.uid_...
function d (line 35) | function d(e,t){this.type=e,this.target=t,this.addedNodes=[],this.remove...
function s (line 35) | function s(e){var t=new d(e.type,e.target);return t.addedNodes=e.addedNo...
function u (line 35) | function u(e,t){return y=new d(e,t)}
function c (line 35) | function c(e){return N?N:(N=s(y),N.oldValue=e,N)}
function l (line 35) | function l(){y=N=void 0}
function f (line 35) | function f(e){return e===N||e===y}
function p (line 35) | function p(e,t){return e===t?e:N&&f(e)?N:null}
function m (line 35) | function m(e,t,n){this.observer=e,this.target=t,this.options=n,this.tran...
function t (line 35) | function t(e,t){n(e,function(e){return t(e)?!0:void o(e,t)}),o(e,t)}
function n (line 35) | function n(e,t,o){var r=e.firstElementChild;if(!r)for(r=e.firstChild;r&&...
function o (line 35) | function o(e,n){for(var o=e.shadowRoot;o;)t(o,n),o=o.olderShadowRoot}
function r (line 35) | function r(e,t){i(e,t,[])}
function i (line 35) | function i(e,t,n){if(e=window.wrap(e),!(n.indexOf(e)>=0)){n.push(e);for(...
function t (line 35) | function t(e,t){return n(e,t)||o(e,t)}
function n (line 35) | function n(t,n){return e.upgrade(t,n)?!0:void(n&&a(t))}
function o (line 35) | function o(e,t){b(e,function(e){return n(e,t)?!0:void 0})}
function r (line 35) | function r(e){N.push(e),y||(y=!0,setTimeout(i))}
function i (line 35) | function i(){y=!1;for(var e,t=N,n=0,o=t.length;o>n&&(e=t[n]);n++)e();N=[]}
function a (line 35) | function a(e){_?r(function(){d(e)}):d(e)}
function d (line 35) | function d(e){e.__upgraded__&&!e.__attached&&(e.__attached=!0,e.attached...
function s (line 35) | function s(e){u(e),b(e,function(e){u(e)})}
function u (line 35) | function u(e){_?r(function(){c(e)}):c(e)}
function c (line 35) | function c(e){e.__upgraded__&&e.__attached&&(e.__attached=!1,e.detachedC...
function l (line 35) | function l(e){for(var t=e,n=window.wrap(document);t;){if(t==n)return!0;t...
function f (line 35) | function f(e){if(e.shadowRoot&&!e.shadowRoot.__watched){g.dom&&console.l...
function p (line 35) | function p(e,n){if(g.dom){var o=n[0];if(o&&"childList"===o.type&&o.added...
function m (line 35) | function m(e){for(e=window.wrap(e),e||(e=window.wrap(document));e.parent...
function w (line 35) | function w(e){if(!e.__observer){var t=new MutationObserver(p.bind(this,e...
function v (line 35) | function v(e){e=window.wrap(e),g.dom&&console.group("upgradeDocument: ",...
function h (line 35) | function h(e){E(e,v)}
function t (line 35) | function t(t,o){if("template"===t.localName&&window.HTMLTemplateElement&...
function n (line 35) | function n(t,n,r){return a.upgrade&&console.group("upgrade:",t.localName...
function o (line 35) | function o(e,t){Object.__proto__?e.__proto__=t.prototype:(r(e,t.prototyp...
function r (line 35) | function r(e,t,n){for(var o={},r=t;r!==n&&r!==HTMLElement.prototype;){fo...
function i (line 35) | function i(e){e.createdCallback&&e.createdCallback()}
function t (line 35) | function t(t,o){var s=o||{};if(!t)throw new Error("document.registerElem...
function n (line 35) | function n(e){if(!e.setAttribute._polyfilled){var t=e.setAttribute;e.set...
function o (line 35) | function o(e,t,n){e=e.toLowerCase();var o=this.getAttribute(e);n.apply(t...
function r (line 35) | function r(e){for(var t=0;t<_.length;t++)if(e===_[t])return!0}
function i (line 35) | function i(e){var t=u(e);return t?i(t["extends"]).concat([t]):[]}
function a (line 35) | function a(e){for(var t,n=e["extends"],o=0;t=e.ancestry[o];o++)n=t.is&&t...
function d (line 35) | function d(e){if(!Object.__proto__){var t=HTMLElement.prototype;if(e.is)...
function s (line 35) | function s(e){return g(M(e.tag),e)}
function u (line 35) | function u(e){return e?y[e.toLowerCase()]:void 0}
function c (line 35) | function c(e,t){y[e]=t}
function l (line 35) | function l(e){return function(){return s(e)}}
function f (line 35) | function f(e,t,n){return e===N?p(t,n):O(e,t)}
function p (line 35) | function p(e,t){e&&(e=e.toLowerCase()),t&&(t=t.toLowerCase());var n=u(t|...
function m (line 35) | function m(e,t){var n=e[t];e[t]=function(){var e=n.apply(this,arguments)...
function t (line 35) | function t(){i(window.wrap(document)),window.CustomElements.ready=!0;var...
function o (line 59) | function o(u,a){if(!n[u]){if(!e[u]){var s="function"==typeof require&&re...
function r (line 59) | function r(t){var e={"=":"=0",":":"=2"};return"$"+(""+t).replace(/[=:]/g...
function o (line 59) | function o(t){var e={"=0":"=","=2":":"};return(""+("."===t[0]&&"$"===t[1...
function r (line 59) | function r(t){return(""+t).replace(E,"$&/")}
function o (line 59) | function o(t,e){this.func=t,this.context=e,this.count=0}
function i (line 59) | function i(t,e,n){var r=t.func,o=t.context;r.call(o,e,t.count++)}
function u (line 59) | function u(t,e,n){if(null==t)return t;var r=o.getPooled(e,n);m(t,i,r),o....
function a (line 59) | function a(t,e,n,r){this.result=t,this.keyPrefix=e,this.func=n,this.cont...
function s (line 59) | function s(t,e,n){var o=t.result,i=t.keyPrefix,u=t.func,a=t.context,s=u....
function c (line 59) | function c(t,e,n,o,i){var u="";null!=n&&(u=r(n)+"/");var c=a.getPooled(e...
function l (line 59) | function l(t,e,n){if(null==t)return t;var r=[];return c(t,r,null,e,n),r}
function f (line 59) | function f(t,e,n){return null}
function p (line 59) | function p(t,e){return m(t,f,null)}
function d (line 59) | function d(t){var e=[];return c(t,e,null,v.thatReturnsArgument),e}
function r (line 59) | function r(t){return t}
function o (line 59) | function o(t,e){var n=E.hasOwnProperty(e)?E[e]:null;_.hasOwnProperty(e)&...
function i (line 59) | function i(t,e){if(e){"function"==typeof e&&p("75"),h.isValidElement(e)&...
function u (line 59) | function u(t,e){if(e)for(var n in e){var r=e[n];if(e.hasOwnProperty(n)){...
function a (line 59) | function a(t,e){t&&e&&"object"==typeof t&&"object"==typeof e||p("80");fo...
function s (line 59) | function s(t,e){return function(){var n=t.apply(this,arguments),r=e.appl...
function c (line 59) | function c(t,e){return function(){t.apply(this,arguments),e.apply(this,a...
function l (line 59) | function l(t,e){return e.bind(t)}
function f (line 59) | function f(t){for(var e=t.__reactAutoBindPairs,n=0;n<e.length;n+=2){var ...
function r (line 59) | function r(t,e,n){this.props=t,this.context=e,this.refs=u,this.updater=n...
function r (line 59) | function r(t){return void 0!==t.ref}
function o (line 59) | function o(t){return void 0!==t.key}
function r (line 59) | function r(t,e,n){this.props=t,this.context=e,this.refs=s,this.updater=n...
function o (line 59) | function o(){}
function r (line 59) | function r(t){var e=t&&(o&&t[o]||t[i]);if("function"==typeof e)return e}
function r (line 59) | function r(t){return i.isValidElement(t)||o("143"),t}
function r (line 59) | function r(t){for(var e=arguments.length-1,n="Minified React error #"+t+...
function r (line 59) | function r(t,e){return t&&"object"==typeof t&&null!=t.key?c.escape(t.key...
function o (line 59) | function o(t,e,n,i){var p=typeof t;if("undefined"!==p&&"boolean"!==p||(t...
function i (line 59) | function i(t,e,n){return null==t?0:o(t,"",e,n)}
function r (line 59) | function r(t){return function(){return t}}
function r (line 59) | function r(t,e,n,r,i,u,a,s){if(o(e),!t){var c;if(void 0===e)c=new Error(...
function r (line 59) | function r(t){if(null===t||void 0===t)throw new TypeError("Object.assign...
function r (line 59) | function r(t,e,n,r,o){}
function n (line 59) | function n(t){var e=t&&(_&&t[_]||t[P]);if("function"==typeof e)return e}
function a (line 59) | function a(t,e){return t===e?0!==t||1/t==1/e:t!==t&&e!==e}
function s (line 59) | function s(t){this.message=t,this.stack=""}
function c (line 59) | function c(t){function n(n,r,u,a,c,l,f){if(a=a||w,l=l||u,f!==i)if(e)o(!1...
function l (line 59) | function l(t){function e(e,n,r,o,i,u){var a=e[n];if(g(a)!==t)return new ...
function f (line 59) | function f(t){function e(e,n,r,o,u){if("function"!=typeof t)return new s...
function p (line 59) | function p(t){function e(e,n,r,o,i){if(!(e[n]instanceof t)){var u=t.name...
function d (line 59) | function d(t){function e(e,n,r,o,i){for(var u=e[n],c=0;c<t.length;c++)if...
function y (line 59) | function y(t){function e(e,n,r,o,u){if("function"!=typeof t)return new s...
function h (line 59) | function h(t){function e(e,n,r,o,u){for(var a=0;a<t.length;a++){if(null=...
function v (line 59) | function v(t){function e(e,n,r,o,u){var a=e[n],c=g(a);if("object"!==c)re...
function m (line 59) | function m(e){switch(typeof e){case"number":case"string":case"undefined"...
function b (line 59) | function b(t,e){return"symbol"===t||("Symbol"===e["@@toStringTag"]||"fun...
function g (line 59) | function g(t){var e=typeof t;return Array.isArray(t)?"array":t instanceo...
function E (line 59) | function E(t){var e=g(t);if("object"===e){if(t instanceof Date)return"da...
function x (line 59) | function x(t){return t.constructor&&t.constructor.name?t.constructor.nam...
function e (line 59) | function e(e,n,r,o,i){var u=e[n];if(!t(u)){return new s("Invalid "+o+" `...
function t (line 59) | function t(t,e,n,r,o){return m(t[e])?null:new s("Invalid "+r+" `"+o+"` s...
function s (line 60) | function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&re...
function identity (line 60) | function identity(fn){return fn}
function factory (line 60) | function factory(ReactComponent,isValidElement,ReactNoopUpdateQueue){fun...
function makeEmptyFunction (line 60) | function makeEmptyFunction(arg){return function(){return arg}}
function invariant (line 60) | function invariant(condition,format,a,b,c,d,e,f){if(validateFormat(forma...
function toObject (line 60) | function toObject(val){if(null===val||void 0===val)throw new TypeError("...
function o (line 73) | function o(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&re...
function r (line 73) | function r(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.alt...
function o (line 73) | function o(e){switch(e){case"topCompositionStart":return T.compositionSt...
function i (line 73) | function i(e,t){return"topKeyDown"===e&&t.keyCode===y}
function a (line 73) | function a(e,t){switch(e){case"topKeyUp":return-1!==g.indexOf(t.keyCode)...
function s (line 73) | function s(e){var t=e.detail;return"object"==typeof t&&"data"in t?t.data...
function u (line 73) | function u(e,t,n,r){var u,l;if(_?u=o(e):P?a(e,n)&&(u=T.compositionEnd):i...
function l (line 73) | function l(e,t){switch(e){case"topCompositionEnd":return s(t);case"topKe...
function c (line 73) | function c(e,t){if(P){if("topCompositionEnd"===e||!_&&a(e,t)){var n=P.ge...
function p (line 73) | function p(e,t,n,r){var o;if(!(o=b?l(e,n):c(e,n)))return null;var i=v.ge...
function r (line 73) | function r(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}
function r (line 73) | function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a ...
function e (line 73) | function e(t){r(this,e),this._callbacks=null,this._contexts=null,this._a...
function r (line 73) | function r(e){var t=e.nodeName&&e.nodeName.toLowerCase();return"select"=...
function o (line 73) | function o(e){var t=w.getPooled(S.change,M,e,T(e));C.accumulateTwoPhaseD...
function i (line 73) | function i(e){_.enqueueEvents(e),_.processEventQueue(!1)}
function a (line 73) | function a(e,t){N=e,M=t,N.attachEvent("onchange",o)}
function s (line 73) | function s(){N&&(N.detachEvent("onchange",o),N=null,M=null)}
function u (line 73) | function u(e,t){if("topChange"===e)return t}
function l (line 73) | function l(e,t,n){"topFocus"===e?(s(),a(t,n)):"topBlur"===e&&s()}
function c (line 73) | function c(e,t){N=e,M=t,I=e.value,O=Object.getOwnPropertyDescriptor(e.co...
function p (line 73) | function p(){N&&(delete N.value,N.detachEvent?N.detachEvent("onpropertyc...
function d (line 73) | function d(e){if("value"===e.propertyName){var t=e.srcElement.value;t!==...
function f (line 73) | function f(e,t){if("topInput"===e)return t}
function h (line 73) | function h(e,t,n){"topFocus"===e?(p(),c(t,n)):"topBlur"===e&&p()}
function m (line 73) | function m(e,t){if(("topSelectionChange"===e||"topKeyUp"===e||"topKeyDow...
function v (line 73) | function v(e){return e.nodeName&&"input"===e.nodeName.toLowerCase()&&("c...
function g (line 73) | function g(e,t){if("topClick"===e)return t}
function y (line 73) | function y(e,t){if(null!=e){var n=e._wrapperState||t._wrapperState;if(n&...
function r (line 73) | function r(e,t){return Array.isArray(t)&&(t=t[1]),t?t.nextSibling:e.firs...
function o (line 73) | function o(e,t,n){c.insertTreeBefore(e,t,n)}
function i (line 73) | function i(e,t,n){Array.isArray(t)?s(e,t[0],t[1],n):m(e,t,n)}
function a (line 73) | function a(e,t){if(Array.isArray(t)){var n=t[1];t=t[0],u(e,t,n),e.remove...
function s (line 73) | function s(e,t,n,r){for(var o=t;;){var i=o.nextSibling;if(m(e,o,r),o===n...
function u (line 73) | function u(e,t,n){for(;;){var r=t.nextSibling;if(r===n)break;e.removeChi...
function l (line 73) | function l(e,t,n){var r=e.parentNode,o=e.nextSibling;o===t?n&&m(r,docume...
function r (line 73) | function r(e){if(h){var t=e.node,n=e.children;if(n.length)for(var r=0;r<...
function o (line 73) | function o(e,t){e.parentNode.replaceChild(t.node,e),r(t)}
function i (line 73) | function i(e,t){h?e.children.push(t):e.node.appendChild(t.node)}
function a (line 73) | function a(e,t){h?e.html=t:p(e.node,t)}
function s (line 73) | function s(e,t){h?e.text=t:f(e.node,t)}
function u (line 73) | function u(){return this.node.nodeName}
function l (line 73) | function l(e){return{node:e,children:[],html:null,text:null,toString:u}}
function r (line 73) | function r(e,t){return(e&t)===t}
function r (line 73) | function r(e){return!!l.hasOwnProperty(e)||!u.hasOwnProperty(e)&&(s.test...
function o (line 73) | function o(e,t){return null==t||e.hasBooleanValue&&!t||e.hasNumericValue...
function r (line 73) | function r(e){return"button"===e||"input"===e||"select"===e||"textarea"=...
function o (line 73) | function o(e,t,n){switch(e){case"onClick":case"onClickCapture":case"onDo...
function r (line 73) | function r(){if(s)for(var e in u){var t=u[e],n=s.indexOf(e);if(n>-1||a("...
function o (line 73) | function o(e,t,n){l.eventNameDispatchConfigs.hasOwnProperty(n)&&a("99",n...
function i (line 73) | function i(e,t,n){l.registrationNameModules[e]&&a("100",e),l.registratio...
function r (line 73) | function r(e){return"topMouseUp"===e||"topTouchEnd"===e||"topTouchCancel...
function o (line 73) | function o(e){return"topMouseMove"===e||"topTouchMove"===e}
function i (line 73) | function i(e){return"topMouseDown"===e||"topTouchStart"===e}
function a (line 73) | function a(e,t,n,r){var o=e.type||"unknown-event";e.currentTarget=g.getN...
function s (line 73) | function s(e,t){var n=e._dispatchListeners,r=e._dispatchInstances;if(Arr...
function u (line 73) | function u(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array...
function l (line 73) | function l(e){var t=u(e);return e._dispatchInstances=null,e._dispatchLis...
function c (line 73) | function c(e){var t=e._dispatchListeners,n=e._dispatchInstances;Array.is...
function p (line 73) | function p(e){return!!e._dispatchListeners}
function r (line 73) | function r(e,t,n){var r=t.dispatchConfig.phasedRegistrationNames[n];retu...
function o (line 73) | function o(e,t,n){var o=r(e,n,t);o&&(n._dispatchListeners=m(n._dispatchL...
function i (line 73) | function i(e){e&&e.dispatchConfig.phasedRegistrationNames&&h.traverseTwo...
function a (line 73) | function a(e){if(e&&e.dispatchConfig.phasedRegistrationNames){var t=e._t...
function s (line 73) | function s(e,t,n){if(n&&n.dispatchConfig.registrationName){var r=n.dispa...
function u (line 73) | function u(e){e&&e.dispatchConfig.registrationName&&s(e._targetInst,null...
function l (line 73) | function l(e){v(e,i)}
function c (line 73) | function c(e){v(e,a)}
function p (line 73) | function p(e,t,n,r){h.traverseEnterLeave(n,r,s,e,t)}
function d (line 73) | function d(e){v(e,u)}
function r (line 73) | function r(e){this._root=e,this._startText=this.getText(),this._fallback...
function r (line 73) | function r(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g...
function o (line 73) | function o(e){var t={"=0":"=","=2":":"};return(""+("."===e[0]&&"$"===e[1...
function r (line 73) | function r(e){null!=e.checkedLink&&null!=e.valueLink&&s("87")}
function o (line 73) | function o(e){r(e),(null!=e.value||null!=e.onChange)&&s("88")}
function i (line 73) | function i(e){r(e),(null!=e.checked||null!=e.onChange)&&s("89")}
function a (line 73) | function a(e){if(e){var t=e.getName();if(t)return" Check the render meth...
function r (line 73) | function r(e){return Object.prototype.hasOwnProperty.call(e,m)||(e[m]=f+...
function r (line 74) | function r(e,t,n,r){var o=void 0===e[n];null!=t&&o&&(e[n]=i(t,!0))}
function r (line 74) | function r(e){}
function o (line 74) | function o(e){return!(!e.prototype||!e.prototype.isReactComponent)}
function i (line 74) | function i(e){return!(!e.prototype||!e.prototype.isPureReactComponent)}
function r (line 74) | function r(e){if(e){var t=e._currentElement._owner||null;if(t){var n=t.g...
function o (line 74) | function o(e,t){t&&(Y[e._tag]&&(null!=t.children||null!=t.dangerouslySet...
function i (line 74) | function i(e,t,n,r){if(!(r instanceof R)){var o=e._hostContainerInfo,i=o...
function a (line 74) | function a(){var e=this;x.putListener(e.inst,e.registrationName,e.listen...
function s (line 74) | function s(){var e=this;S.postMountWrapper(e)}
function u (line 74) | function u(){var e=this;I.postMountWrapper(e)}
function l (line 74) | function l(){var e=this;N.postMountWrapper(e)}
function c (line 74) | function c(){var e=this;e._rootNodeID||m("63");var t=U(e);switch(t||m("6...
function p (line 74) | function p(){M.postUpdateWrapper(this)}
function d (line 74) | function d(e){G.call(Q,e)||(X.test(e)||m("65",e),Q[e]=!0)}
function f (line 74) | function f(e,t){return e.indexOf("-")>=0||null!=t.is}
function h (line 74) | function h(e){var t=e.type;d(t),this._currentElement=e,this._tag=t.toLow...
function r (line 74) | function r(e,t){return 1===e.nodeType&&e.getAttribute(h)===String(t)||8=...
function o (line 74) | function o(e){for(var t;t=e._renderedComponent;)e=t;return e}
function i (line 74) | function i(e,t){var n=o(e);n._hostNode=t,t[v]=n}
function a (line 74) | function a(e){var t=e._hostNode;t&&(delete t[v],e._hostNode=null)}
function s (line 74) | function s(e,t){if(!(e._flags&m.hasCachedChildNodes)){var n=e._renderedC...
function u (line 74) | function u(e){if(e[v])return e[v];for(var t=[];!e[v];){if(t.push(e),!e.p...
function l (line 74) | function l(e){var t=u(e);return null!=t&&t._hostNode===e?t:null}
function c (line 74) | function c(e){if(void 0===e._hostNode&&p("33"),e._hostNode)return e._hos...
function r (line 74) | function r(e,t){return{_topLevelWrapper:e,_idCounter:1,_ownerDocument:t?...
function r (line 74) | function r(){this._rootNodeID&&d.updateWrapper(this)}
function o (line 74) | function o(e){return"checkbox"===e.type||"radio"===e.type?null!=e.checke...
function i (line 74) | function i(e){var t=this._currentElement.props,n=l.executeOnChange(t,e);...
function r (line 74) | function r(e){var t="";return i.Children.forEach(e,function(e){null!=e&&...
function r (line 74) | function r(){if(this._rootNodeID&&this._wrapperState.pendingUpdate){this...
function o (line 74) | function o(e,t,n){var r,o,i=u.getNodeFromInstance(e).options;if(t){for(r...
function i (line 74) | function i(e){var t=this._currentElement.props,n=s.executeOnChange(t,e);...
function r (line 74) | function r(e,t,n,r){return e===n&&t===r}
function o (line 74) | function o(e){var t=document.selection,n=t.createRange(),r=n.text.length...
function i (line 74) | function i(e){var t=window.getSelection&&window.getSelection();if(!t||0=...
function a (line 74) | function a(e,t){var n,r,o=document.selection.createRange().duplicate();v...
function s (line 74) | function s(e,t){if(window.getSelection){var n=window.getSelection(),r=e[...
function r (line 75) | function r(){this._rootNodeID&&c.updateWrapper(this)}
function o (line 75) | function o(e){var t=this._currentElement.props,n=s.executeOnChange(t,e);...
function r (line 75) | function r(e,t){"_hostNode"in e||u("33"),"_hostNode"in t||u("33");for(va...
function o (line 75) | function o(e,t){"_hostNode"in e||u("35"),"_hostNode"in t||u("35");for(;t...
function i (line 75) | function i(e){return"_hostNode"in e||u("36"),e._hostParent}
function a (line 75) | function a(e,t,n){for(var r=[];e;)r.push(e),e=e._hostParent;var o;for(o=...
function s (line 75) | function s(e,t,n,o,i){for(var a=e&&t?r(e,t):null,s=[];e&&e!==a;)s.push(e...
function r (line 75) | function r(){this.reinitializeTransaction()}
function r (line 75) | function r(){x||(x=!0,y.EventEmitter.injectReactEventListener(g),y.Event...
function r (line 75) | function r(e,t,n){try{t(n)}catch(e){null===o&&(o=e)}}
function r (line 75) | function r(e){o.enqueueEvents(e),o.processEventQueue(!1)}
function r (line 75) | function r(e){for(;e._hostParent;)e=e._hostParent;var t=p.getNodeFromIns...
function o (line 75) | function o(e,t){this.topLevelType=e,this.nativeEvent=t,this.ancestors=[]}
function i (line 75) | function i(e){var t=f(e.nativeEvent),n=p.getClosestInstanceFromNode(t),o...
function a (line 75) | function a(e){e(h(window))}
function r (line 75) | function r(e){return s||a("111",e.type),new s(e)}
function o (line 75) | function o(e){return new u(e)}
function i (line 75) | function i(e){return e instanceof u}
function r (line 75) | function r(e){return i(document.documentElement,e)}
function r (line 75) | function r(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++)if(e.c...
function o (line 75) | function o(e){return e?e.nodeType===A?e.documentElement:e.firstChild:null}
function i (line 75) | function i(e){return e.getAttribute&&e.getAttribute(I)||""}
function a (line 75) | function a(e,t,n,r,o){var i;if(b.logTopLevelRenders){var a=e._currentEle...
function s (line 75) | function s(e,t,n,r){var o=k.ReactReconcileTransaction.getPooled(!n&&C.us...
function u (line 75) | function u(e,t,n){for(w.unmountComponent(e,n),t.nodeType===A&&(t=t.docum...
function l (line 75) | function l(e){var t=o(e);if(t){var n=y.getInstanceFromNode(t);return!(!n...
function c (line 75) | function c(e){return!(!e||e.nodeType!==R&&e.nodeType!==A&&e.nodeType!==D)}
function p (line 75) | function p(e){var t=o(e),n=t&&y.getInstanceFromNode(t);return n&&!n._hos...
function d (line 75) | function d(e){var t=p(e);return t?t._hostContainerInfo._topLevelWrapper:...
function r (line 75) | function r(e,t,n){return{type:"INSERT_MARKUP",content:e,fromIndex:null,f...
function o (line 75) | function o(e,t,n){return{type:"MOVE_EXISTING",content:null,fromIndex:e._...
function i (line 75) | function i(e,t){return{type:"REMOVE_NODE",content:null,fromIndex:e._moun...
function a (line 75) | function a(e){return{type:"SET_MARKUP",content:e,fromIndex:null,fromNode...
function s (line 75) | function s(e){return{type:"TEXT_CONTENT",content:e,fromIndex:null,fromNo...
function u (line 75) | function u(e,t){return t&&(e=e||[],e.push(t)),e}
function l (line 75) | function l(e,t){p.processChildrenUpdates(e,t)}
function r (line 75) | function r(e){return!(!e||"function"!=typeof e.attachRef||"function"!=ty...
function r (line 75) | function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=!...
function r (line 75) | function r(){o.attachRefs(this,this._currentElement)}
function r (line 75) | function r(e,t,n){"function"==typeof e?e(t.getPublicInstance()):i.addCom...
function o (line 75) | function o(e,t,n){"function"==typeof e?e(null):i.removeComponentAsRefFro...
function r (line 75) | function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=e...
function r (line 75) | function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a ...
function e (line 75) | function e(t){r(this,e),this.transaction=t}
function r (line 75) | function r(e){u.enqueueUpdate(e)}
function o (line 75) | function o(e){var t=typeof e;if("object"!==t)return t;var n=e.constructo...
function i (line 75) | function i(e,t){var n=s.get(e);return n||null}
function r (line 75) | function r(){P.ReactReconcileTransaction&&b||c("123")}
function o (line 75) | function o(){this.reinitializeTransaction(),this.dirtyComponentsLength=n...
function i (line 75) | function i(e,t,n,o,i,a){return r(),b.batchedUpdates(e,t,n,o,i,a)}
function a (line 75) | function a(e,t){return e._mountOrder-t._mountOrder}
function s (line 75) | function s(e){var t=e.dirtyComponentsLength;t!==g.length&&c("124",t,g.le...
function u (line 75) | function u(e){if(r(),!b.isBatchingUpdates)return void b.batchedUpdates(u...
function l (line 75) | function l(e,t){b.isBatchingUpdates||c("125"),_.enqueue(e,t),C=!0}
function r (line 75) | function r(e){if("selectionStart"in e&&u.hasSelectionCapabilities(e))ret...
function o (line 75) | function o(e,t){if(y||null==m||m!==c())return null;var n=r(m);if(!g||!d(...
function r (line 76) | function r(e){return"."+e._rootNodeID}
function o (line 76) | function o(e){return"button"===e||"input"===e||"select"===e||"textarea"=...
function r (line 76) | function r(e,t,n,r){return o.call(this,e,t,n,r)}
function r (line 76) | function r(e,t,n,r){return o.call(this,e,t,n,r)}
function r (line 76) | function r(e,t,n,r){return o.call(this,e,t,n,r)}
function r (line 76) | function r(e,t,n,r){return o.call(this,e,t,n,r)}
function r (line 76) | function r(e,t,n,r){this.dispatchConfig=e,this._targetInst=t,this.native...
function r (line 76) | function r(e,t,n,r){return o.call(this,e,t,n,r)}
function r (line 76) | function r(e,t,n,r){return o.call(this,e,t,n,r)}
function r (line 76) | function r(e,t,n,r){return o.call(this,e,t,n,r)}
function r (line 76) | function r(e,t,n,r){return o.call(this,e,t,n,r)}
function r (line 76) | function r(e,t,n,r){return o.call(this,e,t,n,r)}
function r (line 76) | function r(e,t,n,r){return o.call(this,e,t,n,r)}
function r (line 76) | function r(e,t,n,r){return o.call(this,e,t,n,r)}
function r (line 76) | function r(e,t,n,r){return o.call(this,e,t,n,r)}
function r (line 76) | function r(e,t){return null==t&&o("30"),null==e?t:Array.isArray(e)?Array...
function r (line 76) | function r(e){for(var t=1,n=0,r=0,i=e.length,a=-4&i;r<a;){for(var s=Math...
function r (line 76) | function r(e,t,n){return null==t||"boolean"==typeof t||""===t?"":isNaN(t...
function r (line 76) | function r(e){var t=""+e,n=i.exec(t);if(!n)return t;var r,o="",a=0,s=0;f...
function o (line 76) | function o(e){return"boolean"==typeof e||"number"==typeof e?""+e:r(e)}
function r (line 76) | function r(e){if(null==e)return null;if(1===e.nodeType)return e;var t=a....
function r (line 76) | function r(e,t,n,r){if(e&&"object"==typeof e){var o=e;void 0===o[n]&&nul...
function o (line 76) | function o(e,t){if(null==e)return e;var n={};return i(e,r,n),n}
function r (line 76) | function r(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}
function r (line 76) | function r(e){var t,n=e.keyCode;return"charCode"in e?0===(t=e.charCode)&...
function r (line 76) | function r(e){if(e.key){var t=i[e.key]||e.key;if("Unidentified"!==t)retu...
function r (line 76) | function r(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n....
function o (line 76) | function o(e){return r}
function r (line 76) | function r(e){var t=e.target||e.srcElement||window;return t.correspondin...
function r (line 76) | function r(e){for(var t;(t=e._renderedNodeType)===o.COMPOSITE;)e=e._rend...
function r (line 76) | function r(e){var t=e&&(o&&e[o]||e[i]);if("function"==typeof t)return t}
function r (line 76) | function r(e){for(;e&&e.firstChild;)e=e.firstChild;return e}
function o (line 76) | function o(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentN...
function i (line 76) | function i(e,t){for(var n=r(e),i=0,a=0;n;){if(3===n.nodeType){if(a=i+n.t...
function r (line 76) | function r(){return!i&&o.canUseDOM&&(i="textContent"in document.document...
function r (line 76) | function r(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["We...
function o (line 76) | function o(e){if(s[e])return s[e];if(!a[e])return e;var t=a[e];for(var n...
function r (line 76) | function r(e){if(e){var t=e.getName();if(t)return" Check the render meth...
function o (line 76) | function o(e){return"function"==typeof e&&void 0!==e.prototype&&"functio...
function i (line 76) | function i(e,t){var n;if(null===e||!1===e)n=l.create(i);else if("object"...
function r (line 76) | function r(e,t){if(!i.canUseDOM||t&&!("addEventListener"in document))ret...
function r (line 76) | function r(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input...
function r (line 76) | function r(e){return'"'+o(e)+'"'}
function r (line 76) | function r(e){for(var t=arguments.length-1,n="Minified React error #"+e+...
function r (line 76) | function r(e,t){var n=null===e||!1===e,r=null===t||!1===t;if(n||r)return...
function r (line 76) | function r(e,t){return e&&"object"==typeof e&&null!=e.key?l.escape(e.key...
function o (line 76) | function o(e,t,n,i){var d=typeof e;if("undefined"!==d&&"boolean"!==d||(e...
function i (line 76) | function i(e,t,n){return null==e?0:o(e,"",t,n)}
function r (line 76) | function r(e){return e.replace(o,function(e,t){return t.toUpperCase()})}
function r (line 76) | function r(e){return o(e.replace(i,"ms-"))}
function r (line 76) | function r(e,t){return!(!e||!t)&&(e===t||!o(e)&&(o(t)?r(e,t.parentNode):...
function r (line 76) | function r(e){var t=e.length;if((Array.isArray(e)||"object"!=typeof e&&"...
function o (line 76) | function o(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"le...
function i (line 76) | function i(e){return o(e)?Array.isArray(e)?e.slice():r(e):[e]}
function r (line 76) | function r(e){var t=e.match(c);return t&&t[1].toLowerCase()}
function o (line 76) | function o(e,t){var n=l;l||u(!1);var o=r(e),i=o&&s(o);if(i){n.innerHTML=...
function r (line 76) | function r(e){return function(){return e}}
function r (line 76) | function r(e){try{e.focus()}catch(e){}}
function r (line 76) | function r(e){if(void 0===(e=e||("undefined"!=typeof document?document:v...
function r (line 76) | function r(e){return a||i(!1),d.hasOwnProperty(e)||(e="*"),s.hasOwnPrope...
function r (line 76) | function r(e){return e.Window&&e instanceof e.Window?{x:e.pageXOffset||e...
function r (line 76) | function r(e){return e.replace(o,"-$1").toLowerCase()}
function r (line 76) | function r(e){return o(e).replace(i,"-ms-")}
function r (line 76) | function r(e,t,n,r,i,a,s,u){if(o(t),!e){var l;if(void 0===t)l=new Error(...
function r (line 76) | function r(e){var t=e?e.ownerDocument||e:document,n=t.defaultView||windo...
function r (line 76) | function r(e){return o(e)&&3==e.nodeType}
function r (line 76) | function r(e){var t={};return function(n){return t.hasOwnProperty(n)||(t...
function r (line 76) | function r(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!==e&&t!==t}
function o (line 76) | function o(e,t){if(r(e,t))return!0;if("object"!=typeof e||null===e||"obj...
function r (line 76) | function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign...
function r (line 76) | function r(e,t,n,r,o){}
function n (line 76) | function n(e){var t=e&&(E&&e[E]||e[x]);if("function"==typeof t)return t}
function s (line 76) | function s(e,t){return e===t?0!==e||1/e==1/t:e!==e&&t!==t}
function u (line 76) | function u(e){this.message=e,this.stack=""}
function l (line 76) | function l(e){function n(n,r,a,s,l,c,p){if(s=s||w,c=c||a,p!==i)if(t)o(!1...
function c (line 76) | function c(e){function t(t,n,r,o,i,a){var s=t[n];if(_(s)!==e)return new ...
function p (line 76) | function p(e){function t(t,n,r,o,a){if("function"!=typeof e)return new u...
function d (line 76) | function d(e){function t(t,n,r,o,i){if(!(t[n]instanceof e)){var a=e.name...
function f (line 76) | function f(e){function t(t,n,r,o,i){for(var a=t[n],l=0;l<e.length;l++)if...
function h (line 76) | function h(e){function t(t,n,r,o,a){if("function"!=typeof e)return new u...
function m (line 76) | function m(e){function t(t,n,r,o,a){for(var s=0;s<e.length;s++){if(null=...
function v (line 76) | function v(e){function t(t,n,r,o,a){var s=t[n],l=_(s);if("object"!==l)re...
function g (line 76) | function g(t){switch(typeof t){case"number":case"string":case"undefined"...
function y (line 76) | function y(e,t){return"symbol"===e||("Symbol"===t["@@toStringTag"]||"fun...
function _ (line 76) | function _(e){var t=typeof e;return Array.isArray(e)?"array":e instanceo...
function C (line 76) | function C(e){var t=_(e);if("object"===t){if(e instanceof Date)return"da...
function b (line 76) | function b(e){return e.constructor&&e.constructor.name?e.constructor.nam...
function t (line 76) | function t(t,n,r,o,i){var a=t[n];if(!e(a)){return new u("Invalid "+o+" `...
function e (line 76) | function e(e,t,n,r,o){return g(e[t])?null:new u("Invalid "+r+" `"+o+"` s...
function registerAsciinemaPlayerElement (line 187) | function registerAsciinemaPlayerElement() {
function ca (line 312) | function ca(a){return"string"==typeof a}
function da (line 312) | function da(a,b){var c=a.split("."),d=ba;c[0]in d||!d.execScript||d.exec...
function ea (line 312) | function ea(){}
function n (line 313) | function n(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)...
function fa (line 314) | function fa(a){var b=n(a);return"array"==b||"object"==b&&"number"==typeo...
function ha (line 314) | function ha(a){return"function"==n(a)}
function ia (line 314) | function ia(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}
function ja (line 314) | function ja(a){return a[la]||(a[la]=++ma)}
function na (line 314) | function na(a,b,c){return a.call.apply(a.bind,arguments)}
function oa (line 315) | function oa(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Arra...
function pa (line 315) | function pa(a,b,c){pa=Function.prototype.bind&&-1!=Function.prototype.bi...
function qa (line 316) | function qa(a,b){function c(){}c.prototype=b.prototype;a.Zd=b.prototype;...
function ta (line 316) | function ta(a,b){return a<b?-1:a>b?1:0}
function wa (line 317) | function wa(a){a:{var b=xa;for(var c=a.length,d=ca(a)?a.split(""):a,e=0;...
function ya (line 317) | function ya(a,b){var c=ua(a,b),d;(d=0<=c)&&Array.prototype.splice.call(a...
function za (line 317) | function za(a,b){a.sort(b||Aa)}
function Ca (line 317) | function Ca(a,b){for(var c=Array(a.length),d=0;d<a.length;d++)c[d]={inde...
function Aa (line 318) | function Aa(a,b){return a>b?1:a<b?-1:0}
function Da (line 318) | function Da(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b}
function Ea (line 318) | function Ea(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b}
function Ia (line 318) | function Ia(a,b){for(var c,d,e=1;e<arguments.length;e++){d=arguments[e];...
function Ka (line 318) | function Ka(a){if(a.Yc&&"function"==typeof a.Yc)return a.Yc();if(ca(a))r...
function La (line 319) | function La(a,b){if(a.forEach&&"function"==typeof a.forEach)a.forEach(b,...
function Ma (line 319) | function Ma(a,b){this.ic={};this.ib=[];this.Fc=0;var c=arguments.length;...
function Na (line 320) | function Na(a){if(a.Fc!=a.ib.length){for(var b=0,c=0;b<a.ib.length;){var...
function Qa (line 321) | function Qa(a,b){this.Ma=[];this.Lc=b;for(var c=!0,d=a.length-1;0<=d;d--...
function Sa (line 321) | function Sa(a){if(-128<=a&&128>a){var b=Ra[a];if(b)return b}b=new Qa([a|...
function Ta (line 321) | function Ta(a){if(isNaN(a)||!isFinite(a))return Ua;if(0>a)return Ta(-a)....
function Ya (line 323) | function Ya(a,b){return 0>b?0:b<a.Ma.length?a.Ma[b]:a.Lc}
function ab (line 327) | function ab(a,b){for(;(a[b]&65535)!=a[b];)a[b+1]+=a[b]>>>16,a[b]&=65535,...
function Za (line 328) | function Za(a,b){if(b.hc())throw Error("division by zero");if(a.hc())ret...
function cb (line 330) | function cb(a,b){null!=a&&this.append.apply(this,arguments)}
function eb (line 330) | function eb(a){eb[" "](a);return a}
function fb (line 330) | function fb(a,b){var c=gb;return Object.prototype.hasOwnProperty.call(c,...
function ob (line 330) | function ob(){return new r(null,5,[pb,!0,qb,!0,rb,!1,sb,!1,tb,null],null)}
function t (line 330) | function t(a){return null!=a&&!1!==a}
function ub (line 330) | function ub(a){return null==a}
function vb (line 330) | function vb(a){return a instanceof Array}
function wb (line 330) | function wb(a){return null==a?!0:!1===a?!0:!1}
function yb (line 330) | function yb(a){return ca(a)}
function Ab (line 330) | function Ab(a,b){return a[n(null==b?null:b)]?!0:a._?!0:!1}
function Bb (line 331) | function Bb(a){return null==a?null:a.constructor}
function Cb (line 331) | function Cb(a,b){var c=Bb(b);c=t(t(c)?c.qc:c)?c.Tb:n(b);return Error(["N...
function Db (line 331) | function Db(a){var b=a.Tb;return t(b)?b:""+v.h(a)}
function Gb (line 331) | function Gb(a){for(var b=a.length,c=Array(b),d=0;;)if(d<b)c[d]=a[d],d+=1...
function Lb (line 332) | function Lb(a){return Mb(function(a,c){a.push(c);return a},[],a)}
function Nb (line 332) | function Nb(){}
function Ob (line 332) | function Ob(){}
function Pb (line 333) | function Pb(){}
function Sb (line 333) | function Sb(){}
function Ub (line 334) | function Ub(){}
function Vb (line 335) | function Vb(){}
function Zb (line 336) | function Zb(){}
function $b (line 336) | function $b(){}
function fc (line 339) | function fc(){}
function hc (line 340) | function hc(){}
function lc (line 341) | function lc(){}
function pc (line 343) | function pc(){}
function rc (line 344) | function rc(){}
function uc (line 345) | function uc(){}
function wc (line 347) | function wc(){}
function Bc (line 349) | function Bc(){}
function Ec (line 349) | function Ec(){}
function Fc (line 349) | function Fc(){}
function Gc (line 349) | function Gc(){}
function Hc (line 349) | function Hc(){}
function Kc (line 350) | function Kc(){}
function Tc (line 354) | function Tc(){}
function cd (line 361) | function cd(){}
function ed (line 362) | function ed(a){this.Nf=a;this.m=1073741824;this.J=0}
function fd (line 362) | function fd(a){var b=new cb;a.R(null,new ed(b),ob());return""+v.h(b)}
function hd (line 362) | function hd(a){a=gd(a|0,-862048943);return gd(a<<15|a>>>-15,461845907)}
function id (line 363) | function id(a,b){var c=(a|0)^(b|0);return gd(c<<13|c>>>-13,5)+-430675100|0}
function jd (line 363) | function jd(a,b){var c=(a|0)^b;c=gd(c^c>>>16,-2048144789);c=gd(c^c>>>13,...
function kd (line 363) | function kd(a){a:{var b=1;for(var c=0;;)if(b<a.length){var d=b+2;c=id(c,...
function nd (line 364) | function nd(a){255<md&&(ld={},md=0);if(null==a)return 0;var b=ld[a];if("...
function od (line 365) | function od(a){if(null!=a&&(a.m&4194304||q===a.Sf))return a.U(null)^0;if...
function pd (line 365) | function pd(a,b){return a^b+2654435769+(a<<6)+(a>>2)}
function qd (line 365) | function qd(a){return a instanceof rd}
function sd (line 366) | function sd(a,b){if(a.Zb===b.Zb)return 0;var c=wb(a.fb);if(t(c?b.fb:c))r...
function rd (line 366) | function rd(a,b,c,d,e){this.fb=a;this.name=b;this.Zb=c;this.Oc=d;this.hb...
function ud (line 369) | function ud(a){return null!=a?a.J&131072||q===a.Tf?!0:a.J?!1:Ab(cd,a):Ab...
function E (line 370) | function E(a){if(null==a)return null;if(null!=a&&(a.m&8388608||q===a.Pe)...
function y (line 370) | function y(a){if(null==a)return null;if(null!=a&&(a.m&64||q===a.G))retur...
function vd (line 370) | function vd(a){return null!=a?null!=a&&(a.m&64||q===a.G)?a.bb(null):(a=E...
function z (line 371) | function z(a){return null==a?null:null!=a&&(a.m&128||q===a.Id)?a.Ka(null...
function xd (line 372) | function xd(a){this.s=a}
function yd (line 372) | function yd(a){return new xd(E(a))}
function zd (line 372) | function zd(a,b){var c=hd(a);c=id(0,c);return jd(c,b)}
function Ad (line 373) | function Ad(a){var b=0,c=1;for(a=E(a);;)if(null!=a)b+=1,c=gd(31,c)+od(y(...
function Dd (line 373) | function Dd(a){var b=0,c=0;for(a=E(a);;)if(null!=a)b+=1,c=c+od(y(a))|0,a...
function Fd (line 374) | function Fd(a){return a+1}
function Gd (line 374) | function Gd(a){this.H=a;this.m=32768;this.J=0}
function Hd (line 374) | function Hd(a){return a instanceof Gd}
function Id (line 374) | function Id(a){return Hd(a)?a:new Gd(a)}
function Jd (line 375) | function Jd(a){return Hd(a)?B(a):a}
function Kd (line 375) | function Kd(a,b){var c=Qb(a);if(0===c)return b.B?b.B():b.call(null);for(...
function Ld (line 375) | function Ld(a,b,c){var d=Qb(a),e=c;for(c=0;;)if(c<d){var f=A.c(a,c);e=b....
function Md (line 376) | function Md(a,b){var c=a.length;if(0===a.length)return b.B?b.B():b.call(...
function Nd (line 376) | function Nd(a,b,c){var d=a.length,e=c;for(c=0;;)if(c<d){var f=a[c];e=b.c...
function Od (line 376) | function Od(a,b,c,d){for(var e=a.length;;)if(d<e){var f=a[d];c=b.c?b.c(c...
function Pd (line 377) | function Pd(a){return null!=a?a.m&2||q===a.jf?!0:a.m?!1:Ab(Pb,a):Ab(Pb,a)}
function Qd (line 377) | function Qd(a){return null!=a?a.m&16||q===a.Ne?!0:a.m?!1:Ab(Ub,a):Ab(Ub,a)}
function Ud (line 377) | function Ud(a,b,c){var d=H(a);if(c>=d)return-1;!(0<c)&&0>c&&(c+=d,c=0>c?...
function Xd (line 377) | function Xd(a,b,c){var d=H(a);if(0===d)return-1;0<c?(--d,c=d<c?d:c):c=0>...
function Yd (line 377) | function Yd(a,b){this.o=a;this.i=b}
function Jb (line 378) | function Jb(a,b,c){this.o=a;this.i=b;this.meta=c;this.m=166592766;this.J...
function a (line 380) | function a(a){return Xd(this,a,H(this))}
function be (line 382) | function be(a){return 0<a.length?new Jb(a,0,null):null}
function Zd (line 382) | function Zd(a,b,c){this.Gd=a;this.i=b;this.meta=c;this.m=32374990;this.J...
function a (line 384) | function a(a){return Xd(this,a,H(this))}
function ee (line 385) | function ee(a){return y(z(a))}
function fe (line 385) | function fe(a){for(;;){var b=z(a);if(null!=b)a=b;else return y(a)}}
function ie (line 387) | function ie(a){return null==a?null:Rb(a)}
function H (line 387) | function H(a){if(null!=a)if(null!=a&&(a.m&2||q===a.jf))a=a.W(null);else ...
function je (line 388) | function je(a,b,c){for(;;){if(null==a)return c;if(0===b)return E(a)?y(a)...
function Vd (line 389) | function Vd(a,b){if("number"!==typeof b)throw Error("Index argument to n...
function J (line 391) | function J(a,b,c){if("number"!==typeof b)throw Error("Index argument to ...
function me (line 396) | function me(a){var b=ha(a);return b?b:null!=a?q===a.hf?!0:a.Tc?!1:Ab(Nb,...
function ne (line 396) | function ne(a,b){this.C=a;this.meta=b;this.m=393217;this.J=0}
function a (line 397) | function a(a,b,c,d,e,f,h,k,m,l,p,u,w,x,C,F,I,M,S,X,Q,Ga){return oe(this....
function b (line 397) | function b(a,b,c,d,e,f,h,k,m,l,p,u,w,x,C,F,I,M,S,X,Q){a=this;return a.C....
function c (line 397) | function c(a,b,c,d,e,f,h,k,m,l,p,u,w,x,C,F,I,M,S,X){a=this;return a.C.Wa...
function d (line 397) | function d(a,
function e (line 398) | function e(a,b,c,d,e,f,h,k,m,l,p,u,w,x,C,F,I,M){a=this;return a.C.Ua?a.C...
function f (line 398) | function f(a,b,c,d,e,f,h,k,m,l,p,u,w,x,C,F,I){a=this;return a.C.Ta?a.C.T...
function h (line 398) | function h(a,b,c,d,e,f,h,k,m,l,p,u,
function k (line 399) | function k(a,b,c,d,e,f,h,k,m,l,p,u,w,x,C){a=this;return a.C.Ra?a.C.Ra(b,...
function l (line 399) | function l(a,b,c,d,e,f,h,k,m,l,p,u,w,x){a=this;return a.C.Qa?a.C.Qa(b,c,...
function p (line 399) | function p(a,b,c,d,e,f,h,k,m,l,p,u,w){a=this;return a.C.Pa?a.C.Pa(b,c,d,...
function m (line 400) | function m(a,b,c,d,e,f,h,k,m,l,p,u){a=this;return a.C.Oa?a.C.Oa(b,c,d,e,...
function u (line 400) | function u(a,b,c,d,e,f,h,k,m,l,p){a=this;return a.C.Na?a.C.Na(b,c,d,e,f,...
function w (line 400) | function w(a,b,c,d,e,f,h,k,m,l){a=this;return a.C.Za?a.C.Za(b,c,d,e,f,h,...
function x (line 400) | function x(a,b,c,d,e,f,h,k,m){a=this;return a.C.Ha?a.C.Ha(b,c,d,e,f,h,k,...
function C (line 400) | function C(a,b,c,d,e,f,
function F (line 401) | function F(a,b,c,d,e,f,h){a=this;return a.C.Ca?a.C.Ca(b,c,d,e,f,h):a.C.c...
function I (line 401) | function I(a,b,c,d,e,f){a=this;return a.C.Z?a.C.Z(b,c,d,e,f):a.C.call(nu...
function M (line 401) | function M(a,b,c,d,e){a=this;return a.C.M?a.C.M(b,c,d,e):a.C.call(null,b...
function S (line 401) | function S(a,b,c,d){a=this;return a.C.l?a.C.l(b,c,d):a.C.call(null,b,c,d)}
function X (line 401) | function X(a,b,c){a=this;return a.C.c?a.C.c(b,c):a.C.call(null,b,c)}
function Ga (line 401) | function Ga(a,b){a=this;
function db (line 402) | function db(a){a=this;return a.C.B?a.C.B():a.C.call(null)}
function pe (line 412) | function pe(a,b){return ha(a)?new ne(a,b):null==a?null:tc(a,b)}
function qe (line 412) | function qe(a){var b=null!=a;return(b?null!=a?a.m&131072||q===a.tf||(a.m...
function te (line 413) | function te(a){return null==a||wb(E(a))}
function ue (line 413) | function ue(a){return null==a?!1:null!=a?a.m&8||q===a.Qf?!0:a.m?!1:Ab(Sb...
function ve (line 413) | function ve(a){return null==a?!1:null!=a?a.m&4096||q===a.$f?!0:a.m?!1:Ab...
function we (line 414) | function we(a){return null!=a?a.m&16777216||q===a.Zf?!0:a.m?!1:Ab(Ec,a):...
function xe (line 414) | function xe(a){return null==a?!1:null!=a?a.m&1024||q===a.Wf?!0:a.m?!1:Ab...
function ye (line 414) | function ye(a){return null!=a?a.m&67108864||q===a.Xf?!0:a.m?!1:Ab(Gc,a):...
function ze (line 414) | function ze(a){return null!=a?a.m&16384||q===a.ag?!0:a.m?!1:Ab(pc,a):Ab(...
function Ae (line 414) | function Ae(a){return null!=a?a.J&512||q===a.Pf?!0:!1:!1}
function Be (line 414) | function Be(a,b,c,d,e){for(;0!==e;)c[d]=a[b],d+=1,--e,b+=1}
function De (line 415) | function De(a){return null==a?!1:null!=a?a.m&64||q===a.G?!0:a.m?!1:Ab(Vb...
function Ee (line 415) | function Ee(a){return null==a?!1:!1===a?!1:!0}
function Fe (line 415) | function Fe(a){var b=me(a);return b?b:null!=a?a.m&1||q===a.Rf?!0:a.m?!1:...
function Ge (line 415) | function Ge(a){return"number"===typeof a&&!isNaN(a)&&Infinity!==a&&parse...
function He (line 415) | function He(a,b){return D.l(a,b,Ce)===Ce?!1:!0}
function Ke (line 417) | function Ke(a,b){if(a===b)return 0;if(null==a)return-1;if(null==b)return...
function Le (line 418) | function Le(a,b){var c=H(a),d=H(b);if(c<d)c=-1;else if(c>d)c=1;else if(0...
function Me (line 418) | function Me(a){return G.c(a,Ke)?Ke:function(b,c){var d=a.c?a.c(b,c):a.ca...
function Ne (line 418) | function Ne(a,b){if(E(b)){a:{var c=[];for(var d=E(b);;)if(null!=d)c.push...
function Oe (line 419) | function Oe(a){var b=Pe("@!\"#%\x26'*+-/:[{\x3c\\|\x3d]}\x3e^~?".split("...
function Qe (line 419) | function Qe(a,b){return Ne(function(b,d){var c=a.h?a.h(b):a.call(null,b)...
function ce (line 420) | function ce(a,b){var c=E(b);return c?Mb(a,y(c),z(c)):a.B?a.B():a.call(nu...
function de (line 420) | function de(a,b,c){for(c=E(c);;)if(c){var d=y(c);b=a.c?a.c(b,d):a.call(n...
function Re (line 420) | function Re(a,b){var c=dd(a);if(t(c.ja()))for(var d=c.next();;)if(c.ja()...
function Se (line 421) | function Se(a,b,c){for(a=dd(a);;)if(a.ja()){var d=a.next();c=b.c?b.c(c,d...
function Te (line 421) | function Te(a,b){return null!=b&&(b.m&524288||q===b.uf)?b.Fa(null,a):vb(...
function Mb (line 421) | function Mb(a,b,c){return null!=c&&(c.m&524288||q===c.uf)?c.Ga(null,a,b)...
function Ue (line 421) | function Ue(a,b,c){return null!=c?yc(c,a,b):b}
function Ve (line 422) | function Ve(a){return a}
function We (line 422) | function We(a,b,c,d){a=a.h?a.h(b):a.call(null,b);c=Mb(a,c,d);return a.h?...
function Ze (line 424) | function Ze(a){a=(a-a%2)/2;return 0<=a?Math.floor(a):Math.ceil(a)}
function $e (line 424) | function $e(a){a-=a>>1&1431655765;a=(a&858993459)+(a>>2&858993459);retur...
function $d (line 426) | function $d(a,b){if(we(b))if(Pd(a)&&Pd(b)&&H(a)!==H(b))var c=!1;else a:{...
function af (line 426) | function af(a,b,c,d,e){this.meta=a;this.first=b;this.kc=c;this.count=d;t...
function a (line 428) | function a(a){return Xd(this,a,this.count)}
function bf (line 430) | function bf(a){this.meta=a;this.m=65937614;this.J=8192}
function a (line 431) | function a(a){return Xd(this,a,H(this))}
function cf (line 433) | function cf(a){return(null!=a?a.m&134217728||q===a.Yf||(a.m?0:Ab(Hc,a)):...
function ef (line 434) | function ef(a,b,c,d){this.meta=a;this.first=b;this.kc=c;this.w=d;this.m=...
function a (line 435) | function a(a){return Xd(this,a,H(this))}
function ae (line 436) | function ae(a,b){return null==b||null!=b&&(b.m&64||q===b.G)?new ef(null,...
function ff (line 437) | function ff(a,b){if(a.ea===b.ea)return 0;var c=wb(a.fb);if(t(c?b.fb:c))r...
function L (line 437) | function L(a,b,c,d){this.fb=a;this.name=b;this.ea=c;this.Oc=d;this.m=215...
function gf (line 439) | function gf(a){return a instanceof L}
function N (line 439) | function N(a,b){return a===b?!0:a instanceof L&&b instanceof L?a.ea===b....
function kf (line 442) | function kf(a,b,c,d){this.meta=a;this.Vc=b;this.s=c;this.w=d;this.m=3237...
function lf (line 442) | function lf(a){null!=a.Vc&&(a.s=a.Vc.B?a.Vc.B():a.Vc.call(null),a.Vc=nul...
function a (line 444) | function a(a){return Xd(this,a,H(this))}
function mf (line 446) | function mf(a,b){this.aa=a;this.end=b;this.m=2;this.J=0}
function of (line 446) | function of(a){return new mf(Array(a),0)}
function nf (line 446) | function nf(a,b,c){this.o=a;this.ab=b;this.end=c;this.m=524306;this.J=0}
function pf (line 447) | function pf(a,b,c,d){this.Da=a;this.Wb=b;this.meta=c;this.w=d;this.m=318...
function a (line 449) | function a(a){return Xd(this,a,H(this))}
function qf (line 451) | function qf(a,b){return 0===Qb(a)?b:new pf(a,b,null,null)}
function rf (line 451) | function rf(a,b){a.add(b)}
function sf (line 451) | function sf(a,b){if(Pd(b))return H(b);for(var c=0,d=E(b);;)if(null!=d&&c...
function vf (line 456) | function vf(a,b,c){var d=E(c);if(0===b)return a.B?a.B():a.call(null);c=W...
function wf (line 460) | function wf(a,b,c){return null==c?a.h?a.h(b):a.call(a,b):xf(a,b,Wb(c),z(...
function xf (line 460) | function xf(a,b,c,d){return null==d?a.c?a.c(b,c):a.call(a,b,c):yf(a,b,c,...
function yf (line 460) | function yf(a,b,c,d,e){return null==e?a.l?a.l(b,c,d):a.call(a,b,c,d):zf(...
function zf (line 461) | function zf(a,b,c,d,e,f){if(null==f)return a.M?a.M(b,c,d,e):a.call(a,b,c...
function P (line 465) | function P(a,b){if(a.N){var c=a.L,d=sf(c+1,b);return d<=c?vf(a,d,b):a.N(...
function Kb (line 465) | function Kb(a,b,c){if(a.N){b=ae(b,c);var d=a.L;c=sf(d,c)+1;return c<=d?v...
function Af (line 465) | function Af(a,b,c,d,e){return a.N?(b=ae(b,ae(c,ae(d,e))),c=a.L,e=3+sf(c-...
function oe (line 465) | function oe(a,b,c,d,e,f){return a.N?(f=tf(f),b=ae(b,ae(c,ae(d,ae(e,f))))...
function Bf (line 466) | function Bf(a){return E(a)?a:null}
function Cf (line 467) | function Cf(){"undefined"===typeof hb&&(hb=function(a){this.zf=a;this.m=...
function Ff (line 468) | function Ff(a,b){this.s=a;this.i=b}
function Gf (line 468) | function Gf(a,b){this.o=a;this.i=b}
function Jf (line 469) | function Jf(a,b){this.cd=a;this.ub=b}
function Kf (line 470) | function Kf(a){if(ud(a))return dd(a);if(null==a)return Cf();if("string"=...
function Mf (line 470) | function Mf(a){this.ae=a}
function Of (line 471) | function Of(a){this.H=a}
function Pf (line 471) | function Pf(){}
function Sf (line 472) | function Sf(a,b,c,d,e,f){this.buffer=a;this.ub=b;this.pe=c;this.Rb=d;thi...
function Tf (line 475) | function Tf(a,b){var c=new Sf(Qf,Nf,!1,null,b,!1);c.Rb=function(){var b=...
function Uf (line 476) | function Uf(a,b){var c=Kf(b);c=Tf(a,c);c=Rf(c);return t(c)?c:wd}
function Vf (line 476) | function Vf(a,b){for(;;){if(null==E(b))return!0;var c=y(b);c=a.h?a.h(c):...
function Wf (line 476) | function Wf(a,b){for(;;)if(E(b)){var c=y(b);c=a.h?a.h(c):a.call(null,c);...
function Xf (line 476) | function Xf(a){if(Ge(a))return 0===(a&1);throw Error(["Argument must be ...
function Yf (line 477) | function Yf(a){return function(){function b(b,c){return wb(a.c?a.c(b,c):...
function Zf (line 479) | function Zf(a){return function(){function b(b){if(0<arguments.length)for...
function c (line 481) | function c(c,d,e){c=b.l?b.l(c,d,e):b.call(null,c,d,e);return a.h?a.h(c):...
function d (line 481) | function d(c,d){var e=b.c?b.c(c,d):b.call(null,c,d);return a.h?a.h(e):a....
function e (line 481) | function e(c){c=b.h?b.h(c):b.call(null,c);return a.h?a.h(c):a.call(null,c)}
function f (line 481) | function f(){var c=b.B?b.B():b.call(null);return a.h?a.h(c):a.call(null,c)}
function c (line 481) | function c(a,b,c,e){var f=null;if(3<arguments.length){f=0;for(var h=Arra...
function d (line 482) | function d(c,d,e,f){c=Af(b,c,d,e,f);return a.h?a.h(c):a.call(null,c)}
function d (line 484) | function d(d,e,f){d=c.l?c.l(d,e,f):c.call(null,d,e,f);d=b.h?b.h(d):b.cal...
function e (line 484) | function e(d,e){var f=c.c?c.c(d,e):c.call(null,d,e);f=b.h?b.h(f):b.call(...
function f (line 484) | function f(d){d=c.h?c.h(d):c.call(null,d);d=b.h?b.h(d):b.call(null,d);re...
function h (line 484) | function h(){var d=c.B?c.B():c.call(null);d=b.h?b.h(d):b.call(null,d);re...
function d (line 484) | function d(a,
function e (line 485) | function e(d,e,f,h){d=Af(c,d,e,f,h);d=b.h?b.h(d):b.call(null,d);return a...
function b (line 487) | function b(a){var b=null;if(0<arguments.length){b=0;for(var d=Array(argu...
function c (line 487) | function c(b){b=P(y(a),b);for(var c=z(a);;)if(c){var d=y(c);b=d.h?d.h(b)...
function c (line 490) | function c(c,d,e){return a.M?a.M(b,c,d,e):a.call(null,b,c,d,e)}
function d (line 490) | function d(c,d){return a.l?a.l(b,c,d):a.call(null,b,c,d)}
function e (line 490) | function e(c){return a.c?a.c(b,c):a.call(null,b,c)}
function f (line 490) | function f(){return a.h?a.h(b):a.call(null,b)}
function c (line 490) | function c(a,b,c,e){var f=null;if(3<arguments.length){f=0;for(var h=Arra...
function d (line 490) | function d(c,d,e,f){return oe(a,b,c,d,e,be([f]))}
function d (line 493) | function d(d,e,f){return a.Z?a.Z(b,c,d,e,f):a.call(null,b,c,d,e,f)}
function e (line 493) | function e(d,e){return a.M?a.M(b,c,d,e):a.call(null,b,c,d,e)}
function f (line 493) | function f(d){return a.l?a.l(b,c,d):a.call(null,b,c,d)}
function h (line 493) | function h(){return a.c?a.c(b,c):a.call(null,b,c)}
function d (line 493) | function d(a,b,c,d){var f=null;if(3<arguments.length){f=0;for(var h=Arra...
function e (line 493) | function e(d,e,f,h){return oe(a,
function e (line 496) | function e(e,f,h){return a.Ca?a.Ca(b,c,d,e,f,h):a.call(null,b,c,d,e,f,h)}
function f (line 496) | function f(e,f){return a.Z?a.Z(b,c,d,e,f):a.call(null,b,c,d,e,f)}
function h (line 496) | function h(e){return a.M?a.M(b,c,d,e):a.call(null,b,c,d,e)}
function k (line 496) | function k(){return a.l?a.l(b,c,d):a.call(null,b,c,d)}
function e (line 496) | function e(a,b,c,d){var e=null;if(3<arguments.length){e=0;for(var h=Arra...
function f (line 496) | function f(e,
function f (line 498) | function f(a){var b=null;if(0<arguments.length){b=0;for(var c=Array(argu...
function h (line 498) | function h(f){return Af(a,b,c,d,O.c(e,f))}
function bg (line 499) | function bg(a,b){return function f(b,e){return new kf(null,function(){va...
function cg (line 499) | function cg(a,b,c,d){this.state=a;this.meta=b;this.df=c;this.gb=d;this.J...
function fg (line 502) | function fg(a,b){if(a instanceof cg){var c=a.df;if(null!=c&&!t(c.h?c.h(b...
function hg (line 505) | function hg(a){this.state=a;this.m=32768;this.J=0}
function c (line 507) | function c(c,d){var e=a.h?a.h(d):a.call(null,d);return b.c?b.c(c,e):b.ca...
function d (line 507) | function d(a){return b.h?b.h(a):b.call(null,a)}
function e (line 507) | function e(){return b.B?b.B():b.call(null)}
function c (line 507) | function c(a,b,c){var e=null;if(2<arguments.length){e=0;for(var f=Array(...
function d (line 507) | function d(c,d,e){d=Kb(a,d,e);return b.c?b.c(c,d):b.call(null,c,d)}
function jg (line 511) | function jg(a,b){return new kf(null,function(){if(0<a){var c=E(b);return...
function kg (line 512) | function kg(a,b){return new kf(null,function(c){return function(){return...
function lg (line 512) | function lg(a){return ig.l(function(a){return a},a,kg(2,a))}
function mg (line 513) | function mg(a){return function(b){return function(c){return function(){f...
function ng (line 514) | function ng(a,b){return new kf(null,function(c){return function(){return...
function pg (line 514) | function pg(a){return new kf(null,function(){return ae(a,pg(a))},null,nu...
function qg (line 514) | function qg(a,b){return jg(a,pg(b))}
function sg (line 515) | function sg(a,b){return P(O,Kb(ig,a,b))}
function tg (line 516) | function tg(a){return function(b){return function(){function c(c,d){retu...
function ug (line 517) | function ug(a,b){return new kf(null,function(){var c=E(b);if(c){if(Ae(c)...
function vg (line 517) | function vg(a,b){return ug(Yf(a),b)}
function xg (line 519) | function xg(a,b){return Qc(Mb(function(b,d){return uf.c(b,a.h?a.h(d):a.c...
function yg (line 519) | function yg(a,b,c){return new kf(null,function(){var d=E(c);if(d){var e=...
function Bg (line 524) | function Bg(a,b,c){return K.l(a,b,function(){var d=D.c(a,b);return c.h?c...
function Cg (line 524) | function Cg(a,b,c,d){return K.l(a,b,function(){var e=D.c(a,b);return c.c...
function Dg (line 524) | function Dg(a,b,c){var d=V,e=Eg;return K.l(a,d,function(){var f=D.c(a,d)...
function Fg (line 524) | function Fg(a,b){this.la=a;this.o=b}
function Gg (line 525) | function Gg(a){return new Fg(a,[null,null,null,null,null,null,null,null,...
function Hg (line 525) | function Hg(a){return new Fg(a.la,Gb(a.o))}
function Ig (line 525) | function Ig(a){a=a.F;return 32>a?0:a-1>>>5<<5}
function Jg (line 525) | function Jg(a,b,c){for(;;){if(0===b)return c;var d=Gg(a);d.o[0]=c;c=d;b-...
function Lg (line 526) | function Lg(a,b){throw Error(["No item ",v.h(a)," in vector of length ",...
function Mg (line 526) | function Mg(a,b){if(b>=Ig(a))return a.fa;for(var c=a.root,d=a.shift;;)if...
function Pg (line 527) | function Pg(a,b,c,d,e,f){this.i=a;this.base=b;this.o=c;this.Ja=d;this.st...
function Qg (line 528) | function Qg(a,b,c){return new Pg(b,b-b%32,b<H(a)?Mg(a,b):null,a,b,c)}
function Rg (line 528) | function Rg(a,b,c,d){return c<d?Sg(a,b,Vd(a,c),c+1,d):b.B?b.B():b.call(n...
function Sg (line 529) | function Sg(a,b,c,d,e){var f=c;c=d;for(d=Mg(a,d);;)if(c<e){var h=c&31;d=...
function R (line 529) | function R(a,b,c,d,e,f){this.meta=a;this.F=b;this.shift=c;this.root=d;th...
function a (line 531) | function a(a){return Xd(this,a,H(this))}
function Vg (line 542) | function Vg(a){var b=a.length;if(32>b)return new R(null,b,5,T,a,null);fo...
function Wg (line 542) | function Wg(a){return vb(a)?Vg(a):Qc(Mb(Pc,Oc(he),a))}
function Ug (line 543) | function Ug(a,b,c,d,e,f){this.zb=a;this.node=b;this.i=c;this.ab=d;this.m...
function a (line 545) | function a(a){return Xd(this,a,H(this))}
function Yg (line 548) | function Yg(a,b,c,d,e){this.meta=a;this.Ja=b;this.start=c;this.end=d;thi...
function a (line 549) | function a(a){return Xd(this,a,H(this))}
function Zg (line 555) | function Zg(a,b,c,d,e){for(;;)if(b instanceof Yg)c=b.start+c,d=b.start+d...
function $g (line 555) | function $g(a,b){return a===b.la?b:new Fg(a,Gb(b.o))}
function Tg (line 556) | function Tg(a,b,c,d){this.F=a;this.shift=b;this.root=c;this.fa=d;this.J=...
function bh (line 560) | function bh(a,b,c){if(a.root.la){if(0<=b&&b<a.F){if(Ig(a)<=b)a.fa[b&31]=...
function ch (line 562) | function ch(){this.m=2097152;this.J=0}
function eh (line 563) | function eh(a,b){return Ee(xe(b)&&!ye(b)?H(a)===H(b)?(null!=a?a.m&104857...
function fh (line 563) | function fh(a,b,c,d,e){this.i=a;this.Mf=b;this.Ie=c;this.wf=d;this.Se=e}
function gh (line 564) | function gh(a){this.s=a}
function hh (line 564) | function hh(a){this.s=a}
function ih (line 566) | function ih(a,b){if(b instanceof L)a:{var c=a.length;for(var d=b.ea,e=0;...
function jh (line 567) | function jh(a,b,c){this.o=a;this.i=b;this.hb=c;this.m=32374990;this.J=0}
function a (line 568) | function a(a){return Xd(this,a,H(this))}
function kh (line 570) | function kh(a,b,c){this.o=a;this.i=b;this.F=c}
function r (line 570) | function r(a,b,c,d){this.meta=a;this.F=b;this.o=c;this.w=d;this.m=166479...
function ke (line 578) | function ke(a){for(var b=[],c=0;;)if(c<a.length){var d=a[c],e=a[c+1],f=i...
function nh (line 578) | function nh(a,b,c){this.Uc=a;this.Zc=b;this.o=c;this.m=258;this.J=56}
function qh (line 580) | function qh(){this.H=!1}
function rh (line 581) | function rh(a,b){return a===b?!0:N(a,b)?!0:G.c(a,b)}
function sh (line 581) | function sh(a,b,c){a=Gb(a);a[b]=c;return a}
function th (line 581) | function th(a,b){var c=Array(a.length-2);Be(a,0,c,0,2*b);Be(a,2*(b+1),c,...
function uh (line 581) | function uh(a,b,c,d){a=a.Gc(b);a.o[c]=d;return a}
function vh (line 581) | function vh(a,b,c){for(var d=a.length,e=0,f=c;;)if(e<d){c=a[e];if(null!=...
function wh (line 582) | function wh(a,b,c,d){this.o=a;this.i=b;this.sd=c;this.Lb=d}
function xh (line 583) | function xh(a,b,c){this.la=a;this.na=b;this.o=c;this.J=131072;this.m=0}
function Ch (line 590) | function Ch(a,b,c){this.o=a;this.i=b;this.Lb=c}
function Ah (line 591) | function Ah(a,b,c){this.la=a;this.F=b;this.o=c;this.J=131072;this.m=0}
function Eh (line 595) | function Eh(a,b,c){b*=2;for(var d=0;;)if(d<b){if(rh(c,a[d]))return d;d+=...
function Bh (line 595) | function Bh(a,b,c,d){this.la=a;this.ec=b;this.F=c;this.o=d;this.J=131072...
function Fh (line 598) | function Fh(a,b,c,d,e){this.meta=a;this.Mb=b;this.i=c;this.s=d;this.w=e;...
function a (line 599) | function a(a){return Xd(this,a,H(this))}
function yh (line 601) | function yh(a,b,c){if(null==c)for(c=a.length;;)if(b<c){if(null!=a[b])ret...
function Gh (line 601) | function Gh(a,b,c,d,e){this.meta=a;this.Mb=b;this.i=c;this.s=d;this.w=e;...
function a (line 603) | function a(a){return Xd(this,a,H(this))}
function Dh (line 605) | function Dh(a,b,c){if(null==c)for(c=a.length;;)if(b<c){var d=a[b];if(t(d...
function Hh (line 605) | function Hh(a,b,c){this.eb=a;this.bf=b;this.xe=c}
function Jh (line 606) | function Jh(a,b,c,d,e,f){this.meta=a;this.F=b;this.root=c;this.cb=d;this...
function Pe (line 613) | function Pe(a,b){for(var c=a.length,d=0,e=Oc(ph);;)if(d<c){var f=d+1;e=e...
function Kh (line 613) | function Kh(a,b,c,d,e){this.la=a;this.root=b;this.count=c;this.cb=d;this...
function Lh (line 614) | function Lh(a,b,c){if(a.la){if(null==b)a.eb!==c&&(a.eb=c),a.cb||(a.count...
function Mh (line 616) | function Mh(a,b,c){for(var d=b;;)if(null!=a)b=c?a.left:a.right,d=ge.c(d,...
function Nh (line 616) | function Nh(a,b,c,d,e){this.meta=a;this.stack=b;this.vc=c;this.F=d;this....
function a (line 618) | function a(a){return Xd(this,a,H(this))}
function Oh (line 620) | function Oh(a,b,c){return new Nh(null,Mh(a,null,b),b,c,null)}
function Ph (line 621) | function Ph(a,b,c,d){return c instanceof Qh?c.left instanceof Qh?new Qh(...
function Sh (line 622) | function Sh(a,b,c,d){return d instanceof Qh?d.right instanceof Qh?new Qh...
function Th (line 623) | function Th(a,b,c,d){if(c instanceof Qh)return new Qh(a,b,c.bc(),d,null)...
function Uh (line 624) | function Uh(a,b,c,d){if(d instanceof Qh)return new Qh(a,b,c,d.bc(),null)...
function Rh (line 625) | function Rh(a,b,c,d,e){this.key=a;this.H=b;this.left=c;this.right=d;this...
function a (line 626) | function a(a){return Xd(this,a,H(this))}
function Qh (line 632) | function Qh(a,b,c,d,e){this.key=a;this.H=b;this.left=c;this.right=d;this...
function a (line 632) | function a(a){return Xd(this,a,H(this))}
function $h (line 644) | function $h(a,b,c,d,e){this.Bb=a;this.mc=b;this.F=c;this.meta=d;this.w=e...
function ai (line 645) | function ai(a,b){for(var c=a.mc;;)if(null!=c){var d=c.key;d=a.Bb.c?a.Bb....
function di (line 651) | function di(a){for(var b=[],c=arguments.length,d=0;;)if(d<c)b.push(argum...
function ei (line 651) | function ei(a,b){this.da=a;this.hb=b;this.m=32374988;this.J=0}
function a (line 653) | function a(a){return Xd(this,a,H(this))}
function lh (line 655) | function lh(a){return(a=E(a))?new ei(a,null):null}
function fi (line 655) | function fi(a){return jc(a)}
function gi (line 655) | function gi(a,b){this.da=a;this.hb=b;this.m=32374988;this.J=0}
function a (line 657) | function a(a){return Xd(this,a,H(this))}
function mh (line 659) | function mh(a){return(a=E(a))?new gi(a,null):null}
function ji (line 661) | function ji(a){for(var b=Ef,c=E(new R(null,7,5,T,[ki,li,mi,ni,oi,pi,qi],...
function si (line 661) | function si(a){this.te=a}
function ti (line 661) | function ti(a,b,c){this.meta=a;this.gc=b;this.w=c;this.m=15077647;this.J...
function Je (line 666) | function Je(a){for(var b=a.length,c=Oc(vi),d=0;;)if(d<b)Pc(c,a[d]),d+=1;...
function ui (line 666) | function ui(a){this.lc=a;this.J=136;this.m=259}
function a (line 667) | function a(a,b,c){return cc.l(this.lc,b,Ce)===Ce?c:b}
function b (line 667) | function b(a,b){return cc.l(this.lc,b,Ce)===Ce?null:b}
function wi (line 668) | function wi(a,b,c){this.meta=a;this.$b=b;this.w=c;this.m=417730831;this....
function yi (line 672) | function yi(a){a=E(a);if(null==a)return vi;if(a instanceof Jb&&0===a.i)r...
function jf (line 673) | function jf(a){if(null!=a&&(a.J&4096||q===a.Oe))return a.hd(null);if("st...
function Bi (line 674) | function Bi(a,b){return new kf(null,function(){var c=E(b);if(c){var d=y(...
function Di (line 674) | function Di(a,b,c){this.i=a;this.end=b;this.step=c}
function Ei (line 675) | function Ei(a,b,c,d,e){this.meta=a;this.start=b;this.end=c;this.step=d;t...
function a (line 677) | function a(a){return Xd(this,a,H(this))}
function Fi (line 680) | function Fi(a,b,c){return new Ei(null,a,b,c,null)}
function Gi (line 681) | function Gi(a,b){return new R(null,2,5,T,[Bi(a,b),ng(a,b)],null)}
function Hi (line 682) | function Hi(a){var b=y;return function(){function c(c,d,e){return new R(...
function Ii (line 684) | function Ii(a){a:for(var b=a;;)if(E(b))b=z(b);else break a;return a}
function Ji (line 685) | function Ji(a,b){if("string"===typeof b){var c=a.exec(b);return G.c(y(c)...
function Y (line 686) | function Y(a,b,c,d,e,f,h){var k=lb;lb=null==lb?null:lb-1;try{if(null!=lb...
function Li (line 687) | function Li(a,b){for(var c=E(b),d=null,e=0,f=0;;)if(f<e){var h=d.$(null,...
function Ni (line 687) | function Ni(a){return[v.h('"'),v.h(a.replace(RegExp('[\\\\"\b\f\n\r\t]',...
function Oi (line 688) | function Oi(a,b){var c=Ee(D.c(a,rb));return c?(c=null!=b?b.m&131072||q==...
function Pi (line 689) | function Pi(a,b,c){if(null==a)return Jc(b,"nil");Oi(c,a)&&(Jc(b,"^"),Qi(...
function Qi (line 692) | function Qi(a,b,c){var d=Si.h(c);return t(d)?(c=K.l(c,Ti,Pi),d.l?d.l(a,b...
function Ui (line 692) | function Ui(a,b){var c=new cb;a:{var d=new ed(c);Qi(y(a),d,b);for(var e=...
function Vi (line 693) | function Vi(a){var b=ob();return te(a)?"":""+v.h(Ui(a,b))}
function Wi (line 693) | function Wi(a,b,c,d,e){return Y(d,function(a,b,d){var e=jc(a);c.l?c.l(e,...
function Ri (line 693) | function Ri(a,b,c){var d=Qi,e=(xe(a),null),f=J(e,0,null);e=J(e,1,null);r...
function Zi (line 701) | function Zi(){null==Yi&&(Yi=dg.h(0));return td.h([v.h("reagent"),v.h(gg....
function $i (line 701) | function $i(){}
function bj (line 701) | function bj(a){return(null!=a?q===a.nf||(a.Tc?0:Ab($i,a)):Ab($i,a))?aj(a...
function dj (line 703) | function dj(){}
function fj (line 704) | function fj(a){var b=be([gj,!0]),c=null!=b&&(b.m&64||q===b.G)?P(U,b):b,d...
function hj (line 706) | function hj(a){return function(b){return function(){function c(a){var b=...
function jj (line 706) | function jj(){null==ij&&(ij=dg.h(new r(null,3,[kj,Ef,lj,Ef,mj,Ef],null))...
function nj (line 707) | function nj(a,b,c){var d=G.c(b,c);if(d)return d;d=mj.h(a);d=d.h?d.h(b):d...
function oj (line 707) | function oj(a){var b=B(jj());return Bf(D.c(kj.h(b),a))}
function pj (line 707) | function pj(a,b,c,d){gg.c(a,function(){return B(b)});gg.c(c,function(){r...
function rj (line 708) | function rj(a,b,c,d){c=qj(a,b,c);return t(c)?c:nj(d,a,b)}
function tj (line 710) | function tj(a,b){throw Error(["No method in multimethod '",v.h(a),"' for...
function uj (line 710) | function uj(a,b,c,d,e,f,h,k){this.name=a;this.D=b;this.vf=c;this.Rd=d;th...
function a (line 711) | function a(a,b,c,d,e,f,h,k,m,l,p,u,w,x,F,C,I,M,S,X,Q,Ga){a=this;var W=oe...
function b (line 711) | function b(a,b,c,d,e,f,h,k,m,l,p,u,w,x,F,C,I,M,S,X,Q){a=this;var W=a.D.X...
function c (line 712) | function c(a,b,c,d,e,f,h,k,m,l,p,u,w,x,F,C,I,M,S,X){a=this;var W=a.D.Wa?...
function d (line 712) | function d(a,b,c,d,e,f,h,k,m,l,p,u,w,x,F,C,I,M,S){a=this;var W=a.D.Va?a....
function e (line 713) | function e(a,b,c,d,e,f,h,k,m,l,p,u,w,x,F,C,I,M){a=this;var W=a.D.Ua?a.D....
function f (line 713) | function f(a,b,c,d,e,f,h,k,m,
function h (line 714) | function h(a,b,c,d,e,f,h,k,m,l,p,u,w,x,F,C){a=this;var W=a.D.Sa?a.D.Sa(b...
fu
Condensed preview — 357 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (3,767K chars).
[
{
"path": ".changes/0.1.0.json",
"chars": 1360,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"category\": \"packaging\",\n \"description\": \"Require ``virtual"
},
{
"path": ".changes/0.10.0.json",
"chars": 974,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"category\": \"deployment\",\n \"description\": \"Fix issue where "
},
{
"path": ".changes/0.10.1.json",
"chars": 380,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"category\": \"deployment\",\n \"description\": \"Fix deployment i"
},
{
"path": ".changes/0.2.0.json",
"chars": 562,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"category\": \"rest-api\",\n \"description\": \"Add support for in"
},
{
"path": ".changes/0.3.0.json",
"chars": 773,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"category\": \"rest-api\",\n \"description\": \"Fix bug with case "
},
{
"path": ".changes/0.4.0.json",
"chars": 872,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"category\": \"deployment\",\n \"description\": \"Fix issue where "
},
{
"path": ".changes/0.5.0.json",
"chars": 1306,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"category\": \"logging\",\n \"description\": \"Add default applica"
},
{
"path": ".changes/0.5.1.json",
"chars": 1176,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"category\": \"local\",\n \"description\": \"Add support for seria"
},
{
"path": ".changes/0.6.0.json",
"chars": 858,
"preview": "{\n \"schema-version\": \"0.2\",\n \"summary\": \"Check out the `upgrade notes for 0.6.0\\n<http://chalice.readthedocs.io/en/lat"
},
{
"path": ".changes/0.7.0.json",
"chars": 1103,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"category\": \"CLI\",\n \"description\": \"Add ``chalice package``"
},
{
"path": ".changes/0.8.0.json",
"chars": 494,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"category\": \"python\",\n \"description\": \"Add support for pyth"
},
{
"path": ".changes/0.8.1.json",
"chars": 775,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"category\": \"deployment\",\n \"description\": \"Alway overwrite "
},
{
"path": ".changes/0.8.2.json",
"chars": 324,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"category\": \"CLI\",\n \"description\": \"Fix issue where ``--api"
},
{
"path": ".changes/0.9.0.json",
"chars": 679,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"category\": \"rest-api\",\n \"description\": \"Add support for ``"
},
{
"path": ".changes/1.0.0.json",
"chars": 954,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"category\": \"rest-api\",\n \"description\": \"Change default API"
},
{
"path": ".changes/1.0.0b1.json",
"chars": 975,
"preview": "{\n \"schema-version\": \"0.2\",\n \"summary\": \"Please read the `upgrade notes for 1.0.0b1\\n<http://chalice.readthedocs.io/en"
},
{
"path": ".changes/1.0.0b2.json",
"chars": 1429,
"preview": "{\n \"schema-version\": \"0.2\",\n \"summary\": \"Please read the `upgrade notes for 1.0.0b2\\n<http://chalice.readthedocs.io/en"
},
{
"path": ".changes/1.0.1.json",
"chars": 586,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"category\": \"packaging\",\n \"description\": \"Only use alphanum"
},
{
"path": ".changes/1.0.2.json",
"chars": 1269,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"category\": \"rest-api\",\n \"description\": \"Fix issue where re"
},
{
"path": ".changes/1.0.3.json",
"chars": 887,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"category\": \"packaging\",\n \"description\": \"Fix issue with so"
},
{
"path": ".changes/1.0.4.json",
"chars": 373,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"category\": \"packaging\",\n \"description\": \"Fix issue deployi"
},
{
"path": ".changes/1.1.0.json",
"chars": 1025,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"category\": \"rest-api\",\n \"description\": \"Default to ``None`"
},
{
"path": ".changes/1.1.1.json",
"chars": 775,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"category\": \"CLI\",\n \"description\": \"Add ``--connection-time"
},
{
"path": ".changes/1.10.0.json",
"chars": 756,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"category\": \"websocket\",\n \"description\": \"Add experimental "
},
{
"path": ".changes/1.11.0.json",
"chars": 663,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"category\": \"config\",\n \"description\": \"Add support for stag"
},
{
"path": ".changes/1.11.1.json",
"chars": 333,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"category\": \"blueprint\",\n \"description\": \"Fix mouting bluep"
},
{
"path": ".changes/1.12.0.json",
"chars": 483,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"category\": \"CLI\",\n \"description\": \"Add ``generate-models``"
},
{
"path": ".changes/1.13.0.json",
"chars": 887,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"category\": \"logs\",\n \"description\": \"Fix error for ``chalic"
},
{
"path": ".changes/1.13.1.json",
"chars": 929,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"enhancement\",\n \"category\": \"local\",\n \"descrip"
},
{
"path": ".changes/1.14.0.json",
"chars": 460,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"bugfix\",\n \"category\": \"packaging\",\n \"descript"
},
{
"path": ".changes/1.14.1.json",
"chars": 173,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"enhancement\",\n \"category\": \"pip\",\n \"descripti"
},
{
"path": ".changes/1.15.0.json",
"chars": 641,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"feature\",\n \"category\": \"blueprints\",\n \"descri"
},
{
"path": ".changes/1.15.1.json",
"chars": 222,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"bugfix\",\n \"category\": \"packaging\",\n \"descript"
},
{
"path": ".changes/1.16.0.json",
"chars": 674,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"enhancement\",\n \"category\": \"local\",\n \"descrip"
},
{
"path": ".changes/1.17.0.json",
"chars": 661,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"feature\",\n \"category\": \"Testing\",\n \"descripti"
},
{
"path": ".changes/1.18.0.json",
"chars": 197,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"feature\",\n \"category\": \"Packaging\",\n \"descrip"
},
{
"path": ".changes/1.18.1.json",
"chars": 346,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"bugfix\",\n \"category\": \"Packaging\",\n \"descript"
},
{
"path": ".changes/1.19.0.json",
"chars": 222,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"feature\",\n \"category\": \"Pipeline\",\n \"descript"
},
{
"path": ".changes/1.2.0.json",
"chars": 1848,
"preview": "{\n \"schema-version\": \"0.2\",\n \"summary\": \"This release features a rewrite of the core deployment\\ncode used in Chalice."
},
{
"path": ".changes/1.2.1.json",
"chars": 483,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"category\": \"rest-api\",\n \"description\": \"Add CORS headers t"
},
{
"path": ".changes/1.2.2.json",
"chars": 211,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"category\": \"packaging\",\n \"description\": \"Fix package comma"
},
{
"path": ".changes/1.2.3.json",
"chars": 306,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"category\": \"dependency\",\n \"description\": \"Add support for "
},
{
"path": ".changes/1.20.0.json",
"chars": 615,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"enhancement\",\n \"category\": \"Blueprints\",\n \"de"
},
{
"path": ".changes/1.20.1.json",
"chars": 355,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"bugfix\",\n \"category\": \"Blueprints\",\n \"descrip"
},
{
"path": ".changes/1.21.0.json",
"chars": 359,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"bugfix\",\n \"category\": \"Blueprints\",\n \"descrip"
},
{
"path": ".changes/1.21.1.json",
"chars": 646,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"bugfix\",\n \"category\": \"Websockets\",\n \"descrip"
},
{
"path": ".changes/1.21.2.json",
"chars": 506,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"bugfix\",\n \"category\": \"Terraform\",\n \"descript"
},
{
"path": ".changes/1.21.3.json",
"chars": 338,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"enhancement\",\n \"category\": \"Test\",\n \"descript"
},
{
"path": ".changes/1.21.4.json",
"chars": 327,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"enhancement\",\n \"category\": \"Local\",\n \"descrip"
},
{
"path": ".changes/1.21.5.json",
"chars": 473,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"bugfix\",\n \"category\": \"Config\",\n \"description"
},
{
"path": ".changes/1.21.6.json",
"chars": 352,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"enhancement\",\n \"category\": \"Packaging\",\n \"des"
},
{
"path": ".changes/1.21.7.json",
"chars": 202,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"enhancement\",\n \"category\": \"Terraform\",\n \"des"
},
{
"path": ".changes/1.21.8.json",
"chars": 210,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"enhancement\",\n \"category\": \"Authorizers\",\n \"d"
},
{
"path": ".changes/1.21.9.json",
"chars": 185,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"enhancement\",\n \"category\": \"Dependencies\",\n \""
},
{
"path": ".changes/1.22.0.json",
"chars": 180,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"feature\",\n \"category\": \"CDK\",\n \"description\":"
},
{
"path": ".changes/1.22.1.json",
"chars": 346,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"enhancement\",\n \"category\": \"Pip\",\n \"descripti"
},
{
"path": ".changes/1.22.2.json",
"chars": 487,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"enhancement\",\n \"category\": \"Blueprint\",\n \"des"
},
{
"path": ".changes/1.22.3.json",
"chars": 475,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"enhancement\",\n \"category\": \"Terraform\",\n \"des"
},
{
"path": ".changes/1.22.4.json",
"chars": 473,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"enhancement\",\n \"category\": \"Types\",\n \"descrip"
},
{
"path": ".changes/1.23.0.json",
"chars": 361,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"enhancement\",\n \"category\": \"Deploy\",\n \"descri"
},
{
"path": ".changes/1.24.0.json",
"chars": 786,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"feature\",\n \"category\": \"Python2.7\",\n \"descrip"
},
{
"path": ".changes/1.24.1.json",
"chars": 212,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"bugfix\",\n \"category\": \"GovCloud\",\n \"descripti"
},
{
"path": ".changes/1.24.2.json",
"chars": 486,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"enhancement\",\n \"category\": \"Dependencies\",\n \""
},
{
"path": ".changes/1.25.0.json",
"chars": 173,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"feature\",\n \"category\": \"Python\",\n \"descriptio"
},
{
"path": ".changes/1.26.0.json",
"chars": 374,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"feature\",\n \"category\": \"Websockets\",\n \"descri"
},
{
"path": ".changes/1.26.1.json",
"chars": 344,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"enhancement\",\n \"category\": \"Dependencies\",\n \""
},
{
"path": ".changes/1.26.2.json",
"chars": 339,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"enhancement\",\n \"category\": \"Dependencies\",\n \""
},
{
"path": ".changes/1.26.3.json",
"chars": 337,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"enhancement\",\n \"category\": \"Errors\",\n \"descri"
},
{
"path": ".changes/1.26.4.json",
"chars": 212,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"bugfix\",\n \"category\": \"Terraform\",\n \"descript"
},
{
"path": ".changes/1.26.5.json",
"chars": 341,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"enhancement\",\n \"category\": \"Terraform\",\n \"des"
},
{
"path": ".changes/1.26.6.json",
"chars": 174,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"bugfix\",\n \"category\": \"pip\",\n \"description\": "
},
{
"path": ".changes/1.27.0.json",
"chars": 330,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"bugfix\",\n \"category\": \"Local\",\n \"description\""
},
{
"path": ".changes/1.27.1.json",
"chars": 350,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"enhancement\",\n \"category\": \"Pip\",\n \"descripti"
},
{
"path": ".changes/1.27.2.json",
"chars": 388,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"enhancement\",\n \"category\": \"Terraform\",\n \"des"
},
{
"path": ".changes/1.27.3.json",
"chars": 204,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"bugfix\",\n \"category\": \"Versioning\",\n \"descrip"
},
{
"path": ".changes/1.28.0.json",
"chars": 483,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"enhancement\",\n \"category\": \"Terraform\",\n \"des"
},
{
"path": ".changes/1.29.0.json",
"chars": 319,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"feature\",\n \"category\": \"Python\",\n \"descriptio"
},
{
"path": ".changes/1.3.0.json",
"chars": 702,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"category\": \"config\",\n \"description\": \"Add support for Lamb"
},
{
"path": ".changes/1.30.0.json",
"chars": 305,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"feature\",\n \"category\": \"Python\",\n \"descriptio"
},
{
"path": ".changes/1.31.0.json",
"chars": 303,
"preview": "{\n \"schema-version\": \"1.0\",\n \"changes\": [\n {\n \"type\": \"feature\",\n \"category\": \"Python\",\n \"descriptio"
},
{
"path": ".changes/1.31.1.json",
"chars": 329,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"type\": \"enhancement\",\n \"category\": \"pip\",\n \"descripti"
},
{
"path": ".changes/1.31.2.json",
"chars": 216,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"type\": \"enhancement\",\n \"category\": \"SQS\",\n \"descripti"
},
{
"path": ".changes/1.31.3.json",
"chars": 333,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"type\": \"enhancement\",\n \"category\": \"Pip\",\n \"descripti"
},
{
"path": ".changes/1.31.4.json",
"chars": 180,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"type\": \"enhancement\",\n \"category\": \"Pip\",\n \"descripti"
},
{
"path": ".changes/1.32.0.json",
"chars": 299,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"type\": \"feature\",\n \"category\": \"Python\",\n \"descriptio"
},
{
"path": ".changes/1.4.0.json",
"chars": 867,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"category\": \"CI-CD\",\n \"description\": \"Add support for gener"
},
{
"path": ".changes/1.5.0.json",
"chars": 211,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"category\": \"policy\",\n \"description\": \"Add support for S3 u"
},
{
"path": ".changes/1.6.0.json",
"chars": 173,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"category\": \"CLI\",\n \"description\": \"Add ``chalice invoke`` "
},
{
"path": ".changes/1.6.1.json",
"chars": 514,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"category\": \"local\",\n \"description\": \"Fix local mode issue "
},
{
"path": ".changes/1.6.2.json",
"chars": 1038,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"category\": \"dependencies\",\n \"description\": \"Add support fo"
},
{
"path": ".changes/1.7.0.json",
"chars": 779,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"category\": \"packaging\",\n \"description\": \"Fix packaging mul"
},
{
"path": ".changes/1.8.0.json",
"chars": 373,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"category\": \"packaging\",\n \"description\": \"Fall back to pure"
},
{
"path": ".changes/1.9.0.json",
"chars": 1727,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"category\": \"dependencies\",\n \"description\": \"Update PIP to "
},
{
"path": ".changes/1.9.1.json",
"chars": 175,
"preview": "{\n \"schema-version\": \"0.2\",\n \"changes\": [\n {\n \"category\": \"rest-api\",\n \"description\": \"Make MultiDict mut"
},
{
"path": ".changes/templates/changelog",
"chars": 259,
"preview": "# CHANGELOG\n\n{% for release, changes in releases %}\n## {{ release }}\n{% if changes.summary %}\n{{ changes.summary -}}\n{% "
},
{
"path": ".coveragerc",
"chars": 77,
"preview": "[run]\nbranch = True\n[report]\nexclude_lines =\n raise NotImplementedError.*\n"
},
{
"path": ".github/PULL_REQUEST_TEMPLATE.md",
"chars": 169,
"preview": "*Issue #, if available:*\n\n*Description of changes:*\n\n\nBy submitting this pull request, I confirm that my contribution is"
},
{
"path": ".github/dependabot.yml",
"chars": 205,
"preview": "version: 2\nupdates:\n- package-ecosystem: pip\n directory: \"/.\"\n schedule:\n interval: daily\n time: \"13:00\"\n open-"
},
{
"path": ".github/workflows/run-tests.yml",
"chars": 2507,
"preview": "name: Run PR Checks\non:\n push:\n branches:\n - master\n - \"feature/**\"\n pull_request:\n branches:\n - "
},
{
"path": ".github/workflows/stale-issue.yml",
"chars": 1721,
"preview": "name: \"Close stale issues\"\n\non:\n schedule:\n - cron: \"*/60 * * * *\"\n\njobs:\n cleanup:\n runs-on: ubuntu-latest\n "
},
{
"path": ".gitignore",
"chars": 134,
"preview": "sample/\n.cache\nvenv\ndocs/build/\n.idea\n__pycache__/\n.coverage\nchalice.egg-info/\n.hypothesis/\n.pytest_cache/\n.mypy_cache/\n"
},
{
"path": ".pylintrc",
"chars": 10361,
"preview": "[MASTER]\n\n# Specify a configuration file.\n#rcfile=\n\n# Python code to execute, usually for sys.path manipulation such as\n"
},
{
"path": ".python-version",
"chars": 4,
"preview": "3.7\n"
},
{
"path": "CHANGELOG.md",
"chars": 26538,
"preview": "# CHANGELOG\n\n\n## 1.32.0\n\n\n* feature:Python:Add support for Python 3.13 (#2137)\n* feature:Python:Drop support for Python "
},
{
"path": "CODE_OF_CONDUCT.rst",
"chars": 346,
"preview": "===============\nCode of Conduct\n===============\n\n\nThis project has adopted the\n`Amazon Open Source Code of Conduct <http"
},
{
"path": "CONTRIBUTING.rst",
"chars": 6440,
"preview": "============\nContributing\n============\n\nWe work hard to provide a high-quality and useful framework, and we greatly valu"
},
{
"path": "LICENSE",
"chars": 11357,
"preview": " Apache License\n Version 2.0, January 2004\n "
},
{
"path": "MANIFEST.in",
"chars": 191,
"preview": "include CONTRIBUTING.rst\ninclude CHANGELOG.md\ninclude LICENSE\ninclude NOTICE\ninclude README.rst\nrecursive-include chalic"
},
{
"path": "Makefile",
"chars": 1923,
"preview": "# Eventually I'll add:\n# py.test --cov chalice --cov-report term-missing --cov-fail-under 95 tests/\n# which will fail if"
},
{
"path": "NOTICE",
"chars": 64,
"preview": "chalice\nCopyright 2015 James Saryerwinnie. All Rights Reserved.\n"
},
{
"path": "README.rst",
"chars": 7178,
"preview": "===========\nAWS Chalice\n===========\n\n.. image:: https://badges.gitter.im/awslabs/chalice.svg\n :target: https://gitter."
},
{
"path": "chalice/__init__.py",
"chars": 548,
"preview": "from chalice.app import Chalice, Blueprint\nfrom chalice.app import (\n ChaliceViewError, BadRequestError, Unauthorized"
},
{
"path": "chalice/analyzer.py",
"chars": 26954,
"preview": "\"\"\"Source code analyzer for chalice app.\n\nThe main point of this module is to analyze your source code\nand track which A"
},
{
"path": "chalice/api/__init__.py",
"chars": 1180,
"preview": "\"\"\"Control plane APIs for programatically building/deploying Chalice apps.\n\nThe eventual goal is to expose this as a pub"
},
{
"path": "chalice/app.py",
"chars": 90370,
"preview": "\"\"\"Chalice app and routing code.\"\"\"\n# pylint: disable=too-many-lines,ungrouped-imports\nimport re\nimport sys\nimport os\nim"
},
{
"path": "chalice/awsclient.py",
"chars": 74934,
"preview": "\"\"\"Simplified AWS client.\n\nThis module abstracts the botocore session and clients\nto provide a simpler interface. This "
},
{
"path": "chalice/cdk/__init__.py",
"chars": 311,
"preview": "import warnings\ntry:\n from chalice.cdk.construct import Chalice\nexcept ImportError:\n warnings.warn('Unable to impo"
},
{
"path": "chalice/cdk/construct.py",
"chars": 7475,
"preview": "import json\nimport os\nimport uuid\nfrom typing import List, Dict, Optional, Any # noqa\n\nfrom aws_cdk import (\n aws_s3"
},
{
"path": "chalice/cli/__init__.py",
"chars": 27309,
"preview": "\"\"\"Command line interface for chalice.\n\nContains commands for deploying chalice.\n\n\"\"\"\nfrom __future__ import annotations"
},
{
"path": "chalice/cli/factory.py",
"chars": 12778,
"preview": "from __future__ import annotations\nimport sys\nimport os\nimport json\nimport importlib\nimport logging\nimport functools\n\nim"
},
{
"path": "chalice/cli/filewatch/__init__.py",
"chars": 1285,
"preview": "import threading\n\nfrom typing import Callable, Optional, Type # noqa\nfrom chalice.local import HTTPServerThread # noqa"
},
{
"path": "chalice/cli/filewatch/eventbased.py",
"chars": 1533,
"preview": "import threading # noqa\n\nfrom typing import Callable, Optional # noqa\nimport watchdog.observers # pylint: disable=imp"
},
{
"path": "chalice/cli/filewatch/stat.py",
"chars": 3436,
"preview": "import logging\nimport threading\nimport time\n\nfrom typing import Callable, Dict, Optional, Iterator # noqa\n\nfrom chalice"
},
{
"path": "chalice/cli/newproj.py",
"chars": 6070,
"preview": "\"\"\"New project generation.\n\nHow it Works\n============\n\nProject template are placed with the ./chalice/templates director"
},
{
"path": "chalice/cli/reloader.py",
"chars": 4475,
"preview": "\"\"\"Automatically reload chalice app when files change.\n\nHow It Works\n============\n\nThis approach borrow from what django"
},
{
"path": "chalice/compat.py",
"chars": 6249,
"preview": "import socket\nimport six\nimport os\n\nfrom typing import Dict, Any # noqa\nfrom urllib.parse import urlparse, parse_qs\n\nfr"
},
{
"path": "chalice/config.py",
"chars": 18324,
"preview": "from __future__ import annotations\nimport os\nimport sys\nimport json\n\nfrom typing import Dict, Any, Optional, List, Union"
},
{
"path": "chalice/constants.py",
"chars": 6880,
"preview": "\n# This is the version that's written to the config file\n# on a `chalice new-project`. It's also how chalice is able\n# "
},
{
"path": "chalice/deploy/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "chalice/deploy/appgraph.py",
"chars": 29830,
"preview": "import json\nimport os\nfrom dataclasses import asdict\n\nfrom typing import cast\nfrom typing import Dict, List, Tuple, Any,"
},
{
"path": "chalice/deploy/deployer.py",
"chars": 30212,
"preview": "\"\"\"Chalice deployer module.\n\nThe deployment system in chalice is broken down into a pipeline of multiple\nstages. Each s"
},
{
"path": "chalice/deploy/executor.py",
"chars": 12458,
"preview": "import re\nimport pprint\nfrom dataclasses import asdict, is_dataclass\n\nimport jmespath\nfrom typing import Dict, List, Any"
},
{
"path": "chalice/deploy/models.py",
"chars": 8149,
"preview": "# pylint: disable=line-too-long\nfrom __future__ import annotations\nfrom dataclasses import dataclass, field\nimport enum\n"
},
{
"path": "chalice/deploy/packager.py",
"chars": 49314,
"preview": "# pylint: disable=too-many-lines\nfrom __future__ import annotations\nimport sys\nimport hashlib\nimport inspect\nimport re\ni"
},
{
"path": "chalice/deploy/planner.py",
"chars": 61597,
"preview": "# pylint: disable=too-many-lines\nimport re\nimport json\nfrom collections import OrderedDict\n\nfrom typing import List, Dic"
},
{
"path": "chalice/deploy/swagger.py",
"chars": 11787,
"preview": "import copy\nimport inspect\n\nfrom typing import Any, List, Dict, Optional, Union # noqa\n\nfrom chalice.app import Chalice"
},
{
"path": "chalice/deploy/sweeper.py",
"chars": 16760,
"preview": "from typing import ( # noqa\n List,\n Dict,\n Optional,\n Tuple,\n Any,\n Union,\n Sequence,\n cast,\n "
},
{
"path": "chalice/deploy/validate.py",
"chars": 11392,
"preview": "import sys\nimport warnings\n\nfrom typing import Dict, List, Set, Iterator, Optional, Any # noqa\n\nfrom chalice import app"
},
{
"path": "chalice/invoke.py",
"chars": 4152,
"preview": "\"\"\"Abstraction for invoking a lambda function.\"\"\"\nimport json\n\nfrom typing import Any, Optional, Dict, List, Union, Tupl"
},
{
"path": "chalice/local.py",
"chars": 30802,
"preview": "\"\"\"Dev server used for running a chalice app locally.\n\nThis is intended only for local development purposes.\n\n\"\"\"\nfrom _"
},
{
"path": "chalice/logs.py",
"chars": 9445,
"preview": "\"\"\"Module for inspecting chalice logs.\n\nThis module provides APIs for searching, interacting\nwith the logs generated by "
},
{
"path": "chalice/package.py",
"chars": 69549,
"preview": "# pylint: disable=too-many-lines\n\nimport copy\nimport json\nimport os\nimport re\n\nimport six\nfrom typing import Any, Option"
},
{
"path": "chalice/pipeline.py",
"chars": 25552,
"preview": "import copy\nimport re\n\nfrom typing import List, Dict, Any, Optional, Callable # noqa\nimport yaml\n\nfrom chalice.config i"
},
{
"path": "chalice/policies-extra.json",
"chars": 287,
"preview": "{\n \"s3\": {\n \"upload_file\": [\"s3:PutObject\", \"s3:AbortMultipartUpload\"],\n \"upload_fileobj\": [\"s3:PutObject\", \"s3: "
},
{
"path": "chalice/policies.json",
"chars": 561430,
"preview": "{\n \"account\": {\n \"DeleteAlternateContact\": \"account:DeleteAlternateContact\",\n \"GetAlternateContact\": \"account:Get"
},
{
"path": "chalice/policy.py",
"chars": 7793,
"preview": "\"\"\"Policy generator based on allowed API calls.\n\nThis module will take a set of API calls for services\nand make a best e"
},
{
"path": "chalice/py.typed",
"chars": 74,
"preview": "# Marker file for PEP 561. This package provides inline type annotations.\n"
},
{
"path": "chalice/templates/0000-rest-api/.chalice/config.json",
"chars": 124,
"preview": "{\n \"version\": \"2.0\",\n \"app_name\": \"{{app_name}}\",\n \"stages\": {\n \"dev\": {\n \"api_gateway_stage\": \"api\"\n }\n "
},
{
"path": "chalice/templates/0000-rest-api/.gitignore",
"chars": 37,
"preview": ".chalice/deployments/\n.chalice/venv/\n"
},
{
"path": "chalice/templates/0000-rest-api/app.py",
"chars": 737,
"preview": "from chalice import Chalice\n\napp = Chalice(app_name='{{app_name}}')\n\n\n@app.route('/')\ndef index():\n return {'hello': "
},
{
"path": "chalice/templates/0000-rest-api/chalicelib/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "chalice/templates/0000-rest-api/metadata.json",
"chars": 28,
"preview": "{\"description\": \"REST API\"}\n"
},
{
"path": "chalice/templates/0000-rest-api/requirements-dev.txt",
"chars": 36,
"preview": "chalice=={{chalice_version}}\npytest\n"
},
{
"path": "chalice/templates/0000-rest-api/requirements.txt",
"chars": 0,
"preview": ""
},
{
"path": "chalice/templates/0000-rest-api/tests/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "chalice/templates/0000-rest-api/tests/test_app.py",
"chars": 200,
"preview": "from chalice.test import Client\nfrom app import app\n\n\ndef test_index():\n with Client(app) as client:\n response"
},
{
"path": "chalice/templates/0002-s3-event-handler/.chalice/config.json",
"chars": 124,
"preview": "{\n \"version\": \"2.0\",\n \"app_name\": \"{{app_name}}\",\n \"stages\": {\n \"dev\": {\n \"api_gateway_stage\": \"api\"\n }\n "
},
{
"path": "chalice/templates/0002-s3-event-handler/.gitignore",
"chars": 37,
"preview": ".chalice/deployments/\n.chalice/venv/\n"
},
{
"path": "chalice/templates/0002-s3-event-handler/app.py",
"chars": 411,
"preview": "import os\n\nfrom chalice import Chalice\n\napp = Chalice(app_name='{{app_name}}')\napp.debug = True\n\n\n# Set the value of APP"
},
{
"path": "chalice/templates/0002-s3-event-handler/chalicelib/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "chalice/templates/0002-s3-event-handler/metadata.json",
"chars": 36,
"preview": "{\"description\": \"S3 Event Handler\"}\n"
},
{
"path": "chalice/templates/0002-s3-event-handler/requirements-dev.txt",
"chars": 15,
"preview": "chalice\npytest\n"
},
{
"path": "chalice/templates/0002-s3-event-handler/requirements.txt",
"chars": 0,
"preview": ""
},
{
"path": "chalice/templates/0002-s3-event-handler/tests/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "chalice/templates/0002-s3-event-handler/tests/test_app.py",
"chars": 253,
"preview": "from chalice.test import Client\nfrom app import app\n\n\ndef test_s3_handler():\n with Client(app) as client:\n eve"
},
{
"path": "chalice/templates/0007-lambda-only/.chalice/config.json",
"chars": 124,
"preview": "{\n \"version\": \"2.0\",\n \"app_name\": \"{{app_name}}\",\n \"stages\": {\n \"dev\": {\n \"api_gateway_stage\": \"api\"\n }\n "
},
{
"path": "chalice/templates/0007-lambda-only/.gitignore",
"chars": 37,
"preview": ".chalice/deployments/\n.chalice/venv/\n"
},
{
"path": "chalice/templates/0007-lambda-only/app.py",
"chars": 252,
"preview": "from chalice import Chalice\n\napp = Chalice(app_name='{{app_name}}')\n\n\n@app.lambda_function()\ndef first_function(event, c"
},
{
"path": "chalice/templates/0007-lambda-only/chalicelib/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "chalice/templates/0007-lambda-only/metadata.json",
"chars": 41,
"preview": "{\"description\": \"Lambda Functions only\"}\n"
},
{
"path": "chalice/templates/0007-lambda-only/requirements-dev.txt",
"chars": 15,
"preview": "chalice\npytest\n"
},
{
"path": "chalice/templates/0007-lambda-only/requirements.txt",
"chars": 0,
"preview": ""
},
{
"path": "chalice/templates/0007-lambda-only/tests/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "chalice/templates/0007-lambda-only/tests/test_app.py",
"chars": 221,
"preview": "from chalice.test import Client\nfrom app import app\n\n\ndef test_index():\n with Client(app) as client:\n response"
},
{
"path": "chalice/templates/0009-legacy/.chalice/config.json",
"chars": 124,
"preview": "{\n \"version\": \"2.0\",\n \"app_name\": \"{{app_name}}\",\n \"stages\": {\n \"dev\": {\n \"api_gateway_stage\": \"api\"\n }\n "
},
{
"path": "chalice/templates/0009-legacy/.gitignore",
"chars": 37,
"preview": ".chalice/deployments/\n.chalice/venv/\n"
},
{
"path": "chalice/templates/0009-legacy/app.py",
"chars": 737,
"preview": "from chalice import Chalice\n\napp = Chalice(app_name='{{app_name}}')\n\n\n@app.route('/')\ndef index():\n return {'hello': "
},
{
"path": "chalice/templates/0009-legacy/metadata.json",
"chars": 44,
"preview": "{\"description\": \"Legacy REST API Template\"}\n"
},
{
"path": "chalice/templates/0009-legacy/requirements.txt",
"chars": 0,
"preview": ""
},
{
"path": "chalice/templates/6001-cdk-ddb/README.rst",
"chars": 1505,
"preview": "REST API backed by Amazon DynamoDB\n==================================\n\nThis template provides a REST API that's backed b"
},
{
"path": "chalice/templates/6001-cdk-ddb/infrastructure/app.py",
"chars": 213,
"preview": "#!/usr/bin/env python3\ntry:\n from aws_cdk import core as cdk\nexcept ImportError:\n import aws_cdk as cdk\nfrom stack"
},
{
"path": "chalice/templates/6001-cdk-ddb/infrastructure/cdk.json",
"chars": 139,
"preview": "{\n \"app\": \"python3 app.py\",\n \"context\": {\n \"aws-cdk:enableDiffNoFail\": \"true\",\n \"@aws-cdk/core:stackRelativeExpo"
},
{
"path": "chalice/templates/6001-cdk-ddb/infrastructure/requirements.txt",
"chars": 21,
"preview": "aws-cdk-lib>2.0,<3.0\n"
},
{
"path": "chalice/templates/6001-cdk-ddb/infrastructure/stacks/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "chalice/templates/6001-cdk-ddb/infrastructure/stacks/chaliceapp.py",
"chars": 1364,
"preview": "import os\n\nfrom aws_cdk import aws_dynamodb as dynamodb\n\ntry:\n from aws_cdk import core as cdk\nexcept ImportError:\n "
},
{
"path": "chalice/templates/6001-cdk-ddb/metadata.json",
"chars": 56,
"preview": "{\"description\": \"[CDK] Rest API with a DynamoDB table\"}\n"
},
{
"path": "chalice/templates/6001-cdk-ddb/requirements.txt",
"chars": 63,
"preview": "-r infrastructure/requirements.txt\n-r runtime/requirements.txt\n"
},
{
"path": "chalice/templates/6001-cdk-ddb/runtime/.chalice/config.json",
"chars": 264,
"preview": "{\n \"version\": \"2.0\",\n \"app_name\": \"{{app_name}}\",\n \"stages\": {\n \"dev\": {\n \"api_gateway_stage\": \"api\",\n \""
},
{
"path": "chalice/templates/6001-cdk-ddb/runtime/.gitignore",
"chars": 37,
"preview": ".chalice/deployments/\n.chalice/venv/\n"
},
{
"path": "chalice/templates/6001-cdk-ddb/runtime/app.py",
"chars": 772,
"preview": "import os\nimport boto3\nfrom chalice import Chalice\n\n\napp = Chalice(app_name='{{app_name}}')\ndynamodb = boto3.resource('d"
},
{
"path": "chalice/templates/6001-cdk-ddb/runtime/requirements.txt",
"chars": 12,
"preview": "boto3<2.0.0\n"
},
{
"path": "chalice/test.py",
"chars": 12966,
"preview": "from __future__ import annotations\nimport os\nimport json\nimport base64\nimport contextlib\nfrom types import TracebackType"
},
{
"path": "chalice/utils.py",
"chars": 15696,
"preview": "import io\nimport os\nimport zipfile\nimport json\nimport contextlib\nimport tempfile\nimport re\nimport shutil\nimport sys\nimpo"
},
{
"path": "chalice/vendored/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "chalice/vendored/botocore/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "chalice/vendored/botocore/regions.py",
"chars": 8974,
"preview": "# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version"
},
{
"path": "docs/Makefile",
"chars": 8083,
"preview": "# Makefile for Sphinx documentation\n#\n\n# You can set these variables from the command line.\nSPHINXOPTS = -W\nSPHINXBUI"
},
{
"path": "docs/source/_static/custom.css",
"chars": 320,
"preview": "div.body h1 { margin-top: 0; padding-top: 0; font-size: 200%; }\n\ndiv.highlight-python {\n border-width: 0 0 0 2px;\n bor"
},
{
"path": "docs/source/_static/fonts/open-sans/stylesheet.css",
"chars": 5015,
"preview": "/***** Font Definition for Open Sans. This stylesheet comes from qrohlf.com/posts/better-opensans *****/\n\n/* Regular */\n"
},
{
"path": "docs/source/_templates/layout.html",
"chars": 244,
"preview": "{%- extends \"!layout.html\" %}\n\n{%- block extrahead %}\n <!-- Licensed under the Apache 2.0 License -->\n <link rel=\"styl"
}
]
// ... and 157 more files (download for full content)
About this extraction
This page contains the full source code of the aws/chalice GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 357 files (3.4 MB), approximately 917.2k tokens, and a symbol index with 4600 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.