AppDataManager 应用数据管理库

GitHub

PyPI

Features

  • 🚀 Zero dependencies - Only Python standard library
  • 📁 Automatic paths - Auto-saved to system user directory
  • 🐍 Pythonic - Dict-like and attribute-like access
  • 🔒 Namespace isolation - Multiple apps don't interfere
  • Simple & intuitive - No configuration needed

Installation

1
pip install AppDataManager

Quick Start

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from AppDataManager import AppDataManager

# Create manager
dm = AppDataManager("myapp")

# Dict-style access
dm["config.json"] = '{"theme": "dark"}'
print(dm["config.json"])

# Attribute-style access
dm.setting = "enabled"
print(dm.setting)

# Iterate all data
for key in dm:
print(f"{key}: {dm[key]}")

# Check existence
if "config.json" in dm:
print("Config exists")

# Delete
del dm.setting

# Count
print(f"Total: {len(dm)} files")

Storage Locations

  • Windows: %LOCALAPPDATA%\<namespace>
  • macOS: ~/Library/Application Support/<namespace>
  • Linux: ~/.local/share/<namespace>

AppDataManager 应用数据管理库
https://qiufengcute.github.io/Blog/posts/库/AppDataManager/
作者
Qiufeng
发布于
2026年3月24日
许可协议