Skip to main content

No project description provided

Project description

Description

Добавляет возможность сохранять файлы из хранилища

Installation

(PyPi)

pip install lyseum_hack_ege_client

Usage

Получим все баркоды существующие в базе

from lyseum_hack_ege_client import Client
codes = Client.all_barcodes()
print(codes)
>>>> ['1234567890123', '1234567890124']

Сохраним файлы документов по одному баркоду

from lyseum_hack_ege_client import Client
files = Client.barcode('1234567890123')
>>>> ["<YaSimpleFile filename='4.jpg' path='resource/detect/1234567890123/4.jpg'>"]
for file in files:
    print(file.name)
    >>>> 4.jpg
    print(file.fullpath)
    >>>> resource/detect/1234567890123/4.jpg
    file.save()  # Здесь фактическое сохранение файла.

Другой способ сохранения файлов

from lyseum_hack_ege_client import Client
files = Client.barcode('1234567890123')
Client.save_files(files)  # Последовательно скачаются файлы

Сохранение всех картинок из директории all

from lyseum_hack_ege_client import Client
files = Client.barcode('1234567890123')
paths = Client.synchronize_all()
print(paths)
>>>> ['resource/all/1.jpg', 'resource/all/2.jpg', 'resource/all/3.jpg']

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lyseum_hack_ege_client-1.0.0.tar.gz (3.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page