Skip to main content

bodybuilder

An (almost!) drop in replacement in python of the Elasticsearch Bodybuilder Package on NPM

The API has been designed to be as close to the original package.

Also, you can use https://bodybuilder.js.org/ to test your constructions with minor changes described below:

Variations

  • from -> from_ because from is a python keyword
  • need \ new-line indicator for multi line incantations in python which is not necessary in JS
  • individual Filter/Query/Aggregations classes not implemented (shouldn't affect user)
  • lambda functions instead of anonymous functions (Duh!)

Installation

Install from source

  1. Clone package locally
  2. Go to the root directory
  3. python3 setup.py install

Usage

from bodybuilder.builder import BodyBuilder as bodyBuilder
bodyBuilder().query("a", "b", "c").build()
{'query': {'a': {'b': 'c'}}}

Not Implemented

To be implemented

  • minimum_should_match query and filter
  • aggregation metadata

No plans to implement

  • Complicated multi sort
  • clone method (users can use copy.deepcopy() if required)
  • orQuery, andQuery, notQuery which has been deprecated n favor of bool method

Credits

Thanks to Danpaz and contributors of the original package for the original package from which I have liberally copied (with his permission!)

Release files for bodybuilder 0.1.0

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

Source distribution (sdist)

Source distribution for bodybuilder 0.1.0
File Size Uploaded
bodybuilder-0.1.0.tar.gz 6.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bodybuilder 0.1.0
File Interpreter ABI Platform
bodybuilder-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.8 kB

Release files / bodybuilder-0.1.0.tar.gz

Download URL bodybuilder-0.1.0.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
af6d3bea4d754648b790fc9074694edc7affc9a00778a2722dffc7a7bd7d5077
BLAKE2b-256 checksum
How to use checksums
36ec25c4a1fc625da22ebd4a2632b6766a41fd2e71b3f12b386e72885c16e5a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.8.0 tqdm/4.43.0 CPython/3.7.6

Release files / bodybuilder-0.1.0-py3-none-any.whl

Download URL bodybuilder-0.1.0-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
84a8e6b67c33e9bef732fa0e9fb1b7bf734826cb6dbf5c36f5bb6db4cac96932
BLAKE2b-256 checksum
How to use checksums
bc14432048d4ed0ccbb295ed1d34528774197d55c0b21f1e80b83a47b581d029
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.8.0 tqdm/4.43.0 CPython/3.7.6

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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