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 Image:
@dataclass
class Image:
url: str
bucket_url: str
width: int
height: int
bytes_size: int
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
Release history Release notifications | RSS feed
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.1.5.tar.gz
(2.1 kB
view hashes)
Built Distribution
Close
Hashes for vaknl_image-1.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eea2c1b4171706b8ac063009be50fbd3ec0189ac439eb04652650d2495e5feac |
|
MD5 | 48eb1f1983c8043a18a809376cd97a25 |
|
BLAKE2b-256 | 406d664a442253b020b391d5ca0d7f93b5d1efd3c876902f68cf25695e2213fb |