Skip to content

Commit

Permalink
Update the extras information in getting-started.md
Browse files Browse the repository at this point in the history
- Remove `numpy` from the list of additional packages needed for data formats.
- Add `orjson` and `sqlalchemy` to the list of extras available with the `all` option.
  • Loading branch information
K-dash committed Jun 17, 2024
1 parent f9537c3 commit 8a6fae7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 4 additions & 2 deletions docs/en/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ If you're using poetry, run this command.
poetry add pyserde
```

Additional data formats besides JSON and Pickle need additional dependencies installed. Install `msgpack`, `toml`, `yaml` or `numpy` extras to work with the appropriate data formats; you can skip formats that you don't plan to use. For example, if you want to use Toml and YAML:
Additional data formats besides JSON and Pickle need additional dependencies installed. Install `msgpack`, `toml` or `yaml` extras to work with the appropriate data formats; you can skip formats that you don't plan to use. For example, if you want to use Toml and YAML:

```
pip install "pyserde[toml,yaml]"
Expand All @@ -36,12 +36,14 @@ poetry add pyserde -E all
```

Here are the available extras
* `all`: Install `msgpack`, `toml`, `yaml` and `numpy` extras
* `all`: Install `msgpack`, `toml`, `yaml`, `numpy`, `orjson`, and `sqlalchemy` extras
* `msgpack`: Install [msgpack](https://github.com/msgpack/msgpack-python)
* `toml`: Install [tomli](https://github.com/hukkin/tomli) and [tomli-w](https://github.com/hukkin/tomli-w)
* NOTE: [tomllib](https://docs.python.org/3/library/tomllib.html) is used for python 3.11 onwards
* `yaml`: Install [pyyaml](https://github.com/yaml/pyyaml)
* `numpy`: Install [numpy](https://github.com/numpy/numpy)
* `orjson`: Install [orjson](https://github.com/ijl/orjson)
* `sqlalchemy`: Install [sqlalchemy](https://github.com/sqlalchemy/sqlalchemy)

## Define your first pyserde class

Expand Down
7 changes: 5 additions & 2 deletions docs/ja/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ poetry add pyserde
```

JSONとPickle以外のデータ形式を扱う場合は、追加の依存関係をインストールする必要があります。
適切なデータ形式で動作するには、`msgpack``toml``yaml``numpy`の追加パッケージをインストールしてください。
適切なデータ形式で動作するには、`msgpack``toml``yaml` の追加パッケージをインストールしてください。
使用しない場合はスキップして構いません。
例えば、TomlとYAMLを使用する場合は以下のようにします。

Expand All @@ -39,12 +39,15 @@ poetry add pyserde -E all
```

利用可能な追加パッケージ
* `all``msgpack``toml``yaml``numpy`をインストール
* `all``msgpack``toml``yaml``numpy``orjson``sqlalchemy` をインストール
* `msgpack`[msgpack](https://github.com/msgpack/msgpack-python) をインストール
* `toml`[tomli](https://github.com/hukkin/tomli)[tomli-w](https://github.com/hukkin/tomli-w) をインストール
* 注記:python 3.11以降は [tomllib](https://docs.python.org/3/library/tomllib.html) を使用
* `yaml`[pyyaml](https://github.com/yaml/pyyaml) をインストール
* `numpy`[numpy](https://github.com/numpy/numpy) をインストール
* `orjson`[orjson](https://github.com/ijl/orjson) をインストール
* `sqlalchemy`[sqlalchemy](https://github.com/sqlalchemy/sqlalchemy) をインストール


## 最初のpyserdeクラスを定義

Expand Down

0 comments on commit 8a6fae7

Please sign in to comment.