Skip to content

Commit 7759f52

Browse files
authored
Merge pull request #36 from DrGFreeman/35-boto-optional-req
Set boto3 as optional requirement
2 parents 99e09c7 + 130fdb0 commit 7759f52

File tree

5 files changed

+25
-7
lines changed

5 files changed

+25
-7
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,23 @@ The project's documentation is available at https://dynamo-pandas.readthedocs.io
1818

1919
## Requirements
2020
* `python>=3.7`
21-
* `boto3`
2221
* `pandas>=1`
22+
* `boto3`
2323

2424
## Installation
2525

2626
```
2727
python -m pip install dynamo-pandas
2828
```
29+
30+
This will install the package and its dependencies except for `boto3` which is not installed by default to avoid unnecessary installation when building Lambda layers.
31+
32+
To include `boto3` as part of the installation, add the `boto3` "extra" this way:
33+
34+
```
35+
python -m pip install dynamo-pandas[boto3]
36+
```
37+
2938
## Example Usage
3039

3140
Consider the pandas DataFrame below.

docs/installation.rst

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,20 @@ Install ``dynamo-pandas`` from `PyPI <https://pypi.org/project/dynamo-pandas/>`_
1313
$ pip install dynamo-pandas
1414
1515
16+
This will install the package and its dependencies except for `boto3` which is not installed by default to avoid unnecessary installation when building Lambda layers.
17+
18+
To include `boto3` as part of the installation, add the `boto3` "extra" this way:
19+
20+
.. code-block:: console
21+
22+
$ python -m pip install dynamo-pandas[boto3]
23+
24+
1625
Requirements
1726
------------
1827

1928
``dynamo-pandas`` has the following requirements:
2029

2130
* ``python`` >= 3.7
22-
* ``boto3``
23-
* ``pandas`` >= 1
31+
* ``pandas`` >= 1
32+
* ``boto3``

requirements-dev.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
black==19.10b0
2-
boto3
32
coverage
43
flake8==3.8.4
54
interrogate
65
isort==5.7.0
76
moto
8-
pandas
97
pre-commit
108
pytest
119
pytest-cov

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@ def find_meta(meta):
3838
long_description_content_type="text/markdown",
3939
packages=find_packages(),
4040
python_requires=">=3.7",
41-
install_requires=["boto3", "pandas>=1"],
41+
install_requires=["pandas>=1"],
42+
extras_require={"boto3": ["boto3"]},
4243
classifiers=[
43-
"Development Status :: 3 - Alpha",
44+
"Development Status :: 5 - Production/Stable",
4445
"License :: OSI Approved :: MIT License",
4546
"Programming Language :: Python :: 3",
4647
"Programming Language :: Python :: 3.7",

tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ setenv =
1010
AWS_DEFAULT_REGION=us-east-1
1111
download = true
1212
deps =
13+
.[boto3]
1314
-rrequirements-dev.txt
1415
pandas10: pandas>=1,<1.1
1516
commands = pytest -v --cov={envsitepackagesdir}/dynamo_pandas {posargs}

0 commit comments

Comments
 (0)