Library to easymock out elasticsearch for your tests
Project description
Molastic
Install
$ pip install molastic
Quickstart
Molastic is a library to easymock out elasticsearch for your tests
import molastic
import requests
def test_something():
base_url = 'mock://elastic'
with molastic.mock_elasticsearch(base_url):
requests.post(
url=f'{base_url}/my-index/_doc',
json={
"user": {
"id": "kimchy"
}
}
)
Features
- Types supported: Text, SearchAsYouType, Long, Float, Double, Boolean, Keyword, Date, Geopoint, Geoshape
- Analyzers: Standard
- Document APIs: Index, Update, Delete, Get, Exists
- Index APIs: Create index, Delete index, Exists, Update mapping, Get Mapping
- Multi-Fields
- Queries DSL supported: DisjunctionMaxQuery, Boolean, Match, MatchBoolPrefix, MultiMatch, MatchAll, Term, Prefix, Range, Geoshape, Geodistance
- Scripting: painless (but maps cannot be accessed by dot notation)
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
molastic-1.0.0.tar.gz
(51.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
molastic-1.0.0-py3-none-any.whl
(56.2 kB
view details)
File details
Details for the file molastic-1.0.0.tar.gz.
File metadata
- Download URL: molastic-1.0.0.tar.gz
- Upload date:
- Size: 51.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58099aff5d7240c12127bfa7c73b3e3736967ba8a4f8649dfc7ba0f3b0cd0795
|
|
| MD5 |
1447efb52050ba264f68378e6cea7ac0
|
|
| BLAKE2b-256 |
885f69897db141cedd88d69ea1927fef914793410d5de7993818411cc97b8ce5
|
File details
Details for the file molastic-1.0.0-py3-none-any.whl.
File metadata
- Download URL: molastic-1.0.0-py3-none-any.whl
- Upload date:
- Size: 56.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe26adf24a595adc7f8771745d09fc50d1319e02cfba8861677457f426702659
|
|
| MD5 |
47c5c0cd10c92681bc2ff08f98bd8577
|
|
| BLAKE2b-256 |
d872c58b2977438b246dda7e44809d17b5a76841a873a2d270cc81a7526cb04c
|