![PyPI - Version](https://img.shields.io/pypi/v/yara-x)
![PyPI - License](https://img.shields.io/pypi/l/yara-x)
[![Documentation](https://img.shields.io/badge/doc-latest-blue.svg)](https://virustotal.github.io/yara-x/docs/api/python)
[![Downloads](https://pepy.tech/badge/yara-x)](https://pepy.tech/project/yara-x)
[![Downloads per week](https://pepy.tech/badge/yara-x/week)](https://pepy.tech/project/yara-x)
![GitHub Repo stars](https://img.shields.io/github/stars/VirusTotal/yara-x)
The official Python library for [YARA-X](https://virustotal.github.io/yara-x).
Supports Python 3.8+ in Linux, MacOS and Windows.
```python
import yara_x
rules = yara_x.compile('''
rule test {
strings:
$a = "foobar"
condition:
$a
}''')
results = rules.scan(b"foobar")
assert results.matching_rules[0].identifier == "test"
assert results.matching_rules[0].patterns[0].identifier == "$a"
assert results.matching_rules[0].patterns[0].matches[0].offset == 0
assert results.matching_rules[0].patterns[0].matches[0].length == 6
```
For more information about how to use this library, please check
the [documentation](https://virustotal.github.io/yara-x/docs/api/python).
Raw data
{
"_id": null,
"home_page": null,
"name": "yara-x",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "pattern-matching, cybersecurity, forensics, malware, yara",
"author": null,
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/17/27/49f3647bae896a05a1b62a6b5d6dfce0ca6f6f6d7297dccadd78078de583/yara_x-0.3.0.tar.gz",
"platform": null,
"description": "![PyPI - Version](https://img.shields.io/pypi/v/yara-x)\n![PyPI - License](https://img.shields.io/pypi/l/yara-x)\n[![Documentation](https://img.shields.io/badge/doc-latest-blue.svg)](https://virustotal.github.io/yara-x/docs/api/python)\n[![Downloads](https://pepy.tech/badge/yara-x)](https://pepy.tech/project/yara-x)\n[![Downloads per week](https://pepy.tech/badge/yara-x/week)](https://pepy.tech/project/yara-x)\n![GitHub Repo stars](https://img.shields.io/github/stars/VirusTotal/yara-x)\n\nThe official Python library for [YARA-X](https://virustotal.github.io/yara-x).\nSupports Python 3.8+ in Linux, MacOS and Windows.\n\n```python\nimport yara_x\n\nrules = yara_x.compile('''\n rule test { \n strings: \n $a = \"foobar\" \n condition: \n $a\n }''')\n\nresults = rules.scan(b\"foobar\")\n\nassert results.matching_rules[0].identifier == \"test\"\nassert results.matching_rules[0].patterns[0].identifier == \"$a\"\nassert results.matching_rules[0].patterns[0].matches[0].offset == 0\nassert results.matching_rules[0].patterns[0].matches[0].length == 6\n```\n\nFor more information about how to use this library, please check\nthe [documentation](https://virustotal.github.io/yara-x/docs/api/python).\n",
"bugtrack_url": null,
"license": null,
"summary": "Python bindings for YARA-X",
"version": "0.3.0",
"project_urls": {
"homepage": "https://virustotal.github.io/yara-x",
"repository": "https://github.com/VirusTotal/yara-x.git"
},
"split_keywords": [
"pattern-matching",
" cybersecurity",
" forensics",
" malware",
" yara"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "cc3351d3b4a2414a9324ced15bb59b0686b89a63371581dd83acf2eb7fdbae3f",
"md5": "2004642164cb9a8bf8b36b1f7ceed3ae",
"sha256": "f789d4f674da2c0e325606c8dd311a419b7e42f1d9dee456983558be51f201db"
},
"downloads": -1,
"filename": "yara_x-0.3.0-cp38-abi3-macosx_10_12_x86_64.whl",
"has_sig": false,
"md5_digest": "2004642164cb9a8bf8b36b1f7ceed3ae",
"packagetype": "bdist_wheel",
"python_version": "cp38",
"requires_python": ">=3.8",
"size": 6460125,
"upload_time": "2024-05-17T10:27:40",
"upload_time_iso_8601": "2024-05-17T10:27:40.143258Z",
"url": "https://files.pythonhosted.org/packages/cc/33/51d3b4a2414a9324ced15bb59b0686b89a63371581dd83acf2eb7fdbae3f/yara_x-0.3.0-cp38-abi3-macosx_10_12_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "db594707495322cc7ced1e727c6adf14544c41b52e9544fef2149258e741062e",
"md5": "12b4ed266a2e79cb8a57f9bb8f0e6dd0",
"sha256": "ee4bd3f625c5623810ad643e4b1e251f099d88c281466ac5ead63de2b0ac5dc9"
},
"downloads": -1,
"filename": "yara_x-0.3.0-cp38-abi3-macosx_11_0_arm64.whl",
"has_sig": false,
"md5_digest": "12b4ed266a2e79cb8a57f9bb8f0e6dd0",
"packagetype": "bdist_wheel",
"python_version": "cp38",
"requires_python": ">=3.8",
"size": 6110979,
"upload_time": "2024-05-17T10:27:42",
"upload_time_iso_8601": "2024-05-17T10:27:42.559482Z",
"url": "https://files.pythonhosted.org/packages/db/59/4707495322cc7ced1e727c6adf14544c41b52e9544fef2149258e741062e/yara_x-0.3.0-cp38-abi3-macosx_11_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d020420b8bb145ae32851e4ff94d98fa7a9ea474c72f70e87841dd6f8099a735",
"md5": "ac7744e1401ee44ecff2309c8b78a98c",
"sha256": "34fba7374f55456d82ac7758d98bb59ef34612a2c992e0480aa3ac7647f52543"
},
"downloads": -1,
"filename": "yara_x-0.3.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "ac7744e1401ee44ecff2309c8b78a98c",
"packagetype": "bdist_wheel",
"python_version": "cp38",
"requires_python": ">=3.8",
"size": 7366974,
"upload_time": "2024-05-17T10:27:44",
"upload_time_iso_8601": "2024-05-17T10:27:44.559707Z",
"url": "https://files.pythonhosted.org/packages/d0/20/420b8bb145ae32851e4ff94d98fa7a9ea474c72f70e87841dd6f8099a735/yara_x-0.3.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "fbea64c715fa5cff9a7f3518bf5f5ffcbe83050a58d51336e05ecae95fe18a59",
"md5": "c75c4a3ff3c4bdf7dad186b12a774b43",
"sha256": "a341a61d4e83121ff7c0bfe9f4724e2a205ab89008730eb2fd00938e4048fc87"
},
"downloads": -1,
"filename": "yara_x-0.3.0-cp38-abi3-win_amd64.whl",
"has_sig": false,
"md5_digest": "c75c4a3ff3c4bdf7dad186b12a774b43",
"packagetype": "bdist_wheel",
"python_version": "cp38",
"requires_python": ">=3.8",
"size": 5589700,
"upload_time": "2024-05-17T10:27:46",
"upload_time_iso_8601": "2024-05-17T10:27:46.953853Z",
"url": "https://files.pythonhosted.org/packages/fb/ea/64c715fa5cff9a7f3518bf5f5ffcbe83050a58d51336e05ecae95fe18a59/yara_x-0.3.0-cp38-abi3-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "26083f92d27457bbf48b365f64bba8ecb6964b64c999fa361eb93d601d97d93e",
"md5": "e983248065d3cf635f7064389595cd38",
"sha256": "2decf0423d486c02819d744f87002bf380abb95397b143e3ab4f94e90451284f"
},
"downloads": -1,
"filename": "yara_x-0.3.0-pp310-pypy310_pp73-macosx_10_12_x86_64.whl",
"has_sig": false,
"md5_digest": "e983248065d3cf635f7064389595cd38",
"packagetype": "bdist_wheel",
"python_version": "pp310",
"requires_python": ">=3.8",
"size": 6457933,
"upload_time": "2024-05-17T10:27:48",
"upload_time_iso_8601": "2024-05-17T10:27:48.889979Z",
"url": "https://files.pythonhosted.org/packages/26/08/3f92d27457bbf48b365f64bba8ecb6964b64c999fa361eb93d601d97d93e/yara_x-0.3.0-pp310-pypy310_pp73-macosx_10_12_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0b2bf4844e6d7e20f416686ef04a7b69fcce12edb07c7eb10ddbf43add9a0e8d",
"md5": "970c9e82d00942dd82de757cd8dbcb90",
"sha256": "26847a8b571f66ffadc1805ee5add37dfb5b8f10d9d60002b4eadf7c23918c5b"
},
"downloads": -1,
"filename": "yara_x-0.3.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl",
"has_sig": false,
"md5_digest": "970c9e82d00942dd82de757cd8dbcb90",
"packagetype": "bdist_wheel",
"python_version": "pp310",
"requires_python": ">=3.8",
"size": 6108896,
"upload_time": "2024-05-17T10:27:50",
"upload_time_iso_8601": "2024-05-17T10:27:50.838187Z",
"url": "https://files.pythonhosted.org/packages/0b/2b/f4844e6d7e20f416686ef04a7b69fcce12edb07c7eb10ddbf43add9a0e8d/yara_x-0.3.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "78de837a316189d606a81069f38243ffbd67645928e692cd67f7bea871b362ea",
"md5": "87f2cdebf5c3929152b9f28c459c518d",
"sha256": "ceb174c6c1147e06d457d840048c65c394fc8a7eb5619c2162ca84ce6f977cea"
},
"downloads": -1,
"filename": "yara_x-0.3.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "87f2cdebf5c3929152b9f28c459c518d",
"packagetype": "bdist_wheel",
"python_version": "pp310",
"requires_python": ">=3.8",
"size": 7365101,
"upload_time": "2024-05-17T10:27:53",
"upload_time_iso_8601": "2024-05-17T10:27:53.531777Z",
"url": "https://files.pythonhosted.org/packages/78/de/837a316189d606a81069f38243ffbd67645928e692cd67f7bea871b362ea/yara_x-0.3.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8bf340f26d98b4c6eaf82c280b2ef6800fa57b516d76d80e9ac0e8e4b2e65113",
"md5": "70ae630ef7800f6811deccc17f10f030",
"sha256": "de8e7e18a64cbf69878d96123dead98149b0b26ef95416c00a344c9c8ac69ce3"
},
"downloads": -1,
"filename": "yara_x-0.3.0-pp310-pypy310_pp73-win_amd64.whl",
"has_sig": false,
"md5_digest": "70ae630ef7800f6811deccc17f10f030",
"packagetype": "bdist_wheel",
"python_version": "pp310",
"requires_python": ">=3.8",
"size": 5582906,
"upload_time": "2024-05-17T10:27:56",
"upload_time_iso_8601": "2024-05-17T10:27:56.015594Z",
"url": "https://files.pythonhosted.org/packages/8b/f3/40f26d98b4c6eaf82c280b2ef6800fa57b516d76d80e9ac0e8e4b2e65113/yara_x-0.3.0-pp310-pypy310_pp73-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "735f003ad495493ea731f105e4dda68c4dcb3aa43d213e1575058c9ae3ca4e9b",
"md5": "ad95bd38a69f6a9a388a0eb5b83c0105",
"sha256": "2b8e4c9598270fc0da575322e608453b7d925e18b912a405aede24aedf9dc9bc"
},
"downloads": -1,
"filename": "yara_x-0.3.0-pp38-pypy38_pp73-macosx_10_12_x86_64.whl",
"has_sig": false,
"md5_digest": "ad95bd38a69f6a9a388a0eb5b83c0105",
"packagetype": "bdist_wheel",
"python_version": "pp38",
"requires_python": ">=3.8",
"size": 6458667,
"upload_time": "2024-05-17T10:27:57",
"upload_time_iso_8601": "2024-05-17T10:27:57.924252Z",
"url": "https://files.pythonhosted.org/packages/73/5f/003ad495493ea731f105e4dda68c4dcb3aa43d213e1575058c9ae3ca4e9b/yara_x-0.3.0-pp38-pypy38_pp73-macosx_10_12_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "78d59141fbf412d883d9f039ffb0b2f2284c2e3db56887aa18f40f54b14a37f6",
"md5": "8c591264a4c6e063c4fa2a5db1c0d676",
"sha256": "9837487e95e4d29a5a46e4206a32ee7a0725dce7fcaca61a2249fbbe911abda3"
},
"downloads": -1,
"filename": "yara_x-0.3.0-pp38-pypy38_pp73-macosx_11_0_arm64.whl",
"has_sig": false,
"md5_digest": "8c591264a4c6e063c4fa2a5db1c0d676",
"packagetype": "bdist_wheel",
"python_version": "pp38",
"requires_python": ">=3.8",
"size": 6109988,
"upload_time": "2024-05-17T10:28:00",
"upload_time_iso_8601": "2024-05-17T10:28:00.020657Z",
"url": "https://files.pythonhosted.org/packages/78/d5/9141fbf412d883d9f039ffb0b2f2284c2e3db56887aa18f40f54b14a37f6/yara_x-0.3.0-pp38-pypy38_pp73-macosx_11_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3396d1edb477f231ff2d2f49149c130345e39d15540a1f0de39116eb2e369917",
"md5": "c056de668c98686045a8405541300cae",
"sha256": "2d6f2a4c115e816624c1171ae0a90236711f59495ead94fb39e41e834a589fc9"
},
"downloads": -1,
"filename": "yara_x-0.3.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "c056de668c98686045a8405541300cae",
"packagetype": "bdist_wheel",
"python_version": "pp38",
"requires_python": ">=3.8",
"size": 7366416,
"upload_time": "2024-05-17T10:28:01",
"upload_time_iso_8601": "2024-05-17T10:28:01.722712Z",
"url": "https://files.pythonhosted.org/packages/33/96/d1edb477f231ff2d2f49149c130345e39d15540a1f0de39116eb2e369917/yara_x-0.3.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "47c17d544e032bf52f70cc60051792401d884a810695711e3ebba1eea39de51b",
"md5": "4e331c7282de885fbea361bf003eadf8",
"sha256": "aebbe2c4e644aad4e93f5e266854428e53573c1289eac8db0e1e4acaafdc0a29"
},
"downloads": -1,
"filename": "yara_x-0.3.0-pp38-pypy38_pp73-win_amd64.whl",
"has_sig": false,
"md5_digest": "4e331c7282de885fbea361bf003eadf8",
"packagetype": "bdist_wheel",
"python_version": "pp38",
"requires_python": ">=3.8",
"size": 5584415,
"upload_time": "2024-05-17T10:28:03",
"upload_time_iso_8601": "2024-05-17T10:28:03.163901Z",
"url": "https://files.pythonhosted.org/packages/47/c1/7d544e032bf52f70cc60051792401d884a810695711e3ebba1eea39de51b/yara_x-0.3.0-pp38-pypy38_pp73-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "38c4b2787572f36da98ec1a09e0909604e0ec06a92b53d23cfa91126a0d52870",
"md5": "6ec526ee58a9f2e35cf492776af60c4e",
"sha256": "98a8d8b439904a7c30a5b37f016ceb64677410c3626bca7dc5fef615a5988008"
},
"downloads": -1,
"filename": "yara_x-0.3.0-pp39-pypy39_pp73-macosx_10_12_x86_64.whl",
"has_sig": false,
"md5_digest": "6ec526ee58a9f2e35cf492776af60c4e",
"packagetype": "bdist_wheel",
"python_version": "pp39",
"requires_python": ">=3.8",
"size": 6458956,
"upload_time": "2024-05-17T10:28:04",
"upload_time_iso_8601": "2024-05-17T10:28:04.751863Z",
"url": "https://files.pythonhosted.org/packages/38/c4/b2787572f36da98ec1a09e0909604e0ec06a92b53d23cfa91126a0d52870/yara_x-0.3.0-pp39-pypy39_pp73-macosx_10_12_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "463a4eb21043edb247007d22d876470f569742703e14e902ff797d2c5453528e",
"md5": "4fa139555a12febf3a2365c442eeabf6",
"sha256": "056e8b004fa89fab39e85c7f5815cb264caabc625f142b5c62b67def84cafd9f"
},
"downloads": -1,
"filename": "yara_x-0.3.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl",
"has_sig": false,
"md5_digest": "4fa139555a12febf3a2365c442eeabf6",
"packagetype": "bdist_wheel",
"python_version": "pp39",
"requires_python": ">=3.8",
"size": 6109587,
"upload_time": "2024-05-17T10:28:06",
"upload_time_iso_8601": "2024-05-17T10:28:06.715420Z",
"url": "https://files.pythonhosted.org/packages/46/3a/4eb21043edb247007d22d876470f569742703e14e902ff797d2c5453528e/yara_x-0.3.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "19f0332a8c2fc7bc1308312c72158bfba282a0a7a95b4fb784d1383cc7ef8115",
"md5": "106030adbdd82d8c588f43d978036f32",
"sha256": "26860e17ed35c02cc91a7083120d902bc8af675261f60f85c5823b2ef3bd3832"
},
"downloads": -1,
"filename": "yara_x-0.3.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "106030adbdd82d8c588f43d978036f32",
"packagetype": "bdist_wheel",
"python_version": "pp39",
"requires_python": ">=3.8",
"size": 7366779,
"upload_time": "2024-05-17T10:28:08",
"upload_time_iso_8601": "2024-05-17T10:28:08.347473Z",
"url": "https://files.pythonhosted.org/packages/19/f0/332a8c2fc7bc1308312c72158bfba282a0a7a95b4fb784d1383cc7ef8115/yara_x-0.3.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a086089f0e8d7c25cd483881a219f2c2b494fd040a3f9b5082e6474c33e03ddc",
"md5": "1c2d3eb58ea91d262cc1467b6da93057",
"sha256": "353103c969a115f884d7fc9e6336bccb7bd203384b05d34379a94154d1effdcd"
},
"downloads": -1,
"filename": "yara_x-0.3.0-pp39-pypy39_pp73-win_amd64.whl",
"has_sig": false,
"md5_digest": "1c2d3eb58ea91d262cc1467b6da93057",
"packagetype": "bdist_wheel",
"python_version": "pp39",
"requires_python": ">=3.8",
"size": 5584835,
"upload_time": "2024-05-17T10:28:10",
"upload_time_iso_8601": "2024-05-17T10:28:10.817074Z",
"url": "https://files.pythonhosted.org/packages/a0/86/089f0e8d7c25cd483881a219f2c2b494fd040a3f9b5082e6474c33e03ddc/yara_x-0.3.0-pp39-pypy39_pp73-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "172749f3647bae896a05a1b62a6b5d6dfce0ca6f6f6d7297dccadd78078de583",
"md5": "327ae9d1d12bdc35eb8e7fa5bb6f375e",
"sha256": "1abb0f88c545eb63fc3a2250b337d66669a5d1a5d356349671f3d237d5e4d03d"
},
"downloads": -1,
"filename": "yara_x-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "327ae9d1d12bdc35eb8e7fa5bb6f375e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 484049,
"upload_time": "2024-05-17T10:28:12",
"upload_time_iso_8601": "2024-05-17T10:28:12.653121Z",
"url": "https://files.pythonhosted.org/packages/17/27/49f3647bae896a05a1b62a6b5d6dfce0ca6f6f6d7297dccadd78078de583/yara_x-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-17 10:28:12",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "VirusTotal",
"github_project": "yara-x",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "yara-x"
}