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

Fix Docstrings' Import Error #310

Merged
merged 2 commits into from Oct 14, 2022
Merged
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
40 changes: 20 additions & 20 deletions meilisearch_python_async/client.py
Expand Up @@ -72,7 +72,7 @@ async def create_dump(self) -> TaskInfo:

Examples:

>>> from meilisearch_async_client import Client
>>> from meilisearch_python_async import Client
>>> async with Client("http://localhost.com", "masterKey") as client:
>>> await client.create_dump()
"""
Expand All @@ -98,7 +98,7 @@ async def create_index(self, uid: str, primary_key: str | None = None) -> Index:

Examples:

>>> from meilisearch_async_client import Client
>>> from meilisearch_python_async import Client
>>> async with Client("http://localhost.com", "masterKey") as client:
>>> index = await client.create_index("movies")
"""
Expand All @@ -122,7 +122,7 @@ async def delete_index_if_exists(self, uid: str) -> bool:

Examples:

>>> from meilisearch_async_client import Client
>>> from meilisearch_python_async import Client
>>> async with Client("http://localhost.com", "masterKey") as client:
>>> await client.delete_index_if_exists()
"""
Expand Down Expand Up @@ -165,7 +165,7 @@ def generate_tenant_token(
Examples:

>>> from datetime import datetime, timedelta
>>> from meilisearch_async_client import Client
>>> from meilisearch_python_async import Client
>>>
>>> expires_at = datetime.utcnow() + timedelta(days=7)
>>>
Expand Down Expand Up @@ -209,7 +209,7 @@ async def get_indexes(self) -> list[Index] | None:

Examples:

>>> from meilisearch_async_client import Client
>>> from meilisearch_python_async import Client
>>> async with Client("http://localhost.com", "masterKey") as client:
>>> indexes = await client.get_indexes()
"""
Expand Down Expand Up @@ -247,7 +247,7 @@ async def get_index(self, uid: str) -> Index:

Examples:

>>> from meilisearch_async_client import Client
>>> from meilisearch_python_async import Client
>>> async with Client("http://localhost.com", "masterKey") as client:
>>> index = await client.get_index()
"""
Expand All @@ -273,9 +273,9 @@ def index(self, uid: str) -> Index:

Examples:

from meilisearch_async_client import Client
async with Client("http://localhost.com", "masterKey") as client:
index = client.index("movies")
>>> from meilisearch_python_async import Client
>>> async with Client("http://localhost.com", "masterKey") as client:
>>> index = client.index("movies")
"""
return Index(self.http_client, uid=uid)

Expand All @@ -294,7 +294,7 @@ async def get_all_stats(self) -> ClientStats:

Examples:

>>> from meilisearch_async_client import Client
>>> from meilisearch_python_async import Client
>>> async with Client("http://localhost.com", "masterKey") as client:
>>> stats = await client.get_all_stats()
"""
Expand All @@ -321,7 +321,7 @@ async def get_or_create_index(self, uid: str, primary_key: str | None = None) ->

Examples:

>>> from meilisearch_async_client import Client
>>> from meilisearch_python_async import Client
>>> async with Client("http://localhost.com", "masterKey") as client:
>>> index = await client.get_or_create_index("movies")
"""
Expand Down Expand Up @@ -352,7 +352,7 @@ async def create_key(self, key: KeyCreate) -> Key:

Examples:

>>> from meilisearch_async_client import Client
>>> from meilisearch_python_async import Client
>>> from meilissearch_async_client.models.client import KeyCreate
>>> async with Client("http://localhost.com", "masterKey") as client:
>>> key_info = KeyCreate(
Expand Down Expand Up @@ -385,7 +385,7 @@ async def delete_key(self, key: str) -> int:

Examples:

>>> from meilisearch_async_client import Client
>>> from meilisearch_python_async import Client
>>> async with Client("http://localhost.com", "masterKey") as client:
>>> await client.delete_key("abc123")
"""
Expand All @@ -406,7 +406,7 @@ async def get_keys(self) -> KeySearch:

Examples:

from meilisearch_async_client import Client
from meilisearch_python_async import Client
async with Client("http://localhost.com", "masterKey") as client:
keys = await client.get_keys()
"""
Expand All @@ -431,7 +431,7 @@ async def get_key(self, key: str) -> Key:

Examples:

>>> from meilisearch_async_client import Client
>>> from meilisearch_python_async import Client
>>> async with Client("http://localhost.com", "masterKey") as client:
>>> keys = await client.get_key("abc123")
"""
Expand All @@ -457,7 +457,7 @@ async def update_key(self, key: KeyUpdate) -> Key:

Examples:

>>> from meilisearch_async_client import Client
>>> from meilisearch_python_async import Client
>>> from meilissearch_async_client.models.client import KeyUpdate
>>> async with Client("http://localhost.com", "masterKey") as client:
>>> key_info = KeyUpdate(
Expand Down Expand Up @@ -490,7 +490,7 @@ async def get_raw_index(self, uid: str) -> IndexInfo | None:

Examples:

>>> from meilisearch_async_client import Client
>>> from meilisearch_python_async import Client
>>> async with Client("http://localhost.com", "masterKey") as client:
>>> index = await client.get_raw_index("movies")
"""
Expand All @@ -517,7 +517,7 @@ async def get_raw_indexes(self) -> list[IndexInfo] | None:

Examples:

>>> from meilisearch_async_client import Client
>>> from meilisearch_python_async import Client
>>> async with Client("http://localhost.com", "masterKey") as client:
>>> index = await client.get_raw_indexes()
"""
Expand All @@ -542,7 +542,7 @@ async def get_version(self) -> Version:

Examples:

>>> from meilisearch_async_client import Client
>>> from meilisearch_python_async import Client
>>> async with Client("http://localhost.com", "masterKey") as client:
>>> version = await client.get_version()
"""
Expand All @@ -564,7 +564,7 @@ async def health(self) -> Health:

Examples:

>>> from meilisearch_async_client import Client
>>> from meilisearch_python_async import Client
>>> async with Client("http://localhost.com", "masterKey") as client:
>>> health = await client.get_healths()
"""
Expand Down