Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

A Deprecated API client for Swiftype Enterprise Search. Use elastic_enterprise_search instead.

Project description

Elastic Enterprise Search Logo

⚠️ This client is deprecated ⚠️

swiftype_enterprise has been replaced by elastic_enterprise_search. Thank you! - Elastic

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...

License 📗

MIT © Elastic

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.

Files for swiftype-enterprise, version 1.0.1
Filename, size File type Python version Upload date Hashes
Filename, size swiftype_enterprise-1.0.1.tar.gz (4.9 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page