Skip to main content

Vaknl

Package for working with Images. Contains the default Image dataclass and methods to get and upload images to gcp.

Prerequisites

These modules dependant on two things. Firstly the vaknl-gcp package for working with GCP. Secondly the environment variable GOOGLE_CLOUD_PROJECT a.k.a. gcp project id.

Images

Class Acco with Images:

@dataclass
class Acco:
    @dataclass
    class Image:
        url: str  # original url
        bucket_url: str = None  # bucket url
        width: int = None  # pixel with
        height: int = None  # pixel height
        bytes_size: int = None  # bytes size of image
        labels: list = []  # labels of the image
        descriptions: list = []  # descriptions of the image

    giataid: str
    source: str  # provider of the data
    images: list
    timestamp: str = None  # timestamp updated

get_image(image_url, auth=None):

Gets an images from the internet with a retry fall back of 3 times.

returns width, heigth, size, data

upload_image_to_storage(id, bucket_name, image_url):

Gets images from the internet and uploads it to storage.

returns width, heigth, byte_size, blob_url

Release files for vaknl-image 1.3.1

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

Source distribution (sdist)

Source distribution for vaknl-image 1.3.1
File Size Uploaded
vaknl-image-1.3.1.tar.gz 2.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vaknl-image 1.3.1
File Interpreter ABI Platform
vaknl_image-1.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 7.0 kB

Release files / vaknl-image-1.3.1.tar.gz

Download URL vaknl-image-1.3.1.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
144cc39c7bef669e5319f8bdf2ac62500bef754d61497417da0c00266a7e1936
BLAKE2b-256 checksum
How to use checksums
355b3058daf6a7e5ca3ec0eeed551496b24c42c500aa7471f3cfb3ff9764ace8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

Release files / vaknl_image-1.3.1-py3-none-any.whl

Download URL vaknl_image-1.3.1-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
18e466dfb27a7d284d5cb6933e8de291ff252c7ce8d1b71b6acbb8497aac7390
BLAKE2b-256 checksum
How to use checksums
8b8f6d9cf5fb581c5a32fd05b00375475e127992f999b51cea258faa2dbff949
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

Release history Release notifications | RSS feed

This release

1.3.1 This release

2 release files

1.3.0

2 release files

1.2.9

2 release files

1.2.8

2 release files

1.2.7

2 release files

1.2.6

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1

2 release files

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