Skip to main content

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!

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

swiftype_enterprise-1.0.1.tar.gz (4.9 kB view details)

Uploaded Source

File details

Details for the file swiftype_enterprise-1.0.1.tar.gz.

File metadata

  • Download URL: swiftype_enterprise-1.0.1.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.23.3 CPython/3.6.5

File hashes

Hashes for swiftype_enterprise-1.0.1.tar.gz
Algorithm Hash digest
SHA256 a7c2346246a515e7167cc5e788af48995e9772d0c01bea8d388d3f8ba3457bb1
MD5 e05bf2a4da595308515a84c3865505b1
BLAKE2b-256 c3f8f5b50c3351801fe34a9495485e96e94782fcd80319fa903d9fed7f6d576c

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.1 This release

1 file

1.0.0

1 file

0.1.0

1 file

0.0.3

1 file

0.0.2

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page