Official Python SDK for Objective, Inc. APIs
Project description
Objective, Inc. Python Library
This is the official python library for the Objective APIs. It provides convenient methods for using Objective's APIs.
Documentation
Our documentation can be found at https://objective.inc/docs.
Installation
pip install objective-sdk
Usage
The library reads the environment variable OBJECTIVE_API_KEY
for authenticating requests. Set this env var prior to using the library. To get an API key, create an account at https://app.objective.inc.
export OBJECTIVE_API_KEY="sk_YOUR_API_KEY"
Add your objects to the object store
from objective import Index, ObjectStore
# Add an object to the object store
obj_store = ObjectStore()
obj_store.upsert(
id=1,
object={
"title": "Sevendayz Men's Shady Records Eminem Hoodie Hoody Black Medium",
"brand": "sevendayz",
"imageURLHighRes": [
"https://images-na.ssl-images-amazon.com/images/I/41gMYeiNASL.jpg"
],
},
)
Create an index
index = Index.from_template(
template_name="text-neural-base", fields={"searchable": ["title", "brand"]}
)
Check indexing status
index.status()
{'PENDING': 0, 'PROCESSING': 1, 'PROCESSED': 0, 'LIVE': 0, 'ERROR': 0}
Development
Use python build to build this package:
python -m pip install --upgrade pip
# Install dependencies
pip install .
# Build package:
pip install build
python -m build
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
objective_sdk-1.0.0.tar.gz
(1.0 MB
view details)
Built Distribution
File details
Details for the file objective_sdk-1.0.0.tar.gz
.
File metadata
- Download URL: objective_sdk-1.0.0.tar.gz
- Upload date:
- Size: 1.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ec03e81362dc49f4bdeed758eb62833ed9afba22f3f2d00fcd9b503840dc0e5 |
|
MD5 | 874a970c1165365eac769ad12146fe96 |
|
BLAKE2b-256 | 3829da3e433700fffc6cdf32684a3f95debd3a411855c75d3a9c2cffda966a10 |
File details
Details for the file objective_sdk-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: objective_sdk-1.0.0-py3-none-any.whl
- Upload date:
- Size: 1.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 165da1cb183317a9c814e7832319ec8c25922145f762a2c31f185e7247ef11ce |
|
MD5 | 005deaa1648c2d173531d41e3ef9141c |
|
BLAKE2b-256 | 9746a1981e990d2521655b9407ad9f9a455a8d7086f21c80500d59e5ac47a631 |