This repo is deprecated. Use https://github.com/cortical-io/python-client-sdk
This is a very minimal HTTP client library for the CEPT API.
Get CEPT API credentials here. This will give you a free trail.
python setup.py install
import pycept
ceptClient = pycept.Cept("your_api_key")
catSdr = ceptClient.getSdr("cat")
catBitmap = ceptClient.getBitmap("cat")
similarTerms = ceptClient.bitmapToTerms(
catBitmap['width'],
catBitmap['height'],
catBitmap['positions']
)
To prevent duplicate requests to the CEPT API, pycept will cache SDR responses by default to /tmp/pycept
. You can provide your own cache directory location by specifying a cache_dir
value to the constructor:
pycept.Cept("your_api_key", cache_dir="./my-cache")
nosetests