MerginMaps / MerginMaps/python-api-client
Add API call to download one file
@varmar05 がすでに取り組んでいます。
2026年8月10日 から。
- 主要言語
- Python
- スター
- 23
- フォーク
- 12
- 平均マージ
- 2日 13時間
- マージ済み PR(30日)
- 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 にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
評価
この issue はまだ評価されていません。