RaphaëlPy
A library for creating SVG drawings using Python.
Overview
Its usage and most of the public API (and obviously its name, too) is strongly inspired by Raphaël JavaScript Library. Some examples and some of the implementation details are borrowed from the original project, too.
See examples to examine how to it works and how to use it.
Compatibility
The package works with both Python 2 and 3 (tested on Ubuntu 18.04 LTS and Python 2.7.15 and Python 3.6.6).
Usage
as simple as:
from raphaelpy import Raphael
# Creates canvas 320 x 200 at 10, 50
paper = Raphael("drawing.svg", 320, 200)
# Creates circle at x = 50, y = 40, with radius 10
circle = paper.circle(50, 40, 10)
# Sets the fill attribute of the circle to red (#f00)
circle.attr("fill", "#f00")
# Sets the stroke attribute of the circle to blue
circle.attr("stroke", "#00f")
# Saves the resulting drawing to the file
paper.save()
See examples directory for more examples.
Installation
-
Using
setup.pyfile:python setup.py install [options], e.g.python setup.py --user -
Using
make(callssetup.pyinternally):make install [options], e.g.make install USER=TRUE PYTHON=python3 -
Using
pip[sudo] pip[3] install [options] raphaelpy, e.g.pip install --user raphaelpyorsudo pip3 install raphaelpyNote: use
pipof Python 2 andpip3for Python 3
What is here
| directory | content |
|---|---|
| raphaelpy | source code |
| examples | examples how RaphaëlPy works and how to use it |
| Makefile | makefile for the project (with targets help, install, doc, test, clean, dist) |
| docs | source codes to build HTML documentation |
| tests | a few unit tests |
| setup.py | python setup file for installation |
Contribution
Pull Requests
Are welcome.
Bug reporting
In case of any question or problem, please leave an issue at the githup page of the project.
Contributors
License
This project is licensed under the LGPL License - see the license file for details.
Acknowledgements
- to Raphaël JavaScript Library for great job and inspiration.
Metadata
Release files for raphaelpy 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| raphaelpy-0.2.0.tar.gz | 13.9 kB | Without provenance | Details for raphaelpy-0.2.0.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| raphaelpy-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for raphaelpy-0.2.0-py3-none-any.whl |
| raphaelpy-0.2.0-py2-none-any.whl | Python 2 | none | any | Details for raphaelpy-0.2.0-py2-none-any.whl |
Total release size: 50.5 kB
Release files / raphaelpy-0.2.0.tar.gz
| Download URL | raphaelpy-0.2.0.tar.gz |
|---|---|
| Size | 13.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f785d45ef6228dbb43c07f6af562a0bb3baa17252fa5d4effeb5cf6b335488e9
|
|
BLAKE2b-256 checksum How to use checksums |
685272d021b9252dcc545bc06b9addf98f01e0d25e95b081d425c6e0503e4082
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7
|
Release files / raphaelpy-0.2.0-py3-none-any.whl
| Download URL | raphaelpy-0.2.0-py3-none-any.whl |
|---|---|
| Size | 18.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6b74b7188f30bd272f4f8509e4f8663bbd17b503a60e41be8912713b66a37857
|
|
BLAKE2b-256 checksum How to use checksums |
2d5975839c0d01095da21ab6cbbaed396518524e14adce1541a016e598893c77
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7
|
Release files / raphaelpy-0.2.0-py2-none-any.whl
| Download URL | raphaelpy-0.2.0-py2-none-any.whl |
|---|---|
| Size | 18.3 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
7ddd99c72809babc487b79fd78e919ee94a368cace3110aa9678f567ce8485eb
|
|
BLAKE2b-256 checksum How to use checksums |
a057006119429cd91a926f3dcbeb39e7ea4ba06142b6487186bf27b324cc1e69
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7
|
Security for raphaelpy 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.