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 details)

Uploaded Source

File details

Details for the file lyseum_hack_ege_client-1.0.0.tar.gz.

File metadata

  • Download URL: lyseum_hack_ege_client-1.0.0.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.7

File hashes

Hashes for lyseum_hack_ege_client-1.0.0.tar.gz
Algorithm Hash digest
SHA256 672f2da3958f2b955ff6cd2bf1f1eb207ead954cb3ca000d343fe84fe8725f69
MD5 266dfac28c27b0104526e13b6e717b9f
BLAKE2b-256 d63b2578658c2f12576f5d976d0cafc638ef6704eac2394c6b383e90afc03525

See more details on using hashes here.

Supported by

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