Skip to content

Commit

Permalink
Merge pull request #307 from sanders41/doc-strings
Browse files Browse the repository at this point in the history
Change docs to from mkautodocs to mkdocstrings
  • Loading branch information
sanders41 committed Oct 2, 2022
2 parents 6e6fb99 + df983e4 commit 7669878
Show file tree
Hide file tree
Showing 11 changed files with 1,348 additions and 1,344 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ repos:
rev: 5.0.4
hooks:
- id: flake8
additional_dependencies: [flake8-docstrings, flake8-print]
additional_dependencies: [flake8-print]
args: ["--ignore=E203,E231,E501,D100,D101,D102,D103,D104,D105,D106,D107,D401"]
55 changes: 0 additions & 55 deletions docs/api.md

This file was deleted.

36 changes: 36 additions & 0 deletions docs/client_api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
## `Client Usage`

### Create a client with a context manager

This client runs in a context manager which ensures that everything is cleaned up after the use of
the client is done. To create a client:

```py
from milisearch-python-async import Client


async with Client("http://localhost:7700", "masterKey") as client:
index = client.index("movies")
...
```

### Create a client without a context manager

It is also possible to call the client without using a context manager, but in doing so you will
need to make sure to do the cleanup yourself:

```py
from meilisearch-python-async import Client


try:
client = Client("http://localhost:7700", "masterKey")
...
finally:
await client.aclose()

```

## `Client API`

::: meilisearch_python_async.client.Client
3 changes: 3 additions & 0 deletions docs/index_api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## `Index`

::: meilisearch_python_async.index.Index
3 changes: 3 additions & 0 deletions docs/tasks_api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Tasks

::: meilisearch_python_async.task

0 comments on commit 7669878

Please sign in to comment.