Python 3.12ベースの代表的な標準ライブラリ一覧
毎回何をデプロイするか悩むのが嫌だから、自分用の一覧
これらはLambdaですべて デプロイ・レイヤー不要でimportできる
(まれにエラーが出る場合もあるらしい…Chatgpt談)
一般ユーティリティ
abc
argparse
array
base64
bisect
calendar
cmath
collections
copy
datetime
decimal
enum
functools
fractions
hashlib
heapq
hmac
importlib
inspect
itertools
json
logging
math
numbers
operator
pathlib
random
re
statistics
string
struct
time
typing
uuid
warnings
weakref
OS / ファイル関連
os
sys
shutil
stat
tempfile
glob
fnmatch
subprocess
zipfile
tarfile
filecmp
pathlib
ネットワーク / 通信
socket
urllib
http
ssl
email
ipaddress
selectors
セキュリティ / 暗号化
hmac
hashlib
secrets
ssl
base64
並行処理
threading
multiprocessing (※Lambdaでは制限ありだが、importはできる)
concurrent.futures
asyncio
queue
テキスト・データ処理
csv
json
xml
html
plistlib
デバッグ / テスト
traceback
unittest
doctest
pdb
データフォーマット
pickle
marshal
struct
codecs
gzip
bz2
lzma
Web / HTTP 関連
http.client
http.server
urllib.request
urllib.parse
urllib.error
おまけ
デプロイかレイヤーが必要な標準ではないライブラリ例
requests
pandas
numpy
scipy
opencv
psycopg2
PyMySQL
paramiko
lxml
標準ライブラリではないがAWSが独自に最初から入れているライブラリ例
- デプロイ/レイヤーなしで使える!
boto3
botocore
レイヤーが必要だと知らずに実行してエラーに苦しんだので
戒めに、、