Vision Product Search Wrapper
This library is a Python wrapper around the Cloud Vision Product Search Libary. It makes this tool easier to use by allowing you to initalize a ProductSearch object once with all of your credentials. It's object-oriented, so that you don't have to be constantly ferrying around names and paths and project ids.
Getting Started
from visionproductsearch.ProductSearch import ProductSearch, ProductCategories
# Initialize ProductSearch with your credentials
ps = ProductSearch(`my_gcp_project_id`, 'us-west1', 'path/to/creds.json', 'my_gcp_bucket_name' )
# Create a new product set
productSet = ps.createProductSet('my_test_set')
# Create a new product
product = ps.createProduct('my_fancy_shirt', ProductCategories.APPAREL)
# Add a reference image to a product
product.addReferenceImage('./skirt_pic.jpg')
# List all reference images for a product
for img in product.listReferenceImages():
print(img)
# Add a product to a product set
product.addProduct(product)
# List all products in a product set
for p in productSet.listProducts():
print(p)
# Search for similar products by image
productSet.search(ProductCategories.APPAREL, file_path='img/to/search.jpg')
Note that this is not a wrapper around all the functions in the Product Search library, but feel free to add them as a contributor!
Metadata
Release files for pyvisionproductsearch 0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pyvisionproductsearch-0.4.tar.gz | 7.3 kB | Without provenance | Details |
Release files / pyvisionproductsearch-0.4.tar.gz
| Download URL | pyvisionproductsearch-0.4.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e4297a9ac5a2113444e07571704de39a4fdfa3d0a1c4d9e332c88a1fc2431f70
|
|
BLAKE2b-256 checksum How to use checksums |
36d53b3394970c30f00d625612eda32671048d9ad97ea412598ee7cf72805786
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5
|
Security for pyvisionproductsearch 0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.