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)
Metadata
Release files for molastic 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| molastic-1.0.0.tar.gz | 51.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| molastic-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 107.8 kB
Release files / molastic-1.0.0.tar.gz
| Download URL | molastic-1.0.0.tar.gz |
|---|---|
| Size | 51.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
58099aff5d7240c12127bfa7c73b3e3736967ba8a4f8649dfc7ba0f3b0cd0795
|
|
BLAKE2b-256 checksum How to use checksums |
885f69897db141cedd88d69ea1927fef914793410d5de7993818411cc97b8ce5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / molastic-1.0.0-py3-none-any.whl
| Download URL | molastic-1.0.0-py3-none-any.whl |
|---|---|
| Size | 56.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fe26adf24a595adc7f8771745d09fc50d1319e02cfba8861677457f426702659
|
|
BLAKE2b-256 checksum How to use checksums |
d872c58b2977438b246dda7e44809d17b5a76841a873a2d270cc81a7526cb04c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|