Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add async compatible classes #1480

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -8,6 +8,7 @@ build
*.egg
coverage.xml
junit.xml
elasticsearch_dsl/_unasync/
test_elasticsearch_dsl/htmlcov
docs/_build
.cache
Expand Down
24 changes: 24 additions & 0 deletions elasticsearch_dsl/__init__.py
Expand Up @@ -161,3 +161,27 @@
"token_filter",
"tokenizer",
]

try:
from .document import AsyncDocument # noqa: F401
from .faceted_search import AsyncFacetedSearch # noqa: F401
from .index import AsyncIndex, AsyncIndexTemplate # noqa: F401
from .mapping import AsyncMapping # noqa: F401
from .search import AsyncMultiSearch, AsyncSearch # noqa: F401
from .update_by_query import AsyncUpdateByQuery # noqa: F401

__all__.extend(
[
"AsyncDocument",
"AsyncFacetedSearch",
"AsyncIndex",
"AsyncIndexTemplate",
"AsyncMapping",
"AsyncSearch",
"AsyncMultiSearch",
"AsyncUpdateByQuery",
]
)
__all__.sort()
except ImportError:
pass
16 changes: 16 additions & 0 deletions elasticsearch_dsl/_async/__init__.py
@@ -0,0 +1,16 @@
# Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you 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.