Metadata-Version: 2.4
Name: pipsy-py
Version: 0.1.0
Summary: Big, friendly SVG illustrations for Python, Flask and Django — zero runtime dependencies.
Author-email: alphaa-pixel <309249434+alphaa-pixel@users.noreply.github.com>
License-Expression: MIT OR Apache-2.0
Project-URL: Homepage, https://github.com/Nour-yahyaoui/pipsy
Project-URL: Repository, https://github.com/Nour-yahyaoui/pipsy
Project-URL: Issues, https://github.com/Nour-yahyaoui/pipsy/issues
Project-URL: Changelog, https://github.com/Nour-yahyaoui/pipsy/blob/main/CHANGELOG.md
Keywords: illustrations,svg,ui,web,flask,django,jinja2,empty-states
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Framework :: Django :: 4.2
Classifier: Framework :: Django :: 5.0
Classifier: Framework :: Django :: 5.1
Classifier: Framework :: Flask
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Multimedia :: Graphics
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE-MIT
License-File: LICENSE-APACHE
Provides-Extra: flask
Requires-Dist: flask>=2.2; extra == "flask"
Provides-Extra: django
Requires-Dist: django>=4.2; extra == "django"
Dynamic: license-file

# pipsy-py (PyPI)

**Big, friendly SVG illustrations for Python, Flask and Django. Zero runtime dependencies.**

> Generated by `scripts/generate.py` from the canonical SVG sources — do not edit
> by hand. Full documentation lives in the repository README.

## Install

```sh
pip install pipsy-py             # zero-dependency core + Jinja2-ready SafeSvg
pip install "pipsy-py[flask]"    # with Flask
pip install "pipsy-py[django]"   # with Django
```

The PyPI distribution is **`pipsy-py`** and installs the **`pipsy`** Python module.

## Python

```python
import pipsy
from pipsy import art, get, render

rocket = art.rocket()                             # typed accessor -> Illustration
scene = get("empty-inbox")                        # kebab-case lookup (aliases resolve)
markup = render("rocket", size=320, label="Ship") # HTML-safe <svg> (SafeSvg)
raw_svg = str(rocket)                             # raw 512x512 SVG markup
```

## Flask

```python
from flask import Flask, render_template_string
from pipsy.flask import Pipsy

app = Flask(__name__)
Pipsy(app)

@app.get("/")
def home():
    return render_template_string(
        """
        {{ pipsy_css() }}
        {{ pipsy("empty-inbox", size=320, label="Nothing here", class_="hero") }}
        <img src="{{ url_for('pipsy.static', filename='illustrations/pip.svg') }}" alt="" width="240" height="240">
        """
    )
```

## Django

Add `"pipsy.django"` to `INSTALLED_APPS`:

```python
INSTALLED_APPS = [
    # ...
    "django.contrib.staticfiles",
    "pipsy.django",
]
```

Use the template tags or static files in any Django template:

```django
{% load pipsy static %}
{% pipsy_css %}

{% pipsy "empty-inbox" size=320 label="Nothing here" class="mx-auto" %}
<img src="{% static 'pipsy/illustrations/pip.svg' %}" alt="" width="240" height="240">
```

## Accessibility & Security

Illustrations render as decorative (`aria-hidden="true"`) by default. Pass `label="..."`
to set `role="img"` and `aria-label`. All user-supplied attribute values are HTML-escaped
before returning `SafeSvg` / `Markup` / `SafeString`.

## The collection

0.1.0 ships 42 illustrations: `cat-nap`, `cloud-rain`, `empty-inbox`, `love-letter`, `not-found`, `party-popper`, `pip`, `potted-plant`, `rocket`, `server-down`, `sunrise`, `trophy`, `correct-answer`, `exam-success`, `math-complex-plane`, `math-continuity-jump`, `math-derivative-tangent`, `math-equation-balance`, `math-function-graph`, `math-geometry-tools`, `math-infinity-loop`, `math-integral-area`, `math-limit-approach`, `math-limit-infinity`, `math-number-line`, `math-probability-dice`, `math-pythagoras`, `math-sequence-convergence`, `math-sets-venn`, `math-sigma-sum`, `math-sine-wave`, `math-statistics-chart`, `math-unit-circle`, `math-vectors`, `pipsy-calculating`, `pipsy-confused`, `pipsy-eureka`, `pipsy-teaching`, `pipsy-thinking`, `student-calculating`, `student-thinking`, `timer-challenge`.

License: MIT or Apache-2.0, at your option.
