onigurumacffi
python cffi bindings for the oniguruma regex engine
Decision gist · record as of 2026-08-14
Yes, if you specifically need Oniguruma's regex features or dialect. The package is actively maintained, has no known vulnerabilities, and is permissively licensed. Install friction is moderate due to compiled bindings but wheels are available for common platforms. If you're looking for a general-purpose regex library, Python's built-in re module is simpler; install this only if Oniguruma's specific capabilities are required.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Source builds require libonig-dev to be installed before pip install; prebuilt wheels are available for most platforms.
- Medium install friction due to compiled CFFI bindings; wheels are available for common platforms (macOS arm64/x86_64, Linux x86_64, Windows 32/64-bit, PyPy) but source builds require libonig-dev.
- Package is actively maintained with recent commits and no known vulnerabilities.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you can use this package freely in commercial and private projects with minimal restrictions.
last release 2026-01-25 (201 days) · last repo commit 2026-08-11 · 22 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 472,834 downloads/mo, #6,473 on PyPI
Alternatives
Verify before relying
pip install onigurumacffi
import onigurumacffi
pattern = onigurumacffi.compile(r'\w+')
match = pattern.search('test string')
if match:
print(match.group(0))- Whether the API's current limited scope covers your specific regex use case.
- Performance characteristics compared to Python's built-in re module or other regex engines.
- Compatibility with specific Oniguruma regex features you plan to rely on.
What it is and what it does
onigurumacffi is a thin CFFI wrapper around the Oniguruma regex engine, exposing its pattern matching and searching capabilities to Python. It lets you compile regex patterns and RegSets, then match or search strings with optional position offsets and search flags. The package provides match objects with group extraction, position tracking, and span information.
The API is intentionally minimal—it covers core pattern compilation, matching, searching, and capture group access. It's useful when you need Oniguruma's regex dialect or features that Python's built-in re module doesn't offer, but it's not a drop-in replacement for the standard library. The package requires Python 3.10+ and depends only on cffi; wheels are available for most platforms, though source builds need libonig-dev.
Use it for
- Use it when you need Oniguruma's specific regex syntax or features not available in Python's built-in re module.
- Use it to compile and reuse complex regex patterns for high-throughput string matching in text processing pipelines.
- Use it to search multiple patterns simultaneously via RegSet for efficient multi-pattern matching.
- Use it in syntax highlighters or code analysis tools that rely on Oniguruma's regex dialect.
- Use it when integrating with systems or libraries that already use Oniguruma and need consistent regex behavior.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you specifically need Oniguruma's regex features or dialect.
The package is actively maintained, has no known vulnerabilities, and is permissively licensed. Install friction is moderate due to compiled bindings but wheels are available for common platforms. If you're looking for a general-purpose regex library, Python's built-in re module is simpler; install this only if Oniguruma's specific capabilities are required.
Install
onigurumacffi on PyPI
Before you install
Medium install friction due to compiled CFFI bindings; wheels are available for common platforms (macOS arm64/x86_64, Linux x86_64, Windows 32/64-bit, PyPy) but source builds require libonig-dev. Package is actively maintained with recent commits and no known vulnerabilities.
Source builds require libonig-dev to be installed before pip install; prebuilt wheels are available for most platforms.
License in practice
MIT license is permissive; you can use this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install onigurumacffi
import onigurumacffi
pattern = onigurumacffi.compile(r'\w+')
match = pattern.search('test string')
if match:
print(match.group(0))
Verify before relying
- Whether the API's current limited scope covers your specific regex use case.
- Performance characteristics compared to Python's built-in re module or other regex engines.
- Compatibility with specific Oniguruma regex features you plan to rely on.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 1 packagecffi |
| Maintenance | Actively maintained 201 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 472,834 / month, #6,473 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Programming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy |
Evidence: onigurumacffi-1.5.0-cp310-abi3-macosx_15_0_arm64.whl; onigurumacffi-1.5.0-cp310-abi3-macosx_15_0_x86_64.whl; onigurumacffi-1.5.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; onigurumacffi-1.5.0-cp310-abi3-win32.whl; onigurumacffi-1.5.0-cp310-abi3-win_amd64.whl; onigurumacffi-1.5.0-pp311-pypy311_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “oniguruma regex python”
- onigurumacffiProvides Python bindings to the Oniguruma regex engine via CFFI,…
- backrefsBackrefs extends Python's re and regex libraries with additional…
- regressProvides Python bindings to the Rust regress crate for ECMA-compliant…
Give your agent the search over MCP, or paste the wish link into any chat.
More Text Processing packages
A drop-in replacement for Python's standard `re` module that adds advanced regex features like nested sets, fuzzy matching, lookaround in conditionals, and full Unicode case-folding while maintaining backward compatibility.
pyparsing provides a library for building text parsers directly in Python code using composable grammar classes, handling quoted strings, whitespace variation, and embedded comments without regex or lex/yacc.
Install it if you need to parse text or define grammars programmatically.
fonttools manipulates font files in multiple formats (TrueType, OpenType, AFM, Type 1, Mac-specific) and includes TTX, a tool to convert fonts to and from XML text format.
Install it if you need to read, write, or manipulate fonts programmatically or via the TTX command-line tool.
Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.
RapidFuzz provides fast fuzzy string matching using Levenshtein Distance and related metrics, implemented mostly in C++ with Python bindings for rapid similarity scoring and approximate string matching.
Install it if you need fuzzy string matching; it's a solid replacement for FuzzyWuzzy with better licensing and performance.
tinycss2 parses CSS strings into token and block objects, and generates CSS strings from those objects, following the CSS Syntax Level 3 specification without enforcing specific properties or values.
Install it if your project requires CSS tokenization or syntax manipulation.
See also real-regex · interegular · google-re2 · rebulk · brotlicffi · multiregex · fuzzysearch · flpc · hyperscan