Skip to main content

CAP OASIS Event Terms (OET) + SVG Icons

OASIS Event Terms (OET v1.2) for the Common Alerting Protocol, packaged with an SVG icon for every one of the 224 event codes.

⚠️ Not an official icon set

This is not an official or standardised set of icons for the OASIS Event Terms. No standards body — OASIS, OCHA, WMO or anyone else — has endorsed these mappings.

It is an internal effort to standardise the icons used across the warning tools built at github.com/wmo-raf — including cap-composer, cap-aggregator and ClimWeb — so that the same event type looks the same wherever it is displayed or communicated.

The choice of icon for each event code is a judgement call, not a specification. The icons themselves are vendored from the OCHA Humanitarian Icons and Font Awesome Free (see LICENSE); neither project endorses this mapping.

The event terms themselves are standard — they come from the OASIS CAP Event Terms List v1.2.

Browse the icons

→ Browse all 224 icons here

What's inside

src/cap_oet/                 # the installable package
├── data/oet_v1_2.py         # the 224 OASIS event terms + lookup exports
├── mapping.py               # OET code -> source icon (OCHA name or "fa:<name>")
├── icons.py                 # get_icon_name / get_icon_svg / get_wagtail_icons
├── templatetags/cap_oet.py  # {% oet_icon "OET-079" %}
└── templates/cap_oet/icons/ # OET-000.svg ... OET-223.svg (fill=currentColor)

tools/build_site.py          # dev tool: builds docs/ — not shipped in the package
docs/                        # generated GitHub Pages site — not shipped either

Install

pip install cap-oet

Add to Django INSTALLED_APPS so the templates load:

INSTALLED_APPS = [..., "cap_oet"]

Use

Data:

from cap_oet import OASIS_EVENT_TERMS_BY_CODE, OASIS_EVENT_TERMS_AS_CHOICES

OASIS_EVENT_TERMS_BY_CODE["OET-079"]
# {'code': 'OET-079', 'term': 'flash flood', 'categories': ['Met']}

Icons in a template (colour via CSS because icons use currentColor):

{% load cap_oet %}
<span style="color:#d00">{% oet_icon "OET-079" class="oet-icon" width="24" height="24" %}</span>

Icons in Python:

from cap_oet import get_icon_svg, get_icon_name

get_icon_name("OET-079")  # "cap_oet/icons/OET-079.svg"

Wagtail icons

Every SVG carries id="icon-oet-<nnn>", Wagtail's icon convention, so the icons can go into the admin icon sprite.

get_wagtail_icons() returns the template paths for Wagtail's register_icons hook. Register them from your own wagtail_hooks.py:

from wagtail import hooks
from cap_oet import get_wagtail_icons


@hooks.register("register_icons")
def register_icons(icons):
    return icons + get_wagtail_icons()  # all 224
    # return icons + get_wagtail_icons(["OET-159", "OET-079"])  # or just what you need

Then render with Wagtail's own tag:

{% load wagtailadmin_tags cap_oet %}
{% icon name="oet-159" %}
{% icon name=alert.event_code|oet_icon_name %}   {# OET-159 -> oet-159 #}

Registering all 224 adds them to the admin sprite on every page (~170 KB). Pass a subset if you only need a few. get_wagtail_icons() lives in icons.py and imports fine without Wagtail installed.

{% oet_icon %} inlines the SVG and strips the id, so rendering the same icon twice on a page can't produce duplicate DOM ids.

Coverage

All 224 codes have an icon — there are no placeholders and no original artwork. Each is vendored from an existing open set and recoloured to currentColor:

Source Count Listed in
OCHA Humanitarian Icons 132 mapping.py::OCHA_SOURCED
Font Awesome Free (solid) 92 mapping.py::FA_SOURCED

Font Awesome fills the concepts OCHA doesn't cover (radiation, bomb, smog, icicles, plane-circle-xmark, …) and is normalized into the same 48×48 viewBox. Because the two sets are drawn in different styles, the family isn't perfectly uniform — STYLE_GUIDE.md records the OCHA rules as the target if any icon is redrawn later.

Icon explorer

→ Browse all 224 icons · Usage examples

Filter by category, grouping and source; search; resize; recolour; click any icon to copy its SVG. Every icon also has a stable URL, e.g. icons/OET-079.svg, and manifest.json is a machine-readable index of the whole set.

To rebuild it — the builder reads the icon SVGs, mapping.py and the OET data directly (no Django, no settings), so the output can't drift from the icon set:

python tools/build_site.py --out docs
docs/
├── index.html          explorer: filter by category, grouping and source; search;
│                       size slider; colour + dark-mode toggle; click to copy an SVG;
│                       shareable deep links (?cat=Met&grouping=fire)
├── manifest.json       224 × {code, term, grouping, categories, source, shared}
├── icons.svg           sprite of <symbol id="OET-079">, referenced via <use>
└── icons/OET-079.svg   every icon as its own file — stable public URL

Metadata

Release files for cap-oet 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cap-oet 0.1.0
File Size Uploaded Provenance Actions
cap_oet-0.1.0.tar.gz 73.6 kB With provenance Details for cap_oet-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cap-oet 0.1.0
File Interpreter ABI Platform Actions
cap_oet-0.1.0-py3-none-any.whl Python 3 none any Details for cap_oet-0.1.0-py3-none-any.whl

Total release size: 225.5 kB

Release files / cap_oet-0.1.0.tar.gz

Download URL cap_oet-0.1.0.tar.gz
Size 73.6 kB
Tags Source
SHA-256 checksum
How to use checksums
81bb58ed32730ad9b71ed7115bea1da3064e3007e77932957c4e2fa464fff630
BLAKE2b-256 checksum
How to use checksums
1e1ac1acda1d8bde796a081d8c092b4586e9eb3c2285362251689feeb013af44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 13, 2026.

Transparency log

Release files / cap_oet-0.1.0-py3-none-any.whl

Download URL cap_oet-0.1.0-py3-none-any.whl
Size 151.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ff5b5caf7accc241c16da7dd487dd655a37261ed01b556994249fbb41ce5cc79
BLAKE2b-256 checksum
How to use checksums
d80f027e12ccf0f466ffb3ea85b9e073da71cf9bd9ec4db43444533c079b05a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 13, 2026.

Transparency log

Security for cap-oet 0.1.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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for cap_oet-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 13, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page