{ "info": { "author": "Spr\u00e5kbanken", "author_email": "maria.ohrman@gu.se", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: POSIX :: Linux", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Database", "Topic :: Software Development", "Topic :: Software Development :: Testing" ], "description": "Python Elasticsearch Test\n=========================\n\nStart Elasticsearch using Python.\n\nSettings\n--------\n\n::\n\n elasticsearch_test.ElasticsearchTest(\n port=1234\n es_path='/home/maria/elasticsearch-5.2.4'\n data_dir='/home/maria/es-data'\n es_java_opts='-Xms512m -Xmx512m'\n )\n\n``port``\n\nDefault: ``9200``\n\n``es_path``\n\nPath to the Elasticsearch directory (home of ``/bin``). Default: uses ``$ES_HOME``\n\n``es_java_opts``\n\nSets ``$ES_JAVA_OPTS`` for process to this value if present.\n\n\n``data_dir``\n\nDirectory to place ``/data`` and ``/logs`` in. Default: uses ``tempfile``.\n\nRunning\n-------\n\n::\n\n import time\n import elasticsearch_test\n instance = elasticsearch_test.ElasticsearchTest()\n\n # This blocks until either an error is found\n # or Elasticsearch has been initialized.\n\n instance.start()\n\n # or\n\n instance.start(block=False)\n\n while True:\n if instance.is_started():\n break\n time.sleep(1)\n\nTesting\n-------\n\nUse it as a resource:::\n\n import elasticsearch_test\n import elasticsearch\n\n with elasticsearch_test.ElasticsearchTest() as instance:\n connection_info = instance.get_connection_info()\n client = elasticsearch.Elasticsearch(connection_info)\n\n\nUse it as a Pytest fixture:::\n\n import elasticsearch_test\n\n @pytest.fixture(scope=\"session\")\n def es():\n instance = elasticsearch_test.ElasticsearchTest()\n instance.start()\n yield instance\n instance.stop()\n\n\nWhen using ``data_dir``, if there are preexisting data in the directory,\nyou should also wait for the data to be initialized:::\n\n with elasticsearch_test.ElasticsearchTest(data_dir='my_data') as instance:\n while not instance.is_data_initialized():\n time.sleep(1)\n # do something!\n\n\nTest this package\n-----------------\n\nNeeded: ``pyenv`` and the plugin ``pyenv-virtualenv``.\n\n1. Create a normal virtualenv and activate it\n\n2. Install extras ``pip install .[testing]``\n\n3. Install the needed Python versions using ``pyenv``: ``3.4``, ``3.5``, ``3.6``, ``3.7``\n\n4. Setup virtualenvs for all but the Python version you are using, for example if you use ``3.4``\n\n ::\n\n $ pyenv virtualenv -p python3.5 3.5.6 py35\n $ pyenv virtualenv -p python3.6 3.6.6 py36\n $ pyenv virtualenv -p python3.7 3.7.1 py37\n\n5. Activate everything and run `tox`:\n\n ::\n\n $ pyenv shell py35 py36 py37\n $ source ./venv/bin/activate\n $ tox\n\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/spraakbanken/elasticsearch-test-py", "keywords": "", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "elasticsearch-test-py", "package_url": "https://pypi.org/project/elasticsearch-test-py/", "platform": "", "project_url": "https://pypi.org/project/elasticsearch-test-py/", "project_urls": { "Homepage": "https://github.com/spraakbanken/elasticsearch-test-py" }, "release_url": "https://pypi.org/project/elasticsearch-test-py/1.1.0/", "requires_dist": [ "tox ; extra == 'testing'", "pytest ; extra == 'testing'", "requests ; extra == 'testing'", "coverage ; extra == 'testing'" ], "requires_python": "", "summary": "Start Elasticsearch with Python (for testing or other purposes)", "version": "1.1.0" }, "last_serial": 5127846, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "ddc4a99bceb5cd225ac327e6dac9fd60", "sha256": "4282dff57f4198a578a22ea98d606be4f7565b4f5b3f636a29b07ecf6b8b4543" }, "downloads": -1, "filename": "elasticsearch_test_py-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ddc4a99bceb5cd225ac327e6dac9fd60", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4516, "upload_time": "2019-01-25T12:50:29", "url": "https://files.pythonhosted.org/packages/59/9e/75cd5cf1e26069c179104e484c9786c7526ae31915d98071a5e60cd805ed/elasticsearch_test_py-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a395b386f2543e81b9771aa3a63197c1", "sha256": "854664f968d167c5a300be0d79cb8e1952bc9eab75d5c051fd65bd0371b06576" }, "downloads": -1, "filename": "elasticsearch-test-py-1.0.0.tar.gz", "has_sig": false, "md5_digest": "a395b386f2543e81b9771aa3a63197c1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4893, "upload_time": "2019-01-25T12:50:31", "url": "https://files.pythonhosted.org/packages/ed/5c/d9f658a860ff883c189a2b2aa45661a707499288238512b3bf8e9f95e153/elasticsearch-test-py-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "a9f3f2cfc17b018cb3d6710cfc0f15fc", "sha256": "22b887da276842af139ce475b197834bb32644a8e2ddc90e45c96c5b2560bb0c" }, "downloads": -1, "filename": "elasticsearch_test_py-1.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a9f3f2cfc17b018cb3d6710cfc0f15fc", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4553, "upload_time": "2019-04-11T08:57:24", "url": "https://files.pythonhosted.org/packages/fd/15/03c61395f0e87a94bb661e677e03af86815842900dffac6adde8622ed27d/elasticsearch_test_py-1.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5f5b68ff30e05e6a69358c145d5f6e23", "sha256": "b0d64685f19eff5061d3f9652ab482f49b85c02626aa3a50a93eb5526a7311d3" }, "downloads": -1, "filename": "elasticsearch-test-py-1.1.0.tar.gz", "has_sig": false, "md5_digest": "5f5b68ff30e05e6a69358c145d5f6e23", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4926, "upload_time": "2019-04-11T08:57:25", "url": "https://files.pythonhosted.org/packages/81/42/ea876c2a8438e2d0f3cdf1d1dda9459fbef026d0e6fcd18b6b12beeff55b/elasticsearch-test-py-1.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a9f3f2cfc17b018cb3d6710cfc0f15fc", "sha256": "22b887da276842af139ce475b197834bb32644a8e2ddc90e45c96c5b2560bb0c" }, "downloads": -1, "filename": "elasticsearch_test_py-1.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a9f3f2cfc17b018cb3d6710cfc0f15fc", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4553, "upload_time": "2019-04-11T08:57:24", "url": "https://files.pythonhosted.org/packages/fd/15/03c61395f0e87a94bb661e677e03af86815842900dffac6adde8622ed27d/elasticsearch_test_py-1.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5f5b68ff30e05e6a69358c145d5f6e23", "sha256": "b0d64685f19eff5061d3f9652ab482f49b85c02626aa3a50a93eb5526a7311d3" }, "downloads": -1, "filename": "elasticsearch-test-py-1.1.0.tar.gz", "has_sig": false, "md5_digest": "5f5b68ff30e05e6a69358c145d5f6e23", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4926, "upload_time": "2019-04-11T08:57:25", "url": "https://files.pythonhosted.org/packages/81/42/ea876c2a8438e2d0f3cdf1d1dda9459fbef026d0e6fcd18b6b12beeff55b/elasticsearch-test-py-1.1.0.tar.gz" } ] }