Python client for adPix API services.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
adpix
tests
.gitignore
LICENSE
README.md
requirements.txt
setup.py

README.md

AdPix API Python Client

Logo

Simple Python wrapper around our AdPix API service.

Installation

Pre-requisite libmagic.

brew install libmagic               # MacOS
sudo apt-get install libmagic-dev   # Ubuntu

The API client is available via pip.

pip install -U adpix    # python2
pip3 install -U adpix   # python3

Usage

Simple example to detect objects in an image.

from adpix.rest import adpixApp
import json

app = adpixApp(api_key="YOUR_API_KEY")
all_models = app.models.all_models
print(json.dumps(all_models, indent=4))

ads_model = app.models.get("custom_ads")   # load a model from all_modles

img_path = "path/to/local/image"
response = ads_model.predict_by_file_name(img_path) # or predict_by_file_names(<list of file paths>)
print(json.dumps(response, indent=4))