Skip to main content

You need to overwrite to setup your connections

  • ElasticModel You can overwrite this constant in your settings: -- ELASTIC_DEBUG -- ELASTIC_INDEX_PREFIX -- ENV

Other files not directly related to elasticsearch:

  • Utils stuff for Django (paginator)
  • Unit tests

Build command: python setup.py sdist python setup.py bdist_wheel

Run ./build.sh build the package that will be available in the dist/ directory

if wheel return an error like not installed just run pip install wheel, you may need to install some dependencies

Resources about building lib: https://code.tutsplus.com/tutorials/how-to-write-package-and-distribute-a-library-in-python--cms-28693

http://www.diveintopython3.net/packaging.html

Project repo: gitlab.com

Setup in projects guide: -Create a module name elastic.py and override the get_connection to use target elastic service. -Create a unit test to ensure that connection is working. -Elastic periodic model in elastic.py module must inherit like this (ElasticPeriodic, ElasticCustom) -Build the package and install --pip install 'package_file generated by ./build.sh command'

** About tests and changes

If there's fixes changes to do in elastic_lib make the changes directly in your project i.e edit the file elastic from venv/lib/python3.5/site-packages/elastic_lib/elastic.py then run the unit test: pytest venv/lib/python3.5/site-packages/elastic_lib/test_elastic.py

If all unit test are green check the unit test of your project if here also all is green, copy the content of your changes in the elastic_lib project and build a new version. Then update the version in the different project then run the unit test in each project to be sure that it broke nothing.

You can't run the unit test here or on you local.

Build the doc

Install a venv with Python 3.9 somehow 3.10 raise error when importing collections Mapping.

python3.9 -m venv ~/venv-elastic_lib_2/
source ~/venv-elastic_lib_2/bin/activate

Install the dependencies

pip install -r requirements/test.txt

Update the doc/conf.py to set the correct doc version.

Run the command to build the doc and generate the package.

./build.sh

The command should not raise errors, check the docs/_build/html/index.html that the doc is correctly generated.

Release files for elastic-lib 24.3.25

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

Source distribution (sdist)

Source distribution for elastic-lib 24.3.25
File Size Uploaded
elastic_lib-24.3.25.tar.gz 33.9 kB Details

Release files / elastic_lib-24.3.25.tar.gz

Download URL elastic_lib-24.3.25.tar.gz
Size 33.9 kB
Tags Source
SHA-256 checksum
How to use checksums
2f2e03c579d0047e89d356eea5f79890e7042a8707791a93ba337a2a26c7c6c4
BLAKE2b-256 checksum
How to use checksums
4f307ec95a6fc50d90f9c3eee291d8b8d0b2b1e760ea99c7a26cf9348e7ef6e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.18

Release history Release notifications | RSS feed

This release

24.3.25 This release

1 release file

19.4.23

1 release file

19.3.28

1 release file

19.3.11

1 release file

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