Skip to content

Commit 942e292

Browse files
committed
Rename package to meilisearch_python_sdk
1 parent 1019e38 commit 942e292

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+333
-337
lines changed

.github/workflows/pypi_publish.yaml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,16 @@ jobs:
99
steps:
1010
- uses: actions/checkout@v4
1111
- name: Install Poetry
12-
run: |
13-
pip install pipx
14-
pipx install poetry
12+
run: pipx install poetry
13+
- name: Add pypi token to Poetry
14+
run: poetry config pypi-token.pypi ${{ secrets.PYPI_API_KEY }}
1515
- name: Set up Python
1616
uses: actions/setup-python@v4
1717
with:
1818
python-version: 3.11
1919
cache: "poetry"
2020
- name: Install Dependencies
21-
run: |
22-
poetry install
23-
- name: Add pypi token to Poetry
24-
run: |
25-
poetry config pypi-token.pypi ${{ secrets.PYPI_API_KEY }}
21+
run: poetry install
2622
- name: Publish package
2723
run: poetry publish --build
2824
- name: Deploy Docs

CONTRIBUTING.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
All contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome.
66

7-
The best place to start is to check the [issues](https://github.com/sanders41/meilisearch-python-async/issues)
7+
The best place to start is to check the [issues](https://github.com/sanders41/meilisearch-python-sdk/issues)
88
for something that interests you.
99

1010
## Bug Reports
@@ -15,7 +15,7 @@ Please include:
1515
[GitHub markdown](https://docs.github.com/en/free-pro-team@latest/github/writing-on-github). For example:
1616

1717
```py
18-
from meilisearch_python_async import Client
18+
from meilisearch_python_sdk import Client
1919

2020
async with Client(BASE_URL, MASTER_KEY) as client:
2121
client.index("movies")
@@ -34,12 +34,12 @@ this project.
3434
Once the project is forked clone it to your local machine:
3535

3636
```sh
37-
git clone https://github.com/your-user-name/meilisearch-python-async.git
38-
cd meilisearch-python-async
39-
git remote add upstream https://github.com/sanders41/meilisearch-python-async.git
37+
git clone https://github.com/your-user-name/meilisearch-python-sdk.git
38+
cd meilisearch-python-sdk
39+
git remote add upstream https://github.com/sanders41/meilisearch-python-sdk.git
4040
```
4141

42-
This creates the directory meilisearch-python-async and connects your repository to the upstream (main project) repository.
42+
This creates the directory meilisearch-python-sdk and connects your repository to the upstream (main project) repository.
4343

4444
### Working with the code
4545

@@ -74,21 +74,21 @@ git pull upstream main --ff-only
7474

7575
### Code Standards and tests (ruff, black, mypy, pytest, and pre-commit)
7676

77-
meilisearch-python-async uses [ruff](https://github.com/charliermarsh/ruff),
77+
meilisearch-python-sdk uses [ruff](https://github.com/charliermarsh/ruff),
7878
[Black](https://github.com/psf/black), and [mypy](https://mypy.readthedocs.io/en/stable/) to ensure
7979
consistent code formatting.
8080

8181
You can run linting on your code at any time with:
8282

8383
```sh
8484
# Run black
85-
poetry run black meilisearch_python_async tests
85+
poetry run black meilisearch_python_sdk tests
8686

8787
# Run ruff
8888
poetry run ruff check .
8989

9090
# Run mypy
91-
poetry run mypy meilisearch_python_async
91+
poetry run mypy meilisearch_python_sdk
9292
```
9393

9494
It is also suggested that you setup [pre-commit](https://pre-commit.com/) in order to run linting
@@ -140,7 +140,7 @@ This project uses [pytest](https://docs.pytest.org/en/stable/) for testing. Plea
140140
additions/changes you make to the code have tests to go along with them. Code coverage should not
141141
drop blow it's current level with any pull requests you make, if it does the pull request will not
142142
be accepted. You can view the current coverage level in the codecov badge on the
143-
[main github page](https://github.com/sanders41/meilisearch-python-async). You can run tests and see the
143+
[main github page](https://github.com/sanders41/meilisearch-python-sdk). You can run tests and see the
144144
code coverage.
145145

146146
There are multiple way Meilisearch can be setup for testing. The examples below use docker, however
@@ -186,7 +186,7 @@ To see a full list of `just` commands run `just --list`
186186

187187
Documentation is automatically generated based on the doc strings from the functions/methods. If
188188
functions/methods are added/removed make sure to update the
189-
[api documentation page](https://github.com/sanders41/meilisearch-python-async/docs/api.md) accordingly.
189+
[api documentation page](https://github.com/sanders41/meilisearch-python-sdk/docs/api.md) accordingly.
190190

191191
You can view any changes to the docs locally by running:
192192

@@ -238,11 +238,11 @@ git remote -v
238238

239239
## Making a Pull Request
240240

241-
After pushing your code to origin it is now on GitHub but not yet part of the meilisearch-python-async project. When you’re ready to ask for a code review, file a pull request. Before you do, once again make sure that you have followed all the guidelines outlined in this document regarding code style, tests, and documentation.
241+
After pushing your code to origin it is now on GitHub but not yet part of the meilisearch-python-sdk project. When you’re ready to ask for a code review, file a pull request. Before you do, once again make sure that you have followed all the guidelines outlined in this document regarding code style, tests, and documentation.
242242

243243
### Make the pull request
244244

245-
If everything looks good, you are ready to make a pull request. This is how you let the maintainers of the meilisearch-python-async project know you have code ready to be reviewed. To submit the pull request:
245+
If everything looks good, you are ready to make a pull request. This is how you let the maintainers of the meilisearch-python-sdk project know you have code ready to be reviewed. To submit the pull request:
246246

247247
1. Navigate to your repository on GitHub
248248
2. Click on the Pull Request button for your feature branch

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# Meilisearch Python Async
1+
# Meilisearch Python SDK
22

3-
[![Tests Status](https://github.com/sanders41/meilisearch-python-async/workflows/Testing/badge.svg?branch=main&event=push)](https://github.com/sanders41/meilisearch-python-async/actions?query=workflow%3ATesting+branch%3Amain+event%3Apush)
4-
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/sanders41/meilisearch-python-async/main.svg)](https://results.pre-commit.ci/latest/github/sanders41/meilisearch-python-async/main)
5-
[![Coverage](https://codecov.io/github/sanders41/meilisearch-python-async/coverage.svg?branch=main)](https://codecov.io/gh/sanders41/meilisearch-python-async)
6-
[![PyPI version](https://badge.fury.io/py/meilisearch-python-async.svg)](https://badge.fury.io/py/meilisearch-python-async)
7-
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/meilisearch-python-async?color=5cc141)](https://github.com/sanders41/meilisearch-python-async)
3+
[![Tests Status](https://github.com/sanders41/meilisearch-python-sdk/workflows/Testing/badge.svg?branch=main&event=push)](https://github.com/sanders41/meilisearch-python-sdk/actions?query=workflow%3ATesting+branch%3Amain+event%3Apush)
4+
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/sanders41/meilisearch-python-sdk/main.svg)](https://results.pre-commit.ci/latest/github/sanders41/meilisearch-python-sdk/main)
5+
[![Coverage](https://codecov.io/github/sanders41/meilisearch-python-sdk/coverage.svg?branch=main)](https://codecov.io/gh/sanders41/meilisearch-python-sdk)
6+
[![PyPI version](https://badge.fury.io/py/meilisearch-python-sdk.svg)](https://badge.fury.io/py/meilisearch-python-sdk)
7+
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/meilisearch-python-sdk?color=5cc141)](https://github.com/sanders41/meilisearch-python-sdk)
88

9-
Meilisearch Python Async provides both an async and sync client for the
9+
Meilisearch Python SDK provides both an async and sync client for the
1010
[Meilisearch](https://github.com/meilisearch/meilisearch) API.
1111

1212
Which client to use depends on your use case. If the code base you are working with uses asyncio,
@@ -22,7 +22,7 @@ Using a virtual environmnet is recommended for installing this package. Once the
2222
environment is created and activated install the package with:
2323

2424
```sh
25-
pip install meilisearch-python-async
25+
pip install meilisearch-python-sdk
2626
```
2727

2828
## Run Meilisearch
@@ -49,7 +49,7 @@ docker run -it --rm -p 7700:7700 getmeili/meilisearch:latest ./meilisearch --mas
4949
network call to send the data yet so it does not need to be awaited.
5050

5151
```py
52-
from meilisearch_python_async import AsyncClient
52+
from meilisearch_python_sdk import AsyncClient
5353

5454
async with AsyncClient('http://127.0.0.1:7700', 'masterKey') as client:
5555
index = client.index("books")
@@ -65,7 +65,7 @@ async with AsyncClient('http://127.0.0.1:7700', 'masterKey') as client:
6565
#### Client
6666

6767
```py
68-
from meilisearch_python_async import Client
68+
from meilisearch_python_sdk import Client
6969

7070
client = Client('http://127.0.0.1:7700', 'masterKey')
7171
index = client.index("books")
@@ -195,13 +195,13 @@ This test compares how long it takes to send 1 million documents in batches of 1
195195
Meilisearch server for indexing (lower is better). The time does not take into account how long
196196
Meilisearch takes to index the documents since that is outside of the library functionality.
197197

198-
![Add Documents in Batches](https://raw.githubusercontent.com/sanders41/meilisearch-python-async/main/assets/add_in_batches.png)
198+
![Add Documents in Batches](https://raw.githubusercontent.com/sanders41/meilisearch-python-sdk/main/assets/add_in_batches.png)
199199

200200
### Muiltiple Searches
201201

202202
This test compares how long it takes to complete 1000 searches (lower is better)
203203

204-
![Multiple Searches](https://raw.githubusercontent.com/sanders41/meilisearch-python-async/main/assets/searches.png)
204+
![Multiple Searches](https://raw.githubusercontent.com/sanders41/meilisearch-python-sdk/main/assets/searches.png)
205205

206206
### Independent testing
207207

@@ -211,7 +211,7 @@ results how he tested them in his [blog post](https://thedataquarry.com/posts/me
211211

212212
## Documentation
213213

214-
See our [docs](https://meilisearch-python-async.paulsanders.dev) for the full documentation.
214+
See our [docs](https://meilisearch-python-sdk.paulsanders.dev) for the full documentation.
215215

216216
## Contributing
217217

benchmark/run_benchmark.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
from rich.console import Console
1515
from rich.progress import track
1616

17-
from meilisearch_python_async import AsyncClient, Client
18-
from meilisearch_python_async.models.task import TaskInfo
17+
from meilisearch_python_sdk import AsyncClient, Client
18+
from meilisearch_python_sdk.models.task import TaskInfo
1919

2020

2121
def generate_data(add_records: int = 1000000) -> list[dict[str, Any]]:

docs/CNAME

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
meilisearch-python-async.paulsanders.dev
1+
meilisearch-python-sdk.paulsanders.dev

docs/async_client_api.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This client runs in a context manager which ensures that everything is cleaned u
66
the client is done. To create a client:
77

88
```py
9-
from milisearch-python-async import AsyncClient
9+
from meilisearch-python-sdk import AsyncClient
1010

1111

1212
async with AsyncClient("http://localhost:7700", "masterKey") as client:
@@ -20,7 +20,7 @@ It is also possible to call the client without using a context manager, but in d
2020
need to make sure to do the cleanup yourself:
2121

2222
```py
23-
from meilisearch-python-async import AsyncClient
23+
from meilisearch-python-sdk import AsyncClient
2424

2525

2626
try:
@@ -33,4 +33,4 @@ finally:
3333

3434
## `AsyncClient API`
3535

36-
::: meilisearch_python_async._client.AsyncClient
36+
::: meilisearch_python_sdk._client.AsyncClient

docs/async_index_api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ it will create an `AsyncIndex` instance.
66

77
## `AsyncIndex API`
88

9-
::: meilisearch_python_async._index.AsyncIndex
9+
::: meilisearch_python_sdk._index.AsyncIndex

docs/client_api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
To create a client:
66

77
```py
8-
from milisearch-python-async import Client
8+
from milisearch_python_sdk import Client
99

1010

1111
client = Client("http://localhost:7700", "masterKey")
@@ -15,4 +15,4 @@ index = client.index("movies")
1515

1616
## `Client API`
1717

18-
::: meilisearch_python_async._client.Client
18+
::: meilisearch_python_sdk._client.Client

docs/index_api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ a new index with the `Client` it will create an `Index` instance.
55

66
## `Index`
77

8-
::: meilisearch_python_async._index.Index
8+
::: meilisearch_python_sdk._index.Index

docs/pydantic.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ either work with the data in the dictionary that is returned, or because you wil
1111
you can generate your own Pydantic models.
1212

1313
As an example, if you want to get a movie from the
14-
[small movies example](https://github.com/sanders41/meilisearch-python-async/blob/main/datasets/small_movies.json)
14+
[small movies example](https://github.com/sanders41/meilisearch-python-sdk/blob/main/datasets/small_movies.json)
1515
you could put the results into an object with the following:
1616

1717
```py
1818
from datetime import datetime
1919
from typing import Optional
2020

2121
from camel_converter.pydantic_base import CamelBase
22-
from meilisearch_python_async import Client
22+
from meilisearch_python_sdk import Client
2323

2424

2525
# Inheriting from CamelBase will allow your class to automatically convert
@@ -53,7 +53,7 @@ Movie(
5353
)
5454
```
5555

56-
By inheriting from CamelBase, or any of the other [provided models](https://github.com/sanders41/meilisearch-python-async/tree/main/meilisearch_python_async/models)
56+
By inheriting from CamelBase, or any of the other [provided models](https://github.com/sanders41/meilisearch-python-sdk/tree/main/meilisearch_python_sdk/models)
5757
you will be inheriting Pydantic models and therefore have access to the funcitonality Pydantic provides
5858
such as [validators](https://pydantic-docs.helpmanual.io/usage/validators/) and [Fields](https://pydantic-docs.helpmanual.io/usage/model_config/#alias-precedence).
5959
Pydantic will also automatically deserialized the data into the correct data type based on the type

0 commit comments

Comments
 (0)