MerginMaps / MerginMaps/python-api-client
Add API call to download one file
@varmar05 已经在做这个了。
开始于 2026年8月10日。
- 主要语言
- Python
- 星标
- 23
- 派生
- 12
- 平均合并
- 2 天 13 小时
- 30 天内合并 PR
- 7
描述
Currently, there's no simple way to fetch just one file from a project. There is download_file() API call, but it needs the project to be already downloaded (it is useful just to get older versions of a file).
One could either query MM server API directly, e.g.:
https://app.merginmaps.com/v1/project/raw/<workspace>/<project>?file=myfile.gpkg
(with appropriate auth token)
Alternatively, using python with a workaround like this (handles auth stuff):
from mergin import MerginClient
from mergin.utils import save_to_file
mergin_client = MerginClient(...)
res = mergin_client.get('/v1/project/raw/<workspace>/<project>', data={'file': 'myfile.gpkg'})
save_to_file(res, 'myfile.gpkg')
If we add support for this, maybe we could just update the existing download_file() implementation so that it will accept as the first argument either <workspace>/<project> or it would accept an existing the local directory with a project downloaded already.
No project checkout, download raw file
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
评估
这个 Issue 还没有评估数据。