Skip to content

Commit 028ffe7

Browse files
committed
Submitting KB code examples in Python
1 parent 1bcb71e commit 028ffe7

File tree

1,316 files changed

+363519
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,316 files changed

+363519
-1
lines changed

.doc_gen/metadata/bedrock-agent_metadata.yaml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,3 +521,68 @@ bedrock-agent_GettingStartedWithBedrockPrompts:
521521
services:
522522
bedrock-agent: {CreatePrompt, CreatePromptVersion, DeletePrompt}
523523
bedrock-runtime: {Converse}
524+
525+
bedrock-agent_CreateKnowledgeBase:
526+
languages:
527+
Python:
528+
versions:
529+
- sdk_version: 3
530+
github: python/example_code/bedrock-agent
531+
excerpts:
532+
- description: Create an Amazon Bedrock knowledge base.
533+
snippet_tags:
534+
- python.example_code.bedrock-agent.create_knowledge_base
535+
services:
536+
bedrock-agent: {CreateKnowledgeBase}
537+
538+
bedrock-agent_GetKnowledgeBase:
539+
languages:
540+
Python:
541+
versions:
542+
- sdk_version: 3
543+
github: python/example_code/bedrock-agent
544+
excerpts:
545+
- description: Get an Amazon Bedrock knowledge base.
546+
snippet_tags:
547+
- python.example_code.bedrock-agent.get_knowledge_base
548+
services:
549+
bedrock-agent: {GetKnowledgeBase}
550+
551+
bedrock-agent_UpdateKnowledgeBase:
552+
languages:
553+
Python:
554+
versions:
555+
- sdk_version: 3
556+
github: python/example_code/bedrock-agent
557+
excerpts:
558+
- description: Update an Amazon Bedrock knowledge base.
559+
snippet_tags:
560+
- python.example_code.bedrock-agent.update_knowledge_base
561+
services:
562+
bedrock-agent: {UpdateKnowledgeBase}
563+
564+
bedrock-agent_DeleteKnowledgeBase:
565+
languages:
566+
Python:
567+
versions:
568+
- sdk_version: 3
569+
github: python/example_code/bedrock-agent
570+
excerpts:
571+
- description: Delete an Amazon Bedrock knowledge base.
572+
snippet_tags:
573+
- python.example_code.bedrock-agent.delete_knowledge_base
574+
services:
575+
bedrock-agent: {DeleteKnowledgeBase}
576+
577+
bedrock-agent_ListKnowledgeBases:
578+
languages:
579+
Python:
580+
versions:
581+
- sdk_version: 3
582+
github: python/example_code/bedrock-agent
583+
excerpts:
584+
- description: List Amazon Bedrock knowledge Bases.
585+
snippet_tags:
586+
- python.example_code.bedrock-agent.list_knowledge_bases
587+
services:
588+
bedrock-agent: {ListKnowledgeBases}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pip
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
Copyright 2010 Pallets
2+
3+
Redistribution and use in source and binary forms, with or without
4+
modification, are permitted provided that the following conditions are
5+
met:
6+
7+
1. Redistributions of source code must retain the above copyright
8+
notice, this list of conditions and the following disclaimer.
9+
10+
2. Redistributions in binary form must reproduce the above copyright
11+
notice, this list of conditions and the following disclaimer in the
12+
documentation and/or other materials provided with the distribution.
13+
14+
3. Neither the name of the copyright holder nor the names of its
15+
contributors may be used to endorse or promote products derived from
16+
this software without specific prior written permission.
17+
18+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
21+
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22+
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
24+
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
25+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
Metadata-Version: 2.1
2+
Name: MarkupSafe
3+
Version: 3.0.2
4+
Summary: Safely add untrusted strings to HTML/XML markup.
5+
Maintainer-email: Pallets <[email protected]>
6+
License: Copyright 2010 Pallets
7+
8+
Redistribution and use in source and binary forms, with or without
9+
modification, are permitted provided that the following conditions are
10+
met:
11+
12+
1. Redistributions of source code must retain the above copyright
13+
notice, this list of conditions and the following disclaimer.
14+
15+
2. Redistributions in binary form must reproduce the above copyright
16+
notice, this list of conditions and the following disclaimer in the
17+
documentation and/or other materials provided with the distribution.
18+
19+
3. Neither the name of the copyright holder nor the names of its
20+
contributors may be used to endorse or promote products derived from
21+
this software without specific prior written permission.
22+
23+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
26+
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27+
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
29+
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
30+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
31+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
32+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34+
35+
Project-URL: Donate, https://palletsprojects.com/donate
36+
Project-URL: Documentation, https://markupsafe.palletsprojects.com/
37+
Project-URL: Changes, https://markupsafe.palletsprojects.com/changes/
38+
Project-URL: Source, https://github.com/pallets/markupsafe/
39+
Project-URL: Chat, https://discord.gg/pallets
40+
Classifier: Development Status :: 5 - Production/Stable
41+
Classifier: Environment :: Web Environment
42+
Classifier: Intended Audience :: Developers
43+
Classifier: License :: OSI Approved :: BSD License
44+
Classifier: Operating System :: OS Independent
45+
Classifier: Programming Language :: Python
46+
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
47+
Classifier: Topic :: Text Processing :: Markup :: HTML
48+
Classifier: Typing :: Typed
49+
Requires-Python: >=3.9
50+
Description-Content-Type: text/markdown
51+
License-File: LICENSE.txt
52+
53+
# MarkupSafe
54+
55+
MarkupSafe implements a text object that escapes characters so it is
56+
safe to use in HTML and XML. Characters that have special meanings are
57+
replaced so that they display as the actual characters. This mitigates
58+
injection attacks, meaning untrusted user input can safely be displayed
59+
on a page.
60+
61+
62+
## Examples
63+
64+
```pycon
65+
>>> from markupsafe import Markup, escape
66+
67+
>>> # escape replaces special characters and wraps in Markup
68+
>>> escape("<script>alert(document.cookie);</script>")
69+
Markup('&lt;script&gt;alert(document.cookie);&lt;/script&gt;')
70+
71+
>>> # wrap in Markup to mark text "safe" and prevent escaping
72+
>>> Markup("<strong>Hello</strong>")
73+
Markup('<strong>hello</strong>')
74+
75+
>>> escape(Markup("<strong>Hello</strong>"))
76+
Markup('<strong>hello</strong>')
77+
78+
>>> # Markup is a str subclass
79+
>>> # methods and operators escape their arguments
80+
>>> template = Markup("Hello <em>{name}</em>")
81+
>>> template.format(name='"World"')
82+
Markup('Hello <em>&#34;World&#34;</em>')
83+
```
84+
85+
## Donate
86+
87+
The Pallets organization develops and supports MarkupSafe and other
88+
popular packages. In order to grow the community of contributors and
89+
users, and allow the maintainers to devote more time to the projects,
90+
[please donate today][].
91+
92+
[please donate today]: https://palletsprojects.com/donate
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
MarkupSafe-3.0.2.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
2+
MarkupSafe-3.0.2.dist-info/LICENSE.txt,sha256=RjHsDbX9kKVH4zaBcmTGeYIUM4FG-KyUtKV_lu6MnsQ,1503
3+
MarkupSafe-3.0.2.dist-info/METADATA,sha256=nhoabjupBG41j_JxPCJ3ylgrZ6Fx8oMCFbiLF9Kafqc,4067
4+
MarkupSafe-3.0.2.dist-info/RECORD,,
5+
MarkupSafe-3.0.2.dist-info/WHEEL,sha256=62QJgqtUFevqILau0n0UncooEMoOyVCKVQitJpcuCig,101
6+
MarkupSafe-3.0.2.dist-info/top_level.txt,sha256=qy0Plje5IJuvsCBjejJyhDCjEAdcDLK_2agVcex8Z6U,11
7+
markupsafe/__init__.py,sha256=pREerPwvinB62tNCMOwqxBS2YHV6R52Wcq1d-rB4Z5o,13609
8+
markupsafe/__pycache__/__init__.cpython-312.pyc,,
9+
markupsafe/__pycache__/_native.cpython-312.pyc,,
10+
markupsafe/_native.py,sha256=2ptkJ40yCcp9kq3L1NqpgjfpZB-obniYKFFKUOkHh4Q,218
11+
markupsafe/_speedups.c,sha256=SglUjn40ti9YgQAO--OgkSyv9tXq9vvaHyVhQows4Ok,4353
12+
markupsafe/_speedups.cp312-win_amd64.pyd,sha256=sC88mCi7HJOQhbSSrdMPZfdCvi_VBfOzwkVuQ7V6T3M,13312
13+
markupsafe/_speedups.pyi,sha256=LSDmXYOefH4HVpAXuL8sl7AttLw0oXh1njVoVZp2wqQ,42
14+
markupsafe/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Wheel-Version: 1.0
2+
Generator: setuptools (75.2.0)
3+
Root-Is-Purelib: false
4+
Tag: cp312-cp312-win_amd64
5+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
markupsafe
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pip
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Copyright (c) 2017-2021 Ingy döt Net
2+
Copyright (c) 2006-2016 Kirill Simonov
3+
4+
Permission is hereby granted, free of charge, to any person obtaining a copy of
5+
this software and associated documentation files (the "Software"), to deal in
6+
the Software without restriction, including without limitation the rights to
7+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8+
of the Software, and to permit persons to whom the Software is furnished to do
9+
so, subject to the following conditions:
10+
11+
The above copyright notice and this permission notice shall be included in all
12+
copies or substantial portions of the Software.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20+
SOFTWARE.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
Metadata-Version: 2.1
2+
Name: PyYAML
3+
Version: 6.0.1
4+
Summary: YAML parser and emitter for Python
5+
Home-page: https://pyyaml.org/
6+
Download-URL: https://pypi.org/project/PyYAML/
7+
Author: Kirill Simonov
8+
Author-email: [email protected]
9+
License: MIT
10+
Project-URL: Bug Tracker, https://github.com/yaml/pyyaml/issues
11+
Project-URL: CI, https://github.com/yaml/pyyaml/actions
12+
Project-URL: Documentation, https://pyyaml.org/wiki/PyYAMLDocumentation
13+
Project-URL: Mailing lists, http://lists.sourceforge.net/lists/listinfo/yaml-core
14+
Project-URL: Source Code, https://github.com/yaml/pyyaml
15+
Platform: Any
16+
Classifier: Development Status :: 5 - Production/Stable
17+
Classifier: Intended Audience :: Developers
18+
Classifier: License :: OSI Approved :: MIT License
19+
Classifier: Operating System :: OS Independent
20+
Classifier: Programming Language :: Cython
21+
Classifier: Programming Language :: Python
22+
Classifier: Programming Language :: Python :: 3
23+
Classifier: Programming Language :: Python :: 3.6
24+
Classifier: Programming Language :: Python :: 3.7
25+
Classifier: Programming Language :: Python :: 3.8
26+
Classifier: Programming Language :: Python :: 3.9
27+
Classifier: Programming Language :: Python :: 3.10
28+
Classifier: Programming Language :: Python :: 3.11
29+
Classifier: Programming Language :: Python :: Implementation :: CPython
30+
Classifier: Programming Language :: Python :: Implementation :: PyPy
31+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
32+
Classifier: Topic :: Text Processing :: Markup
33+
Requires-Python: >=3.6
34+
License-File: LICENSE
35+
36+
YAML is a data serialization format designed for human readability
37+
and interaction with scripting languages. PyYAML is a YAML parser
38+
and emitter for Python.
39+
40+
PyYAML features a complete YAML 1.1 parser, Unicode support, pickle
41+
support, capable extension API, and sensible error messages. PyYAML
42+
supports standard YAML tags and provides Python-specific tags that
43+
allow to represent an arbitrary Python object.
44+
45+
PyYAML is applicable for a broad range of tasks from complex
46+
configuration files to object serialization and persistence.

0 commit comments

Comments
 (0)