An API client for Swiftype Enterprise
Project description
A first-party Python client for Elastic Enterprise Search.
Contents
Getting started 🐣
Supports Python 2.7 and Python 3.3+.
Depends on futures and requests.
Installed with
pip <http://pypi.python.org/pypi/pip>
:
$ python -m pip install swiftype_enterprise
You can also download and install the project source:
$ python setup.py install
Usage
Retrieve your access token and a content source key after creating your content source.
Indexing a document into a custom content source:
from swiftype_enterprise import SwiftypeEnterpriseClient
content_source_key = 'content source key'
authorization_token = 'authorization token'
client = SwiftypeEnterpriseClient(authorization_token)
documents = [
{
'id': '1234',
'url': 'https://github.com/swiftype/swiftype-enterprise-python',
'title': 'Swiftype Enterprise Python Github',
'body': 'A descriptive body, with document contents and metadata'
}
]
document_results = client.index_documents(content_source_key, documents, timeout=10, delay=2)
print(document_results)
Change API endpoint
client = SwiftypeEnterpriseClient(authorization_token, "https://your-server.example.com/api/v1/ent")
FAQ 🔮
Where do I report issues with the client?
If something is not working as expected, please open an issue.
Contribute 🚀
We welcome contributors to the project. Before you begin, a couple notes...
- Before opening a pull request, please create an issue to discuss the scope of your proposal.
- Please write simple code and concise documentation, when appropriate.
License 📗
Thank you to all the contributors!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file swiftype_enterprise-1.0.0.tar.gz
.
File metadata
- Download URL: swiftype_enterprise-1.0.0.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18a8c5b3968868ceb9554e8f0807e221322ab47a935da8b172c2667241a37f31 |
|
MD5 | cff78fe53877744471f9076a98d7eecf |
|
BLAKE2b-256 | 5d128c5a858e1edff96aeb8da2fce870aa57575e3105ffb2870fe234e015b967 |