README.md (1604B)
1 # python-adblock 2 3 Python wrapper for Brave's adblocking library, which is written in Rust. 4 5 ### Building from source 6 7 #### Build dependencies 8 9 | Build Dependency | Versions | Arch Linux | Url | 10 | ---------------- | -------- | ---------- | ------------------------------- | 11 | Python | `>=3.7` | `python` | - | 12 | Rust | `>=1.53` | `rust` | - | 13 | Maturin | `>=0.10` | `maturin` | https://github.com/PyO3/maturin | 14 15 #### PEP 517 16 17 The `python-adblock` library is [PEP 517](https://www.python.org/dev/peps/pep-0517/) compatible, so you can build and install it from source, simply by running 18 19 ``` 20 pip install . 21 ``` 22 23 from the root of this directory. 24 25 #### Wheels 26 27 To create a wheel for this library, run the following command 28 29 ``` 30 maturin build --release --no-sdist --out dist/ 31 ``` 32 33 the result can be found in the `dist/` directory. 34 35 ### Developing 36 37 I use Poetry for development. To create and enter a virtual environment, do 38 39 ``` 40 poetry install 41 poetry shell 42 ``` 43 44 then, to install the `adblock` module into the virtual environment, do 45 46 ``` 47 maturin develop 48 ``` 49 50 ### Documentation 51 52 Rust documentation for the latest `master` branch can be found at https://arnidagur.github.io/python-adblock/docs/adblock/index.html. 53 54 ### License 55 56 This project is licensed under either of 57 58 - Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or 59 http://www.apache.org/licenses/LICENSE-2.0) 60 - MIT license ([LICENSE-MIT](LICENSE-MIT) or 61 http://opensource.org/licenses/MIT) 62 63 at your option.