Skip to content

Commit

Permalink
update with new build instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
tangowithfoxtrot committed Nov 27, 2023
1 parent ffc8cf2 commit 2b5c6ce
Showing 1 changed file with 23 additions and 22 deletions.
45 changes: 23 additions & 22 deletions languages/python/README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@
# Requirements

- Python3
- setuptools
```bash
pip install setuptools
```
- setuptools_rust
```bash
pip install setuptools_rust
```
- dateutil
```bash
pip install python-dateutil
```

# Installation

From the `languages/python/` directory,
# Build locally
## Requirements

- Python 3
- `maturin` (install with `pip install maturin[patchelf]`)
- `npm`

## Build

From the root of the repository:
```bash
python3 ./setup.py develop
npm run schemas # generate schemas.py

cd languages/python/
maturin develop
```

Rename the the resulting `.so` file to `bitwarden_py.so`, if it isn't already there.
You can now import `BitwardenClient` and `bitwarden_py` in your Python code.

# Use without building locally

```bash
pip install BitwardenClient
```

# Run

Set the `BWS_ORG_ID` and `BWS_ACCESS_TOKEN` environment variables to your organization ID and access token, respectively.

```bash
python3 ./login.py
python3 ./example.py
```

0 comments on commit 2b5c6ce

Please sign in to comment.