You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ This package contains common Python utility classes and functions.
14
14
* Making requests to the Oauth2 authenticated APIs such as NYPL Platform API and Sierra
15
15
16
16
## Functions
17
-
* Reading a YAML config file and putting the contents in os.environ
17
+
* Reading a YAML config file and putting the contents in os.environ -- see `config/sample.yaml` for an example of how the config file should be formatted
In order to use the local version of the package instead of the global version, use a virtual environment. To set up a virtual environment and install all the necessary dependencies, run:
43
43
44
44
```
45
-
python3 -m venv testenv
46
-
source testenv/bin/activate
45
+
python3 -m venv .venv
46
+
source .venv/bin/activate
47
47
pip install --upgrade pip
48
48
pip install .
49
49
pip install '.[development]'
50
-
deactivate && source testenv/bin/activate
50
+
deactivate && source .venv/bin/activate
51
51
```
52
52
53
53
## Managing dependencies
@@ -57,11 +57,11 @@ When a new client or helper file is created, a new optional dependency set shoul
57
57
58
58
The optional dependency sets also give the developer the option to manually list out the dependencies of the clients rather than relying upon what the package thinks is required, which can be beneficial in certain circumstances. For instance, AWS lambda functions come with `boto3` and `botocore` pre-installed, so it's not necessary to include these (rather hefty) dependencies in the lambda deployment package.
59
59
60
-
###Troubleshooting
61
-
####Using PostgreSQLClient in an AWS Lambda
60
+
## Troubleshooting
61
+
### Using PostgreSQLClient in an AWS Lambda
62
62
Because `psycopg` requires a statically linked version of the `libpq` library, the `PostgreSQLClient` cannot be installed as-is in an AWS Lambda function. Instead, it must be packaged as follows:
0 commit comments