lupyne


Namelupyne JSON
Version 3.0 PyPI version JSON
download
home_page
SummaryPythonic search engine based on PyLucene.
upload_time2023-01-16 22:55:19
maintainer
docs_urlhttps://pythonhosted.org/lupyne/
author
requires_python>=3.7
licenseCopyright 2022 Aric Coady Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
keywords lucene pylucene
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![image](https://img.shields.io/pypi/v/lupyne.svg)](https://pypi.org/project/lupyne/)
![image](https://img.shields.io/pypi/pyversions/lupyne.svg)
[![image](https://pepy.tech/badge/lupyne)](https://pepy.tech/project/lupyne)
![image](https://img.shields.io/pypi/status/lupyne.svg)
[![image](https://github.com/coady/lupyne/workflows/build/badge.svg)](https://github.com/coady/lupyne/actions)
[![image](https://codecov.io/gh/coady/lupyne/branch/main/graph/badge.svg)](https://codecov.io/gh/coady/lupyne/)
[![image](https://github.com/coady/lupyne/workflows/codeql/badge.svg)](https://github.com/coady/lupyne/security/code-scanning)
[![image](https://img.shields.io/badge/code%20style-black-000000.svg)](https://pypi.org/project/black/)
[![image](http://mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)

Lupyne is a search engine based on [PyLucene](http://lucene.apache.org/pylucene/), the Python extension for accessing Java Lucene. Lucene is a relatively low-level toolkit, and PyLucene wraps it through automatic code generation. So although Java idioms are translated to Python idioms where possible, the resulting interface is far from Pythonic. See `./docs/examples.ipynb` for comparisons with the Lucene API.

Lupyne also provides GraphQL and RESTful search services, based on [Starlette](https://www.starlette.io). Note Solr and Elasticsearch are popular options for Lucene-based search, if no further (Python) customization is needed. So while the services are suitable for production usage, their primary motivation is to be an extensible example.

Not having to initially choose between an embedded library and a server not only provides greater flexibility, it can provide better performance, e.g., batch indexing offline and remote searching live. Additionally only lightweight wrappers with extended behavior are used wherever possible, so falling back to using PyLucene directly is always an option, but should never be necessary for performance.

## Usage
PyLucene requires initializing the VM.

```python
import lucene

lucene.initVM()
```

Indexes are accessed through an `IndexSearcher` (read-only), `IndexWriter`, or the combined `Indexer`.

```python
from lupyne import engine

searcher = engine.IndexSearcher('index/path')
hits = searcher.search('text:query')
```

See `./lupyne/services/README.md` for services usage.

## Installation
```console
% pip install lupyne[graphql,rest]
```

PyLucene is not `pip` installable.
* [Install instructions](http://lucene.apache.org/pylucene/install.html)
* [Docker](https://hub.docker.com) image: `docker pull coady/pylucene`
* [Homebrew](https://brew.sh) formula: `brew install coady/tap/pylucene`

## Dependencies
* PyLucene >=9.1
* strawberry-graphql >=0.84.4 (if graphql option)
* fastapi (if rest option)

## Tests
100% branch coverage.

```console
% pytest [--cov]
```

## Changes
3.0

* PyLucene >=9.1 required
* [CherryPy](https://cherrypy.org) server removed

2.5

* Python >=3.7 required
* PyLucene 8.6 supported
* [CherryPy](https://cherrypy.org) server deprecated

2.4

* PyLucene >=8 required
* `Hit.keys` renamed to `Hit.sortkeys`

2.3

* PyLucene >=7.7 required
* PyLucene 8 supported

2.2

* PyLucene 7.6 supported

2.1

* PyLucene >=7 required

2.0

* PyLucene >=6 required
* Python 3 support
* client moved to external package

1.9

* Python 2.6 dropped
* PyLucene 4.8 and 4.9 dropped
* IndexWriter implements context manager
* Server DocValues updated via patch method
* Spatial tile search optimized

1.8

* PyLucene 4.10 supported
* PyLucene 4.6 and 4.7 dropped
* Comparator iteration optimized
* Support for string based FieldCacheRangeFilters

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "lupyne",
    "maintainer": "",
    "docs_url": "https://pythonhosted.org/lupyne/",
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "lucene,pylucene",
    "author": "",
    "author_email": "Aric Coady <aric.coady@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/44/73/9b0a4fc84eebc3031a8adef6da901a2497ae0bb2bd079808e260c287e752/lupyne-3.0.tar.gz",
    "platform": null,
    "description": "[![image](https://img.shields.io/pypi/v/lupyne.svg)](https://pypi.org/project/lupyne/)\n![image](https://img.shields.io/pypi/pyversions/lupyne.svg)\n[![image](https://pepy.tech/badge/lupyne)](https://pepy.tech/project/lupyne)\n![image](https://img.shields.io/pypi/status/lupyne.svg)\n[![image](https://github.com/coady/lupyne/workflows/build/badge.svg)](https://github.com/coady/lupyne/actions)\n[![image](https://codecov.io/gh/coady/lupyne/branch/main/graph/badge.svg)](https://codecov.io/gh/coady/lupyne/)\n[![image](https://github.com/coady/lupyne/workflows/codeql/badge.svg)](https://github.com/coady/lupyne/security/code-scanning)\n[![image](https://img.shields.io/badge/code%20style-black-000000.svg)](https://pypi.org/project/black/)\n[![image](http://mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)\n\nLupyne is a search engine based on [PyLucene](http://lucene.apache.org/pylucene/), the Python extension for accessing Java Lucene. Lucene is a relatively low-level toolkit, and PyLucene wraps it through automatic code generation. So although Java idioms are translated to Python idioms where possible, the resulting interface is far from Pythonic. See `./docs/examples.ipynb` for comparisons with the Lucene API.\n\nLupyne also provides GraphQL and RESTful search services, based on [Starlette](https://www.starlette.io). Note Solr and Elasticsearch are popular options for Lucene-based search, if no further (Python) customization is needed. So while the services are suitable for production usage, their primary motivation is to be an extensible example.\n\nNot having to initially choose between an embedded library and a server not only provides greater flexibility, it can provide better performance, e.g., batch indexing offline and remote searching live. Additionally only lightweight wrappers with extended behavior are used wherever possible, so falling back to using PyLucene directly is always an option, but should never be necessary for performance.\n\n## Usage\nPyLucene requires initializing the VM.\n\n```python\nimport lucene\n\nlucene.initVM()\n```\n\nIndexes are accessed through an `IndexSearcher` (read-only), `IndexWriter`, or the combined `Indexer`.\n\n```python\nfrom lupyne import engine\n\nsearcher = engine.IndexSearcher('index/path')\nhits = searcher.search('text:query')\n```\n\nSee `./lupyne/services/README.md` for services usage.\n\n## Installation\n```console\n% pip install lupyne[graphql,rest]\n```\n\nPyLucene is not `pip` installable.\n* [Install instructions](http://lucene.apache.org/pylucene/install.html)\n* [Docker](https://hub.docker.com) image: `docker pull coady/pylucene`\n* [Homebrew](https://brew.sh) formula: `brew install coady/tap/pylucene`\n\n## Dependencies\n* PyLucene >=9.1\n* strawberry-graphql >=0.84.4 (if graphql option)\n* fastapi (if rest option)\n\n## Tests\n100% branch coverage.\n\n```console\n% pytest [--cov]\n```\n\n## Changes\n3.0\n\n* PyLucene >=9.1 required\n* [CherryPy](https://cherrypy.org) server removed\n\n2.5\n\n* Python >=3.7 required\n* PyLucene 8.6 supported\n* [CherryPy](https://cherrypy.org) server deprecated\n\n2.4\n\n* PyLucene >=8 required\n* `Hit.keys` renamed to `Hit.sortkeys`\n\n2.3\n\n* PyLucene >=7.7 required\n* PyLucene 8 supported\n\n2.2\n\n* PyLucene 7.6 supported\n\n2.1\n\n* PyLucene >=7 required\n\n2.0\n\n* PyLucene >=6 required\n* Python 3 support\n* client moved to external package\n\n1.9\n\n* Python 2.6 dropped\n* PyLucene 4.8 and 4.9 dropped\n* IndexWriter implements context manager\n* Server DocValues updated via patch method\n* Spatial tile search optimized\n\n1.8\n\n* PyLucene 4.10 supported\n* PyLucene 4.6 and 4.7 dropped\n* Comparator iteration optimized\n* Support for string based FieldCacheRangeFilters\n",
    "bugtrack_url": null,
    "license": "Copyright 2022 Aric Coady  Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ",
    "summary": "Pythonic search engine based on PyLucene.",
    "version": "3.0",
    "split_keywords": [
        "lucene",
        "pylucene"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7f74f32439e8a7077cc2ad9dd28714a0ea81fef63f2fe3fd71513f3359106ec4",
                "md5": "d2acf0080e4a6859bcc0348a32224ae4",
                "sha256": "0508779e6ce02117d703545be4043a8688267222ca2aa9f3579f058e5c64671a"
            },
            "downloads": -1,
            "filename": "lupyne-3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d2acf0080e4a6859bcc0348a32224ae4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 27686,
            "upload_time": "2023-01-16T22:55:17",
            "upload_time_iso_8601": "2023-01-16T22:55:17.984392Z",
            "url": "https://files.pythonhosted.org/packages/7f/74/f32439e8a7077cc2ad9dd28714a0ea81fef63f2fe3fd71513f3359106ec4/lupyne-3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "44739b0a4fc84eebc3031a8adef6da901a2497ae0bb2bd079808e260c287e752",
                "md5": "e524f64063ee713e6616aa5c6e4a3568",
                "sha256": "ab99d9bd75b78d2f4899b99c8dde7f0a3f364686df27c2b446a0db5d12828e58"
            },
            "downloads": -1,
            "filename": "lupyne-3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "e524f64063ee713e6616aa5c6e4a3568",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 25320,
            "upload_time": "2023-01-16T22:55:19",
            "upload_time_iso_8601": "2023-01-16T22:55:19.337314Z",
            "url": "https://files.pythonhosted.org/packages/44/73/9b0a4fc84eebc3031a8adef6da901a2497ae0bb2bd079808e260c287e752/lupyne-3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-16 22:55:19",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "lupyne"
}
        
Elapsed time: 0.06188s