Skip to content

Commit

Permalink
SM-1098: Update Python Wrapper README Instructions (#592)
Browse files Browse the repository at this point in the history
## Type of change

<!-- (mark with an `X`) -->

```
- [ ] Bug fix
- [ ] New feature development
- [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [x] Other
```

## Objective

<!--Describe what the purpose of this PR is. For example: what bug
you're fixing or what new feature you're adding-->

Update the Python Wrapper README, now that we are using
[maturin](https://pypi.org/project/maturin).
  • Loading branch information
coltonhurst authored Feb 13, 2024
1 parent f509a4e commit 16f4cc5
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions languages/python/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.egg-info
bitwarden_py*.so
__pycache__
.venv
23 changes: 23 additions & 0 deletions languages/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,26 @@ Set the `ORGANIZATION_ID` and `ACCESS_TOKEN` environment variables to your organ
```bash
python3 ./example.py
```

# Using Virtual Environments

If you would like to build & run the script within a virtual environment you can do the following.

## Build

```bash
npm run schemas # generate schemas.py

cd languages/python/
python3 -m venv .venv
maturin develop
```

## Run

```bash
source .venv/bin/activate
python3 ./example.py

deactivate # run this to close the virtual session
```

0 comments on commit 16f4cc5

Please sign in to comment.