上一话题

shutil — 高级文件操作

下一话题
就业培训     下载中心     Wiki     联络
登录   注册

Log
  1. 首页
  2. Python 3.12.4
  3. 索引
  4. 模块
  5. 下一
  6. 上一
  7. Python 标准库
  8. 数据持久性

数据持久性 ¶

此章描述的模块支持以持久形式在磁盘存储 Python 数据。 pickle and marshal 模块可以将许多 Python 数据类型转换成字节流,然后从字节重新创建对象。各种 DBM 相关模块支持一系列基于哈希的文件格式 (存储字符串到其它字符串的映射)。

此章描述的模块列表:

  • pickle — Python 对象序列化
    • 与其它 Python 模块的关系
      • 比较同 marshal
      • 比较同 json
    • 数据流格式
    • 模块接口
    • 什么可以腌制和取消腌制?
    • 腌制类实例
      • 外部对象的持久性
      • 分派表
      • 处理有状态对象
    • 类型、函数和其它对象的自定义缩减
    • 波段外缓冲
      • 提供者 API
      • 消费者 API
      • 范例
    • 限定全局
    • 性能
    • 范例
  • copyreg — 注册 pickle 支持函数
    • 范例
  • shelve — Python 对象持久性
    • 限定
    • 范例
  • marshal — 内部 Python 对象序列化
  • dbm — Unix 数据库接口
    • dbm.gnu — GNU database manager
    • dbm.ndbm — New Database Manager
    • dbm.dumb — 便携式 DBM 实施
  • sqlite3 — SQLite 数据库的 DB-API 2.0 接口
    • 教程
    • 参考
      • Module functions
      • Module constants
      • Connection objects
      • Cursor objects
      • Row objects
      • Blob objects
      • PrepareProtocol objects
      • 异常
      • SQLite 和 Python 类型
      • Default adapters and converters (deprecated)
      • Command-line interface
    • How-to guides
      • How to use placeholders to bind values in SQL queries
      • How to adapt custom Python types to SQLite values
        • How to write adaptable objects
        • How to register adapter callables
      • How to convert SQLite values to custom Python types
      • Adapter and converter recipes
      • How to use connection shortcut methods
      • How to use the connection context manager
      • How to work with SQLite URIs
      • How to create and use row factories
      • How to handle non-UTF-8 text encodings
    • 解释
      • Transaction control
        • Transaction control via the autocommit 属性
        • Transaction control via the isolation_level 属性

上一话题

shutil — 高级文件操作

下一话题

pickle — Python 对象序列化

本页

  • 报告 Bug
  • 展示源

快速搜索

键入搜索术语或模块、类、函数名称。

  1. 首页
  2. Python 3.12.4
  3. 索引
  4. 模块
  5. 下一
  6. 上一
  7. Python 标准库
  8. 数据持久性

版权所有  © 2014-2026 乐数软件    

工业和信息化部: 粤ICP备14079481号-1