Files
breez-sdk-docs/snippets/python/README.md
Ruben 464a29816d don't write ruff output to file (#121)
* don't write ruff output to file

* Update ruff instructions in python README

---------

Co-authored-by: ok300 <106775972+ok300@users.noreply.github.com>
2024-01-12 15:51:07 +01:00

36 lines
890 B
Markdown

## 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
2. Download the wheel artifact for your platform. For linux that is `python-wheel-3.8-manylinux_2_31_x86_64`
3. Unzip the artifact in the `snippets/python/packages` folder.
4. Run `pip install packages/{NAME_OF_.WHL_FILE}`
5. happy coding!
To check the syntax:
```bash
cd snippets/python
python3 -m compileall src
```
To check the snippet against formatting and linter rules:
```bash
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:
```bash
#!/bin/bash
export API_KEY="..."
export MNEMONIC="..."
cd snippets/python
python main.py $API_KEY $MNEMONIC
```