MerginMaps / MerginMaps/python-api-client

Add API call to download one file

Đang mở
#210 5 bình luận 2 reaction 1 người được giao Xem trên GitHub

@varmar05 đang làm issue này rồi.

Từ ngày 10/8/2026.

enhancement testing OK
Ngôn ngữ chính
Python
Star
23
Fork
12
Merge trung bình
2 ngày 13 giờ
Pull request đã merge (30 ngày)
7

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.