Skip to main content

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']

Metadata

Release files for lyseum-hack-ege-client 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lyseum-hack-ege-client 1.0.0
File Size Uploaded
lyseum_hack_ege_client-1.0.0.tar.gz 3.6 kB Details

Release files / lyseum_hack_ege_client-1.0.0.tar.gz

Download URL lyseum_hack_ege_client-1.0.0.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
672f2da3958f2b955ff6cd2bf1f1eb207ead954cb3ca000d343fe84fe8725f69
BLAKE2b-256 checksum
How to use checksums
d63b2578658c2f12576f5d976d0cafc638ef6704eac2394c6b383e90afc03525
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.7

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page