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
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-content-0.0.1.tar.gz
(2.8 kB
view hashes)
Built Distribution
Close
Hashes for vaknl_content-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56247ccc780f024c8f6dae90c84949de9d860862b6dee844e05bbba8977c30ac |
|
MD5 | b7a1997148fa431ebcff41bd7d08dcd2 |
|
BLAKE2b-256 | 18079e206808694f0e8f1b66f43fae9284f8af1381662592d297c57257422414 |