A Python client for Constructor.io. Constructor.io provides search as a service that optimizes results using artificial intelligence (including natural language processing, re-ranking to optimize for conversions, and user personalization).
Full API documentation is available on Github Pages
Requesting results from your back-end can be useful in order to control result rendering logic on your server, or augment/hydrate results with data from another system. However, a back-end integration has additional requirements compared to a front-end integration. Please review the Additional Information For Backend Integrations article within the wiki for more detail.
pip install constructor-io
You can find this in your Constructor.io dashboard. Contact sales if you'd like to sign up, or support if you believe your company already has an account.
Once imported, an instance of the client can be created as follows:
from constructor_io.constructor_io import ConstructorIO
constructorio = ConstructorIO({
"api_key": "YOUR API KEY",
})
After instantiating an instance of the client, four modules will be exposed as properties to help retrieve data from Constructor.io: search
, browse
, autocomplete
, and recommendations
.
make install # install dependencies
pipenv run pylint constructor_io # run lint
pipenv run pytest . # run tests with coverage report
make docs # output documentation to `./docs` directory