2021-12-06 13:04:15 -05:00
|
|
|
# bdk-python
|
|
|
|
The Python language bindings for the [bitcoindevkit](https://github.com/bitcoindevkit).
|
|
|
|
|
2022-02-16 21:29:43 -05:00
|
|
|
See the [package on PyPI](https://pypi.org/project/bdkpython/).
|
2021-12-13 19:43:39 -05:00
|
|
|
<br/>
|
|
|
|
|
|
|
|
## Install from PyPI
|
2021-12-07 10:12:30 -05:00
|
|
|
Install the latest release using
|
|
|
|
```shell
|
|
|
|
pip install bdkpython
|
|
|
|
```
|
2021-12-07 10:25:42 -05:00
|
|
|
<br/>
|
2021-12-07 10:12:30 -05:00
|
|
|
|
|
|
|
## Run the tests
|
|
|
|
```shell
|
2022-05-11 15:19:33 -04:00
|
|
|
pip3 install --requirement requirements.txt
|
|
|
|
bash ./generate.sh
|
|
|
|
python3 setup.py --verbose bdist_wheel
|
|
|
|
pip3 install ./dist/bdkpython-<yourversion>-py3-none-any.whl
|
2022-06-23 15:21:48 -04:00
|
|
|
python -m unittest --verbose tests/test_bdk.py
|
2021-12-07 10:12:30 -05:00
|
|
|
```
|
2021-12-07 10:25:42 -05:00
|
|
|
<br/>
|
2021-12-07 10:12:30 -05:00
|
|
|
|
|
|
|
## Build the package
|
|
|
|
```shell
|
2022-11-03 11:32:32 -04:00
|
|
|
# Install dependencies
|
2022-05-06 15:24:41 -04:00
|
|
|
pip install --requirement requirements.txt
|
2022-02-16 21:29:43 -05:00
|
|
|
|
2022-02-15 16:47:34 +01:00
|
|
|
# Generate the bindings first
|
|
|
|
bash generate.sh
|
2022-02-16 21:29:43 -05:00
|
|
|
|
2022-02-15 16:47:34 +01:00
|
|
|
# Build the wheel
|
2022-05-06 15:24:41 -04:00
|
|
|
python3 setup.py --verbose bdist_wheel
|
2021-12-07 10:12:30 -05:00
|
|
|
```
|
2021-12-07 10:25:42 -05:00
|
|
|
<br/>
|
2021-12-07 10:12:30 -05:00
|
|
|
|
2022-09-22 11:02:05 -04:00
|
|
|
## Run tox to build and test locally
|
2022-07-01 11:04:45 -06:00
|
|
|
```shell
|
|
|
|
# install dev requirements
|
|
|
|
pip install --requirement requirements-dev.txt
|
|
|
|
|
2022-09-22 11:02:05 -04:00
|
|
|
# build bindings glue code (located at ./src/bdkpython/bdk.py)
|
|
|
|
source ./generate.sh
|
|
|
|
|
2022-07-01 11:04:45 -06:00
|
|
|
# build and test
|
2022-09-22 11:02:05 -04:00
|
|
|
tox -vv
|
2022-07-01 11:04:45 -06:00
|
|
|
```
|
2022-09-22 11:02:05 -04:00
|
|
|
<br/>
|
2022-07-01 11:04:45 -06:00
|
|
|
|
2021-12-07 10:12:30 -05:00
|
|
|
## Install locally
|
|
|
|
```shell
|
2022-05-11 15:19:33 -04:00
|
|
|
pip install ./dist/bdkpython-<yourversion>-py3-none-any.whl
|
2021-12-07 10:12:30 -05:00
|
|
|
```
|