# Python 标准库 Reference

URL: https://caijiao.org/reference/python/
Source: docs/reference/python/index.md
Description: 查询 pathlib、json、csv、datetime、subprocess、os、re、itertools、collections 和 logging 常用写法。

查询 pathlib、json、csv、datetime、subprocess、os、re、itertools、collections 和 logging 常用写法。

## 文件路径、JSON 与 CSV

- [pathlib.Path](/reference/python/pathlib-path)
- [pathlib.exists](/reference/python/pathlib-exists)
- [pathlib.read_text](/reference/python/pathlib-read-text)
- [pathlib.write_text](/reference/python/pathlib-write-text)
- [pathlib.glob](/reference/python/pathlib-glob)
- [pathlib.mkdir](/reference/python/pathlib-mkdir)
- [pathlib.unlink](/reference/python/pathlib-unlink)
- [pathlib.rename](/reference/python/pathlib-rename)
- [json.load](/reference/python/json-load)
- [json.loads](/reference/python/json-loads)
- [json.dump](/reference/python/json-dump)
- [json.dumps](/reference/python/json-dumps)
- [json.JSONDecodeError](/reference/python/json-jsondecodeerror)
- [json.ensure_ascii](/reference/python/json-ensure-ascii)
- [json.object_hook](/reference/python/json-object-hook)
- [json.indent](/reference/python/json-indent)
- [csv.reader](/reference/python/csv-reader)
- [csv.DictReader](/reference/python/csv-dictreader)
- [csv.writer](/reference/python/csv-writer)
- [csv.DictWriter](/reference/python/csv-dictwriter)
- [csv.dialect](/reference/python/csv-dialect)
- [csv.delimiter](/reference/python/csv-delimiter)
- [csv.quotechar](/reference/python/csv-quotechar)
- [csv.Sniffer](/reference/python/csv-sniffer)

## 日期时间、进程与系统

- [datetime.datetime.now](/reference/python/datetime-datetime-now)
- [datetime.datetime.strptime](/reference/python/datetime-datetime-strptime)
- [datetime.datetime.strftime](/reference/python/datetime-datetime-strftime)
- [datetime.date.today](/reference/python/datetime-date-today)
- [datetime.timedelta](/reference/python/datetime-timedelta)
- [datetime.timezone](/reference/python/datetime-timezone)
- [datetime.fromisoformat](/reference/python/datetime-fromisoformat)
- [datetime.timestamp](/reference/python/datetime-timestamp)
- [subprocess.run](/reference/python/subprocess-run)
- [subprocess.Popen](/reference/python/subprocess-popen)
- [subprocess.check_output](/reference/python/subprocess-check-output)
- [subprocess.CalledProcessError](/reference/python/subprocess-calledprocesserror)
- [subprocess.timeout](/reference/python/subprocess-timeout)
- [subprocess.capture_output](/reference/python/subprocess-capture-output)
- [subprocess.shell](/reference/python/subprocess-shell)
- [subprocess.cwd](/reference/python/subprocess-cwd)
- [os.getcwd](/reference/python/os-getcwd)
- [os.environ](/reference/python/os-environ)
- [os.listdir](/reference/python/os-listdir)
- [os.makedirs](/reference/python/os-makedirs)
- [os.remove](/reference/python/os-remove)
- [os.rename](/reference/python/os-rename)
- [os.walk](/reference/python/os-walk)
- [os.path.join](/reference/python/os-path-join)

## 正则、迭代工具与集合

- [re.compile](/reference/python/re-compile)
- [re.search](/reference/python/re-search)
- [re.match](/reference/python/re-match)
- [re.findall](/reference/python/re-findall)
- [re.sub](/reference/python/re-sub)
- [re.split](/reference/python/re-split)
- [re.groups](/reference/python/re-groups)
- [re.flags](/reference/python/re-flags)
- [itertools.count](/reference/python/itertools-count)
- [itertools.cycle](/reference/python/itertools-cycle)
- [itertools.repeat](/reference/python/itertools-repeat)
- [itertools.chain](/reference/python/itertools-chain)
- [itertools.islice](/reference/python/itertools-islice)
- [itertools.product](/reference/python/itertools-product)
- [itertools.combinations](/reference/python/itertools-combinations)
- [itertools.groupby](/reference/python/itertools-groupby)
- [collections.Counter](/reference/python/collections-counter)
- [collections.defaultdict](/reference/python/collections-defaultdict)
- [collections.deque](/reference/python/collections-deque)
- [collections.namedtuple](/reference/python/collections-namedtuple)
- [collections.OrderedDict](/reference/python/collections-ordereddict)
- [collections.ChainMap](/reference/python/collections-chainmap)
- [collections.most_common](/reference/python/collections-most-common)
- [collections.update](/reference/python/collections-update)

## 日志

- [logging.getLogger](/reference/python/logging-getlogger)
- [logging.basicConfig](/reference/python/logging-basicconfig)
- [logging.debug](/reference/python/logging-debug)
- [logging.info](/reference/python/logging-info)
- [logging.warning](/reference/python/logging-warning)
- [logging.error](/reference/python/logging-error)
- [logging.exception](/reference/python/logging-exception)
- [logging.FileHandler](/reference/python/logging-filehandler)

## 相关内容

- [Reference 技术手册](/reference/)
- [Python 教程](/python/)
- [Python 问题库](/how-to/python/)
- [JSON Formatter](/tool/json-formatter)
- [Timestamp Converter](/tool/timestamp-converter)
