Skip to content

Installation

Chris Griffith edited this page Apr 21, 2020 · 2 revisions

Installation

Box 5.x with all converters:

pip install --upgrade python-box[ruamel.yaml,toml,msgpack]

You can use either PyYAML or ruamel.yaml, if both are installed it will use ruamel.yaml.

Just Box with no dependencies:

pip install --upgrade python-box

requirements.txt

If you're putting it in your requirements.txt file, make sure to Major Version bind it until your read through the next major version changes!

python-box[all]>=5.0,<6.0

pyproject.toml

There isn't a standard across all pyproject.toml files for how to specify extra requires, but these are examples for the two common tools of poetry and flit.

poetry

[tool.poetry.dependencies]
python-box = {version = "^5.0.0", extras = ["all"]}

Flit

[tool.flit.metadata]
requires=["python-box[all]>=5.0,<6.0"]