Metadata-Version: 2.4
Name: openvfs
Version: 0.1.6
Summary: openvfs
Project-URL: Documentation, https://github.com/tianyaXs/openvfs/blob/main/docs/USAGE.md
Project-URL: Repository, https://github.com/tianyaXs/openvfs.git
Author: OpenVFS Contributors
License-Expression: MIT
License-File: LICENSE
Keywords: agent,markdown,middleware,storage,store,vfs
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: py-key-value-aio[s3]>=0.4.4
Description-Content-Type: text/markdown

# OpenVFS

Agent 专用 Markdown 虚拟文件系统中间件，底层基于可热插拔的 Store 后端。

## 安装

```bash
uv add py-key-value-aio
uv add openvfs
```

## 快速示例

```python
from openvfs import OpenVfs

myvfs = OpenVfs.init_vfs()
myvfs.create_folder("openvfs://resources/project")

(myvfs
  .cd_path("resources", "project")
  .create_file("readme.md")
  .heading("安装", level=2, id="install")
  .block("uv add openvfs", type="code", lang="bash")
  .write())

content = myvfs.cd_path("resources", "project").create_file("readme.md").get_block(id="install")
```

## 直接导入 Store

```python
from openvfs import MemoryStore, OpenVfs

store = MemoryStore()
myvfs = OpenVfs.init_vfs(store=store)
```

可选后端示例：

```python
from openvfs import OpenVfs, S3Store

store = S3Store(
    bucket_name="my-bucket",
    endpoint_url="https://tos-s3-cn-beijing.volces.com",
    aws_access_key_id="your-ak",
    aws_secret_access_key="your-sk",
)
myvfs = OpenVfs.init_vfs(store=store)
```
