Skip to main content

Vakanties.nl pypi package

Project description

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

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

vaknl-image-1.3.1.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

vaknl_image-1.3.1-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file vaknl-image-1.3.1.tar.gz.

File metadata

  • Download URL: vaknl-image-1.3.1.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for vaknl-image-1.3.1.tar.gz
Algorithm Hash digest
SHA256 144cc39c7bef669e5319f8bdf2ac62500bef754d61497417da0c00266a7e1936
MD5 f6e963125490bd613ebf63589e1e5891
BLAKE2b-256 355b3058daf6a7e5ca3ec0eeed551496b24c42c500aa7471f3cfb3ff9764ace8

See more details on using hashes here.

File details

Details for the file vaknl_image-1.3.1-py3-none-any.whl.

File metadata

  • Download URL: vaknl_image-1.3.1-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for vaknl_image-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 18e466dfb27a7d284d5cb6933e8de291ff252c7ce8d1b71b6acbb8497aac7390
MD5 ea386006e6498acec50bf2d233ed069d
BLAKE2b-256 8b8f6d9cf5fb581c5a32fd05b00375475e127992f999b51cea258faa2dbff949

See more details on using hashes here.

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