Add API call to download one file

Abierto
#210 5 comentarios 2 reacciones 1 asignado Ver en GitHub

@varmar05 ya está trabajando en esto.

Desde el 10/8/2026.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

enhancement testing OK

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

Lenguaje dominante
Python
Estrellas
23
Forks
12
Merge medio
2 d 13 h
PR fusionados (30 d)
7

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de MerginMaps/python-api-client

Todos los issues de MerginMaps/python-api-client

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.