新聞中心
這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
創(chuàng)新互聯(lián)Python教程:數(shù)據(jù)持久化
數(shù)據(jù)持久化
本章中描述的模塊支持在磁盤上以持久形式存儲 python 數(shù)據(jù)。 pickle 和 marshal 模塊可以將許多 Python 數(shù)據(jù)類型轉(zhuǎn)換為字節(jié)流,然后從字節(jié)中重新創(chuàng)建對象。 各種與 DBM 相關(guān)的模塊支持一系列基于散列的文件格式,這些格式存儲字符串到其他字符串的映射。

本章中描述的模塊列表是:
- pickle —- Python 對象序列化
- 與其他 Python 模塊間的關(guān)系
- 與 marshal 間的關(guān)系
- 與 json 模塊的比較
- 數(shù)據(jù)流格式
- 模塊接口
- 可以被封存/解封的對象
- 封存類實例
- 持久化外部對象
- Dispatch 表
- 處理有狀態(tài)的對象
- 類型,函數(shù)和其他對象的自定義歸約
- 外部緩沖區(qū)
- 提供方 API
- 使用方 API
- 示例
- 限制全局變量
- 性能
- 例子
- 與其他 Python 模塊間的關(guān)系
- copyreg —- 注冊配合 pickle 模塊使用的函數(shù)
- 示例
- shelve —- Python 對象持久化
- 限制
- 示例
- marshal —- 內(nèi)部 Python 對象序列化
- dbm —- Unix “數(shù)據(jù)庫” 接口
- dbm.gnu —- GNU 對 dbm 的重解析
- dbm.ndbm —- 基于 ndbm 的接口
- dbm.dumb —- 便攜式 DBM 實現(xiàn)
- sqlite3 —- SQLite 數(shù)據(jù)庫 DB-API 2.0 接口模塊
- 教程
- 參考
- Module functions
- Module constants
- Connection objects
- Cursor objects
- Row objects
- Blob objects
- PrepareProtocol objects
- 異常
- SQLite 與 Python 類型
- 默認(rèn)適配器和轉(zhuǎn)換器
- 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
- 說明
- Transaction control
分享題目:創(chuàng)新互聯(lián)Python教程:數(shù)據(jù)持久化
文章鏈接:http://fisionsoft.com.cn/article/dpcsdsg.html


咨詢
建站咨詢
