Files
breez-sdk-docs/snippets/python
Ruben aa7c50425a snippets for sweeping funds on channel closes. (#110)
* Bump breez-sdk snippet dependency to 0.2.12

* Bump the Swift snippet macos version to v13

* Bump breez-sdk snippet dependency to 0.2.14

* swiftformat

* redeem_onchain_funds example

* Document swapinfo fields

* example on how to use local breez-sdk package

* fix dart example

* yarn lint

* remove swapinfo docs

* dart fixup

---------

Co-authored-by: ok300 <106775972+ok300@users.noreply.github.com>
2024-01-31 13:49:20 +01:00
..

Steps to run locally

  1. Build a python package
  • By running the publish-all-platforms CI in the breez-sdk repository (use dummy binaries)
  • or by downloading from Pypi
  1. Download the wheel artifact for your platform. For linux that is python-wheel-3.8-manylinux_2_31_x86_64
  2. Unzip the artifact in the snippets/python/packages folder.
  3. Run pip install packages/{NAME_OF_.WHL_FILE}
  4. happy coding!

To check the syntax:

cd snippets/python
python3 -m compileall src

To check the snippet against formatting and linter rules:

cd snippets/python/src
ruff check --ignore F841 --ignore F401 --add-noqa .

and fix all occurrences of the # noqa directive.

To execute the snippets locally, in order to check for type correctness:

#!/bin/bash

export API_KEY="..."
export MNEMONIC="..."

cd snippets/python
python main.py $API_KEY $MNEMONIC