Skip to main content

python cffi bindings for the oniguruma regex engine

Project description

Build Status Azure DevOps coverage

onigurumacffi

python cffi bindings for the oniguruma regex engine

installation

pip install onigurumacffi
  • wheels should be available on pypi in most cases
  • to build from source, libonig-dev must be installed prior to installation

api

the api is currently very limited (basically just enough to support what I needed).

compile(pattern: str) -> _Pattern

make a compiled pattern

compile_regset(*patterns: str) -> _RegSet

make a compiled RegSet

OnigSearchOption

an enum listing the search-time options for oniguruma

the current set of options are:

class OnigSearchOption(enum.IntEnum):
    NONE = ...
    NOTBOL = ...
    NOTEOL = ...
    POSIX_REGION = ...
    CHECK_VALIDITY_OF_STRING = ...
    NOT_BEGIN_STRING = ...
    NOT_BEGIN_POSITION = ...

_Pattern.match(s: str, start: int = 0, flags: OnigSearchOption = OnigSearchOption.NONE) -> Optional[_Match]

match a string using the pattern. optionally set start to adjust the offset which is searched from

_Pattern.search(s: str, start: int = 0, flags: OnigSearchOption = OnigSearchOption.NONE) -> Optional[_Match]

search a string using the pattern. optionally set start to adjust the offset which is searched from

_Pattern.number_of_captures() -> int

return the number of captures in the regex

_RegSet.search(s: str, start: int = 0, flags: OnigSearchOption = OnigSearchOption.NONE) -> Tuple[int, Optional[_Match]]

search a string using the RegSet. optionally set start to adjust the offset which is searched from

the leftmost regex index and match is returned or (-1, None) if there is no match

_Match.group(n: int = 0) -> str

return the string of the matched group, defaults to 0 (the whole match)

_Match[n: int] -> str

a shorthand alias for _Match.group(...)

_Match.start(n: int = 0) -> int

return the character position of the start of the matched group, defaults to 0 (the whole match)

_Match.end(n: int = 0) -> int

return the character position of the end of the matched group, defaults to 0 (the whole match)

_Match.span(n: int = 0) -> int

return (start, end) character position of the matched group, defaults to 0 (the whole match)

_Match.expand(s: str) -> str

expand numeric groups in s via the groups in the match

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

onigurumacffi-0.0.18.tar.gz (5.8 kB view details)

Uploaded Source

Built Distributions

onigurumacffi-0.0.18-pp37-pypy37_pp73-manylinux2010_x86_64.whl (561.3 kB view details)

Uploaded PyPy manylinux: glibc 2.12+ x86-64

onigurumacffi-0.0.18-pp36-pypy36_pp73-manylinux2010_x86_64.whl (561.3 kB view details)

Uploaded PyPy manylinux: glibc 2.12+ x86-64

onigurumacffi-0.0.18-cp38-cp38-win_amd64.whl (183.6 kB view details)

Uploaded CPython 3.8 Windows x86-64

onigurumacffi-0.0.18-cp38-cp38-win32.whl (167.4 kB view details)

Uploaded CPython 3.8 Windows x86

onigurumacffi-0.0.18-cp37-cp37m-win_amd64.whl (183.6 kB view details)

Uploaded CPython 3.7m Windows x86-64

onigurumacffi-0.0.18-cp37-cp37m-win32.whl (167.4 kB view details)

Uploaded CPython 3.7m Windows x86

onigurumacffi-0.0.18-cp36-cp36m-win_amd64.whl (183.6 kB view details)

Uploaded CPython 3.6m Windows x86-64

onigurumacffi-0.0.18-cp36-cp36m-win32.whl (167.4 kB view details)

Uploaded CPython 3.6m Windows x86

onigurumacffi-0.0.18-cp36-abi3-manylinux1_x86_64.whl (532.8 kB view details)

Uploaded CPython 3.6+

onigurumacffi-0.0.18-cp36-abi3-macosx_10_14_x86_64.whl (223.2 kB view details)

Uploaded CPython 3.6+ macOS 10.14+ x86-64

File details

Details for the file onigurumacffi-0.0.18.tar.gz.

File metadata

  • Download URL: onigurumacffi-0.0.18.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for onigurumacffi-0.0.18.tar.gz
Algorithm Hash digest
SHA256 9a81336733d5fd90cccf35f4aaadb495aa34a888d96000f69a9d041213f52636
MD5 b46459f870c07e999368f55366a890ae
BLAKE2b-256 01f6439264b6c02b8cdb38923c3834e4ba8a28d386c1ca3e48c406f25525ffcc

See more details on using hashes here.

Provenance

File details

Details for the file onigurumacffi-0.0.18-pp37-pypy37_pp73-manylinux2010_x86_64.whl.

File metadata

  • Download URL: onigurumacffi-0.0.18-pp37-pypy37_pp73-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 561.3 kB
  • Tags: PyPy, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2

File hashes

Hashes for onigurumacffi-0.0.18-pp37-pypy37_pp73-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 31374a3889f1d541fb3cca775dbb0d1c1818433fb913baa57899fc35555f29e6
MD5 21ede54fede4d7f5f163114cc886bdcd
BLAKE2b-256 91efacb13324ec143d39d3b17874497ed204ad5bd322efb9f94485692afd17da

See more details on using hashes here.

Provenance

File details

Details for the file onigurumacffi-0.0.18-pp37-pypy37_pp73-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for onigurumacffi-0.0.18-pp37-pypy37_pp73-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 e4a77247717d4ac0e4544df27aeb1aaa94274dd52381376bf197d441ff5251ff
MD5 46912107a1c6d5c5a676e98b50279732
BLAKE2b-256 896a4621a28398506828173c7deffe89f4cb7ad5dc51b445e14212922f913d95

See more details on using hashes here.

Provenance

File details

Details for the file onigurumacffi-0.0.18-pp36-pypy36_pp73-manylinux2010_x86_64.whl.

File metadata

  • Download URL: onigurumacffi-0.0.18-pp36-pypy36_pp73-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 561.3 kB
  • Tags: PyPy, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for onigurumacffi-0.0.18-pp36-pypy36_pp73-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 844973dc229cd5489d133246692392d99718ace4df77bebdb4186d7bdf82b9b8
MD5 8e972a77fbf3d7f409b7b910db4c8307
BLAKE2b-256 4c9d62296aafee3af64e527b01fd332af94b78331de894978c5784ae35cedbdc

See more details on using hashes here.

Provenance

File details

Details for the file onigurumacffi-0.0.18-pp36-pypy36_pp73-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for onigurumacffi-0.0.18-pp36-pypy36_pp73-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 3f86451d56c61da5329aca498eb1ff511f84d367fa691318ccf84f9f7f37e7a6
MD5 a873947b724b98e91f517cb0f2388cee
BLAKE2b-256 214033df81d26cfcd6eaeae6f56c2fb5a80e41f16fcdc02e9d3130f9f9ca5f2a

See more details on using hashes here.

Provenance

File details

Details for the file onigurumacffi-0.0.18-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: onigurumacffi-0.0.18-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 183.6 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for onigurumacffi-0.0.18-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 2c03fc4e72a0d6c093ceef96a458ac3fd679bb7d909316ed9b8118cf6fcf33a2
MD5 15f5225de5fa00bdb4b10cc4e5548dc9
BLAKE2b-256 500464ef5ad5ff27c5ba53068da4c3c3b17d614043f505c53a36dbd3274304fa

See more details on using hashes here.

Provenance

File details

Details for the file onigurumacffi-0.0.18-cp38-cp38-win32.whl.

File metadata

  • Download URL: onigurumacffi-0.0.18-cp38-cp38-win32.whl
  • Upload date:
  • Size: 167.4 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for onigurumacffi-0.0.18-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 2e0de3c2580262739ca380db15fdbaf6b49c0660da912081bdd2ad0cfc0d61b8
MD5 17a69ab08b6b6306746fe5329bf18ce0
BLAKE2b-256 934b25e3ecbbbbd082de669f52a205faa774d666943c5b0bc52eacfdd58483ce

See more details on using hashes here.

Provenance

File details

Details for the file onigurumacffi-0.0.18-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: onigurumacffi-0.0.18-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 183.6 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for onigurumacffi-0.0.18-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 ef32d5fb4b79b6c5442bc80e22218b65feb4b6294af820541d3c10098ce74815
MD5 d5367048799f1ff31755c33f23ce335d
BLAKE2b-256 684c68c9b055dd600336e92f5b209d2d3cc59545b9a67d228145c95704cd77c9

See more details on using hashes here.

Provenance

File details

Details for the file onigurumacffi-0.0.18-cp37-cp37m-win32.whl.

File metadata

  • Download URL: onigurumacffi-0.0.18-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 167.4 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for onigurumacffi-0.0.18-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 e7fe2bb55be8e7e52ef7d7e8fd9e9e5e955f53d1b681b2f966c3798177735f12
MD5 bf4e1b27f7c795e0ae1fb6300ebc4979
BLAKE2b-256 55e109aa38cb3716f7f0c5dd1075f2f22180f8282322cc7cc718521fb4c02c23

See more details on using hashes here.

Provenance

File details

Details for the file onigurumacffi-0.0.18-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: onigurumacffi-0.0.18-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 183.6 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for onigurumacffi-0.0.18-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 c4a3081a4420484e0523932be280637efcdcd5a4c91f26b8f5ee154a3d94fd91
MD5 44689e79e8f4d0c0f858facf8e1ab923
BLAKE2b-256 8eb5b097bb1a05b33dc6ae869ba281d38f68348f4a246e97d83f0fa784f630fc

See more details on using hashes here.

Provenance

File details

Details for the file onigurumacffi-0.0.18-cp36-cp36m-win32.whl.

File metadata

  • Download URL: onigurumacffi-0.0.18-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 167.4 kB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for onigurumacffi-0.0.18-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 797cb5f8b0ff6e48b720822f4c6fed034d193cb1dd996087d3a398d8232f1888
MD5 b2f06400579cc2d160d1a4d00d0b8696
BLAKE2b-256 b51e83d0138885d38670448b7b540a55396186388b1d3d922e6cc8846d409559

See more details on using hashes here.

Provenance

File details

Details for the file onigurumacffi-0.0.18-cp36-abi3-manylinux1_x86_64.whl.

File metadata

  • Download URL: onigurumacffi-0.0.18-cp36-abi3-manylinux1_x86_64.whl
  • Upload date:
  • Size: 532.8 kB
  • Tags: CPython 3.6+
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for onigurumacffi-0.0.18-cp36-abi3-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 f17cf544bd12eb015d471a4133a7e3168d5e0e9123c9a383120adfbb9f9aa2b7
MD5 9398980856a42ed2819786c96b745ca3
BLAKE2b-256 39aa58f12131f7435d58389238634b34d97e2ef961c9672c5bc14f40eda5344e

See more details on using hashes here.

Provenance

File details

Details for the file onigurumacffi-0.0.18-cp36-abi3-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: onigurumacffi-0.0.18-cp36-abi3-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 223.2 kB
  • Tags: CPython 3.6+, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for onigurumacffi-0.0.18-cp36-abi3-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 3148ce12f8a91528b898c0c4824ca50416339ed92d4a0cb520917acedd09f424
MD5 1833a0680cca472094e141b278e0404f
BLAKE2b-256 45aed34e46a8cf21c6e80953a5ebdb0964610d41dc805237c4ab78db9ea07f7e

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page