Skip to main content

Eve-Elastic

https://travis-ci.org/petrjasek/eve-elastic.png?branch=master

Eve-Elastic is elasticsearch data layer for eve REST framework.

Features

  • fulltext search

  • filtering via elasticsearch filter dsl

  • facets support

  • elasticsearch mapping generator for schema

License

Eve-Elastic is GPLv3 licensed.

Install

$ pip install Eve-Elastic

Usage

Set elastic as your eve data layer.

import eve
from eve_elastic import Elastic

app = eve.Eve(data=Elastic)

Config

There are 2 options for Eve-Elastic taken from app.config:

  • ELASTICSEARCH_URL (default: 'http://localhost:9200/')

  • ELASTICSEARCH_INDEX - (default: 'eve')

Query params

Eve-Elastic supports eve like queries via where param which work as term filter.

On top of this, there is a predefined query_string query which does fulltext search.

$ curl http://localhost:5000/items?q=foo&df=name
  • q - query (default: *)

  • df - default field (default: _all)

Filtering

For more sophisticated filtering, you can use filter query param which will be used as filter for the query, using elastic filter dsl.

Facets

To add a facets support for specific resource, add facets into its datasource:

DOMAIN = {
    'contacts': {
        'datasource':
            'facets': {
                'urgency': {'terms': {'field': 'urgency'}},
                'versioncreated': {'date_histogram': {'field': 'versioncreated', 'interval': 'hour'}}
            }
        }
    }

You will find more info about facets in elasticsearch docs.

Changelog

0.1.5 (2014-05-05)

  • Fix for elastic 1.0+ fields handling

0.1.4 (2014-05-02)

  • Make it work with elastic 1.0+

0.1.3 (2014-01-31)

  • Allow filtering via elasticsearch filter dsl

0.1.2 (2014-01-30)

  • Fix pip install (add missing MANIFEST file)

0.1.1 (2014-01-30)

  • Add changelog ;)

  • Migrate readme to rst and use it for long_description

0.1.0 (2014-01-28)

  • Initial release

Metadata

Release files for Eve-Elastic 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Eve-Elastic 0.1.5
File Size Uploaded Provenance Actions
Eve-Elastic-0.1.5.tar.gz 41.7 kB Without provenance Details for Eve-Elastic-0.1.5.tar.gz

Release files / Eve-Elastic-0.1.5.tar.gz

Download URL Eve-Elastic-0.1.5.tar.gz
Size 41.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d40152ea1d8be8926f882fa0277b50a205c0628db088a03a63b70725b9e8d041
BLAKE2b-256 checksum
How to use checksums
0a90aa05f1187b0598864d3166cdb084743c1ba68e8121e4c0fd49d01f45a8f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for Eve-Elastic 0.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.5 This release

1 release file No provenance

0.1b

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page