# xiaoapi-elasticsearch
[xiaoapi](https://github.com/xiaojinlii/xiaoapi)的elasticsearch扩展包
## 安装
```
pip install xiaoapi-elasticsearch
```
## 配置
需要在 application/settings 中 添加以下配置:
```python
# Elasticsearch 配置
ELASTICSEARCH_ENABLE = False
ELASTICSEARCH_USER = "elastic"
ELASTICSEARCH_PASSWORD = "gv3Z0Nnti2gdApgzLmUN"
ELASTICSEARCH_URL = "http://127.0.0.1:9200"
```
然后在 application/settings 中的 EVENTS 里引入 xiaoapi_elasticsearch
```python
EVENTS = [
"xiaoapi_elasticsearch.connect_elasticsearch",
]
```
Raw data
{
"_id": null,
"home_page": null,
"name": "xiaoapi-elasticsearch",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "xiaoapi, fastapi, web-framework, elasticsearch",
"author": null,
"author_email": "xiaojinli <553555614@qq.com>",
"download_url": "https://files.pythonhosted.org/packages/d9/25/7ce30ab423b4b5cf9af0ebee5054b9f77eea02e2aaf9f56a34418b612242/xiaoapi-elasticsearch-0.0.3.tar.gz",
"platform": null,
"description": "# xiaoapi-elasticsearch\r\n[xiaoapi](https://github.com/xiaojinlii/xiaoapi)\u7684elasticsearch\u6269\u5c55\u5305\r\n\r\n\r\n## \u5b89\u88c5\r\n```\r\npip install xiaoapi-elasticsearch\r\n```\r\n\r\n\r\n## \u914d\u7f6e\r\n\u9700\u8981\u5728 application/settings \u4e2d \u6dfb\u52a0\u4ee5\u4e0b\u914d\u7f6e\uff1a\r\n```python\r\n# Elasticsearch \u914d\u7f6e\r\nELASTICSEARCH_ENABLE = False\r\nELASTICSEARCH_USER = \"elastic\"\r\nELASTICSEARCH_PASSWORD = \"gv3Z0Nnti2gdApgzLmUN\"\r\nELASTICSEARCH_URL = \"http://127.0.0.1:9200\"\r\n```\r\n\r\n\u7136\u540e\u5728 application/settings \u4e2d\u7684 EVENTS \u91cc\u5f15\u5165 xiaoapi_elasticsearch\r\n```python\r\nEVENTS = [\r\n \"xiaoapi_elasticsearch.connect_elasticsearch\",\r\n]\r\n```\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "xiaoapi elasticsearch",
"version": "0.0.3",
"project_urls": {
"Documentation": "https://github.com/xiaojinlii/xiaoapi/blob/main/libs/elasticsearch/README.md",
"Repository": "https://github.com/xiaojinlii/xiaoapi",
"Source Code": "https://github.com/xiaojinlii/xiaoapi/tree/main/libs/elasticsearch"
},
"split_keywords": [
"xiaoapi",
" fastapi",
" web-framework",
" elasticsearch"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "20e5bb80d7349cc54158260d0cce503dea86505c5b04b5e0b8c05d134ee8e03c",
"md5": "ae1b6a3b35ae3595ca94566cfa4f01e8",
"sha256": "46efee28a823474939a06ee9b50ad7a3de1f9d61737a64245e50bb4fe9abae60"
},
"downloads": -1,
"filename": "xiaoapi_elasticsearch-0.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ae1b6a3b35ae3595ca94566cfa4f01e8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 3863,
"upload_time": "2024-03-29T01:52:46",
"upload_time_iso_8601": "2024-03-29T01:52:46.901687Z",
"url": "https://files.pythonhosted.org/packages/20/e5/bb80d7349cc54158260d0cce503dea86505c5b04b5e0b8c05d134ee8e03c/xiaoapi_elasticsearch-0.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d9257ce30ab423b4b5cf9af0ebee5054b9f77eea02e2aaf9f56a34418b612242",
"md5": "bba9f6055b188df94b93602d88b7a169",
"sha256": "3a41e8169f14fe9485b644e9aa64c4f5dfc01b9888d992b7aff943922c2fa9f0"
},
"downloads": -1,
"filename": "xiaoapi-elasticsearch-0.0.3.tar.gz",
"has_sig": false,
"md5_digest": "bba9f6055b188df94b93602d88b7a169",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 4973,
"upload_time": "2024-03-29T01:52:48",
"upload_time_iso_8601": "2024-03-29T01:52:48.582409Z",
"url": "https://files.pythonhosted.org/packages/d9/25/7ce30ab423b4b5cf9af0ebee5054b9f77eea02e2aaf9f56a34418b612242/xiaoapi-elasticsearch-0.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-29 01:52:48",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "xiaojinlii",
"github_project": "xiaoapi",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "fastapi",
"specs": [
[
"==",
"0.110.0"
]
]
},
{
"name": "uvicorn",
"specs": [
[
"==",
"0.25.0"
]
]
},
{
"name": "typer",
"specs": [
[
"==",
"0.10.0"
]
]
},
{
"name": "loguru",
"specs": [
[
"==",
"0.7.2"
]
]
},
{
"name": "orjson",
"specs": [
[
"==",
"3.9.15"
]
]
},
{
"name": "SQLAlchemy",
"specs": [
[
"==",
"2.0.25"
]
]
},
{
"name": "asyncmy",
"specs": [
[
"==",
"0.2.9"
]
]
},
{
"name": "aiosqlite",
"specs": [
[
"==",
"0.20.0"
]
]
}
],
"lcname": "xiaoapi-elasticsearch"
}