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-content-0.0.2.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

vaknl_content-0.0.2-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file vaknl-content-0.0.2.tar.gz.

File metadata

  • Download URL: vaknl-content-0.0.2.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0.post20200627 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.4

File hashes

Hashes for vaknl-content-0.0.2.tar.gz
Algorithm Hash digest
SHA256 4ca3bf7847d547c7c985d9a739265efebbcf93d1553d9f2191a589d89068333e
MD5 ef31639f2dd2240a4d99560035b8fb23
BLAKE2b-256 24a7f34151e161f0137e998f3d9244b91d9caffe47b6641d44b45b44ed179c17

See more details on using hashes here.

File details

Details for the file vaknl_content-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: vaknl_content-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0.post20200627 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.4

File hashes

Hashes for vaknl_content-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b1230e088d383336c768320fb1f071f990d457b56da2a2f8c92a1da1b1bb8f62
MD5 50f5ac6c9fb06e4753ad2664ba75a4e7
BLAKE2b-256 156fb21c2eb0d4b1bd2ec57e6ff65c38e4ac7d79c1ff74e9e2796612bcacca0a

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