Skip to content

Commit

Permalink
docs: added more build instructions and dev-specific requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
jboarman committed Apr 7, 2023
1 parent 5e8a165 commit a270c99
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 4 deletions.
43 changes: 39 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
# resvg-py

## Usage
`resvg-py` provides a Python interface to the `resvg` library, an open-source SVG rendering library that can be used to convert SVG images to various other formats such as PNG, PDF, and SVGZ.

The purpose of `resvg-py` is to provide a convenient way to use `resvg` from within Python code, without the need for external dependencies. By using `resvg-py`, developers can incorporate SVG rendering functionality directly into their Python applications, making it easier to work with SVG images and to create high-quality, scalable graphics for their projects.

With `resvg-py`, developers can:

* Load SVG files and render them to various output formats
* Control the output size, resolution, and quality of the rendered images
* Modify SVG documents programmatically before rendering
* Work with SVG images directly within their Python code, without the need for external tools or libraries

Overall, `resvg-py` provides a simple and powerful way to work with SVG images in Python, and can be a useful tool for developers who need to work with vector graphics in their projects.


# Usage

```python
from pathlib import Path
Expand All @@ -19,15 +33,36 @@ with Path("resources/examples/svg/octocat.svg").open("r") as f:

```

## Development
# How To Build

## Install Rust, Set up Python Dev Requirements

**Windows**

```sh
choco install rust
```

**Set up Virtual Environemt**

```sh
python -m venv venv
.\venv\Scripts\Activate.bat
```

**Install Maturin and Pytest**

```sh
pip install -r requirements-dev.txt
```

### Build
## Build Python Wheel

```sh
maturin develop
```

### Test
## Run Tests

```sh
pytest
Expand Down
3 changes: 3 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
maturin
pytest
pytest-snapshot

0 comments on commit a270c99

Please sign in to comment.