MerginMaps / MerginMaps/python-api-client

Add API call to download one file

Ouverte
#210 5 commentaires 2 réactions 1 personne assignée Voir sur GitHub

@varmar05 y travaille déjà.

Depuis le 10/8/2026.

enhancement testing OK
Langage dominant
Python
Étoiles
23
Forks
12
Merge moyen
2 j 13 h
PR mergées (30 j)
7

Description

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

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.