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
  • manylinux 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

_Pattern.match(s: str, start: int = 0) -> 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) -> 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) -> 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.13.tar.gz (5.2 kB view details)

Uploaded Source

Built Distributions

onigurumacffi-0.0.13-cp38-cp38-win_amd64.whl (180.1 kB view details)

Uploaded CPython 3.8 Windows x86-64

onigurumacffi-0.0.13-cp37-cp37m-win_amd64.whl (180.1 kB view details)

Uploaded CPython 3.7m Windows x86-64

onigurumacffi-0.0.13-cp36-cp36m-win_amd64.whl (180.1 kB view details)

Uploaded CPython 3.6m Windows x86-64

onigurumacffi-0.0.13-cp36-abi3-manylinux1_x86_64.whl (528.8 kB view details)

Uploaded CPython 3.6+

onigurumacffi-0.0.13-cp36-abi3-macosx_10_13_x86_64.whl (220.2 kB view details)

Uploaded CPython 3.6+ macOS 10.13+ x86-64

File details

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

File metadata

  • Download URL: onigurumacffi-0.0.13.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.9

File hashes

Hashes for onigurumacffi-0.0.13.tar.gz
Algorithm Hash digest
SHA256 7b8de5a20a7e10c69af6340ba5d9cc6d42a6f3d0c375bf354bbb141f11185c1c
MD5 6b0a58f32a627cb30c99d09d80e81b15
BLAKE2b-256 a12993a7f3293f9f28d182ebf97ea4155bc7d4ea439249b10eb5982e0beaaadb

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: onigurumacffi-0.0.13-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 180.1 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/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.9

File hashes

Hashes for onigurumacffi-0.0.13-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 96d6b3cc65d6a5063a1039e5a564023774e310d4f08c45a7ca49f314e9b425e4
MD5 37631251b57e477e628856d326703c6d
BLAKE2b-256 108881b56e4f54aac3c89d8605b44c5494434eb4d1eff4534d3f7e3fd84832ee

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: onigurumacffi-0.0.13-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 180.1 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/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.9

File hashes

Hashes for onigurumacffi-0.0.13-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 955145f8e2566ce6b9f519c2cee90ddcd93c3e9c43413c9544972f24c59cabbe
MD5 9f929448b014ecde21f05e6d11a55b5c
BLAKE2b-256 9ae4716df49e4465b5bb8fa3ec6153c60489a5d98b2ab04d276d98ee245f003d

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: onigurumacffi-0.0.13-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 180.1 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/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.9

File hashes

Hashes for onigurumacffi-0.0.13-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 6cb19b2136931011351a3429fe462a9cd0495014aee43beabf3ae71bf6edf109
MD5 2b5d54003a06d7d7bef454904a4e8a40
BLAKE2b-256 b1be5f8e860b6f28f56c5b7a78c638ce02d08429da1f4fa7e009bd787dc8c671

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: onigurumacffi-0.0.13-cp36-abi3-manylinux1_x86_64.whl
  • Upload date:
  • Size: 528.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/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.9

File hashes

Hashes for onigurumacffi-0.0.13-cp36-abi3-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 4aedb84b07fa537c9b15163d4b6b4c92e091e2f7e351b2b11570f1f183340612
MD5 91abba47deb207c4fc594481bd9718d8
BLAKE2b-256 3a9354feb570ccf87d5be7255faf95bd47d135354999efca5145a164ae22680a

See more details on using hashes here.

Provenance

File details

Details for the file onigurumacffi-0.0.13-cp36-abi3-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: onigurumacffi-0.0.13-cp36-abi3-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 220.2 kB
  • Tags: CPython 3.6+, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.9

File hashes

Hashes for onigurumacffi-0.0.13-cp36-abi3-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 24c0582b24b1c74787ae8e939a59dfd4579d43e7ea28aaf670048b144beace55
MD5 c3a87faf4b10b9c279193174604b8b20
BLAKE2b-256 5cd86c4ea0a1af9abeef1315db41afac97fd695665020f9b40979e79ce549373

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