Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
aws
GitHub Repository: aws/aws-cli
Path: blob/develop/awscli/customizations/__init__.py
1566 views
1
# Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
#
3
# Licensed under the Apache License, Version 2.0 (the "License"). You
4
# may not use this file except in compliance with the License. A copy of
5
# the License is located at
6
#
7
# http://aws.amazon.com/apache2.0/
8
#
9
# or in the "license" file accompanying this file. This file is
10
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11
# ANY KIND, either express or implied. See the License for the specific
12
# language governing permissions and limitations under the License.
13
"""
14
Customizations
15
==============
16
17
As we start to accumulate more and more of these *built-in* customizations
18
we probably need to come up with some way to organize them and to make
19
it easy to add them and register them.
20
21
One idea I had was to place them all with a package like this. That
22
at least keeps them all in one place. Each module in this package
23
should contain a single customization (I think).
24
25
To take it a step further, we could have each module define a couple
26
of well-defined attributes:
27
28
* ``EVENT`` would be a string containing the event that this customization
29
needs to be registered with. Or, perhaps this should be a list of
30
events?
31
* ``handler`` is a callable that will be registered as the handler
32
for the event.
33
34
Using a convention like this, we could perhaps automatically discover
35
all customizations and register them without having to manually edit
36
``handlers.py`` each time.
37
"""
38
39