crx3


Namecrx3 JSON
Version 0.0.3 PyPI version JSON
download
home_pagehttps://github.com/liying2008/python-crx3
SummaryChrome extension (crx) packaging & parsing library.
upload_time2023-08-26 04:11:56
maintainer
docs_urlNone
authorliying
requires_python>=3.7
licenseMIT
keywords crx chrome edge extension
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # CRX3

[![PyPI](https://img.shields.io/pypi/v/crx3)](https://pypi.org/project/crx3/)
[![PyPI Supported Python Versions](https://img.shields.io/pypi/pyversions/crx3.svg)](https://pypi.python.org/pypi/crx3/)
[![Downloads](https://static.pepy.tech/badge/crx3)](https://pepy.tech/project/crx3)
[![GitHub Actions (Tests)](https://github.com/liying2008/python-crx3/actions/workflows/tests.yml/badge.svg)](https://github.com/liying2008/python-crx3/actions/workflows/tests.yml)

**crx3** is a python library for packaging and parsing crx files.

## Installation

`crx3` is available on PyPI:

```console
$ python -m pip install crx3
```

crx3 officially supports Python 3.7+.

## Functions

- Create a private key for signing the crx file.

```python
from crx3 import creator

creator.create_private_key_file('output/example-extension.pem')
```

- Packaging a zip file or extension code directory to a crx file.

```python
from crx3 import creator

creator.create_crx_file('example/example-extension', 'example/example-extension.pem', 'output/example-extension.crx')
```

- Verify if a file is a valid crx version 3 file.

```python
from crx3 import verifier

verifier_result, header_info = verifier.verify('example/example-extension.crx')

assert verifier_result == verifier.VerifierResult.OK_FULL
assert header_info.crx_id == 'jjomgndeajdmncfenopimafofpnflcfo'
assert header_info.public_key == 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMI...FkbU7H8sDQIDAQAB'
```

## Commands

- **Create a crx file.**

`crx3 create [-pk PRIVATE_KEY_FILE] [-o OUTPUT_FILE] [-v] source`

```
usage: crx3 create [-h] [-pk PRIVATE_KEY_FILE] [-o OUTPUT_FILE] [-v] source

positional arguments:
  source                zip file or directory to be packed

options:
  -h, --help            show this help message and exit
  -pk PRIVATE_KEY_FILE, --private-key PRIVATE_KEY_FILE
                        private key file to be used for signing. If not specified, the program automatically creates a new one and saves it to the same directory as the crx file
  -o OUTPUT_FILE, --output OUTPUT_FILE
                        path to the output crx file
  -v, --verbose         print more information
```

- **Verify that a crx file is valid.**

`crx3 verify [-v] crx_file`

```
usage: crx3 verify [-h] [-v] crx_file
positional arguments:
  crx_file       crx file

options:
  -h, --help     show this help message and exit
  -v, --verbose  print more information
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/liying2008/python-crx3",
    "name": "crx3",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "crx chrome edge extension",
    "author": "liying",
    "author_email": "liruoer2008@yeah.net",
    "download_url": "https://files.pythonhosted.org/packages/6a/07/1583e4d28adc8eed5a596879f28579b0bf6d91fb65bbdadeed8fbdf1c8ea/crx3-0.0.3.tar.gz",
    "platform": "unix",
    "description": "# CRX3\r\n\r\n[![PyPI](https://img.shields.io/pypi/v/crx3)](https://pypi.org/project/crx3/)\r\n[![PyPI Supported Python Versions](https://img.shields.io/pypi/pyversions/crx3.svg)](https://pypi.python.org/pypi/crx3/)\r\n[![Downloads](https://static.pepy.tech/badge/crx3)](https://pepy.tech/project/crx3)\r\n[![GitHub Actions (Tests)](https://github.com/liying2008/python-crx3/actions/workflows/tests.yml/badge.svg)](https://github.com/liying2008/python-crx3/actions/workflows/tests.yml)\r\n\r\n**crx3** is a python library for packaging and parsing crx files.\r\n\r\n## Installation\r\n\r\n`crx3` is available on PyPI:\r\n\r\n```console\r\n$ python -m pip install crx3\r\n```\r\n\r\ncrx3 officially supports Python 3.7+.\r\n\r\n## Functions\r\n\r\n- Create a private key for signing the crx file.\r\n\r\n```python\r\nfrom crx3 import creator\r\n\r\ncreator.create_private_key_file('output/example-extension.pem')\r\n```\r\n\r\n- Packaging a zip file or extension code directory to a crx file.\r\n\r\n```python\r\nfrom crx3 import creator\r\n\r\ncreator.create_crx_file('example/example-extension', 'example/example-extension.pem', 'output/example-extension.crx')\r\n```\r\n\r\n- Verify if a file is a valid crx version 3 file.\r\n\r\n```python\r\nfrom crx3 import verifier\r\n\r\nverifier_result, header_info = verifier.verify('example/example-extension.crx')\r\n\r\nassert verifier_result == verifier.VerifierResult.OK_FULL\r\nassert header_info.crx_id == 'jjomgndeajdmncfenopimafofpnflcfo'\r\nassert header_info.public_key == 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMI...FkbU7H8sDQIDAQAB'\r\n```\r\n\r\n## Commands\r\n\r\n- **Create a crx file.**\r\n\r\n`crx3 create [-pk PRIVATE_KEY_FILE] [-o OUTPUT_FILE] [-v] source`\r\n\r\n```\r\nusage: crx3 create [-h] [-pk PRIVATE_KEY_FILE] [-o OUTPUT_FILE] [-v] source\r\n\r\npositional arguments:\r\n  source                zip file or directory to be packed\r\n\r\noptions:\r\n  -h, --help            show this help message and exit\r\n  -pk PRIVATE_KEY_FILE, --private-key PRIVATE_KEY_FILE\r\n                        private key file to be used for signing. If not specified, the program automatically creates a new one and saves it to the same directory as the crx file\r\n  -o OUTPUT_FILE, --output OUTPUT_FILE\r\n                        path to the output crx file\r\n  -v, --verbose         print more information\r\n```\r\n\r\n- **Verify that a crx file is valid.**\r\n\r\n`crx3 verify [-v] crx_file`\r\n\r\n```\r\nusage: crx3 verify [-h] [-v] crx_file\r\npositional arguments:\r\n  crx_file       crx file\r\n\r\noptions:\r\n  -h, --help     show this help message and exit\r\n  -v, --verbose  print more information\r\n```\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Chrome extension (crx) packaging & parsing library.",
    "version": "0.0.3",
    "project_urls": {
        "Bug Reports": "https://github.com/liying2008/python-crx3/issues",
        "Homepage": "https://github.com/liying2008/python-crx3",
        "Source Code": "https://github.com/liying2008/python-crx3"
    },
    "split_keywords": [
        "crx",
        "chrome",
        "edge",
        "extension"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e3a7cf717ee88a0363a47bc8f6e6be8ca938f9aa655069fa5bbcdd3c6044db0c",
                "md5": "1d8807a4157bbd9e7fc18032931d6e66",
                "sha256": "7fa39199c8e0aade2b92503d8070201eefa8a3b74ed3459bbc805230e4785457"
            },
            "downloads": -1,
            "filename": "crx3-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1d8807a4157bbd9e7fc18032931d6e66",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 14552,
            "upload_time": "2023-08-26T04:11:54",
            "upload_time_iso_8601": "2023-08-26T04:11:54.445247Z",
            "url": "https://files.pythonhosted.org/packages/e3/a7/cf717ee88a0363a47bc8f6e6be8ca938f9aa655069fa5bbcdd3c6044db0c/crx3-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6a071583e4d28adc8eed5a596879f28579b0bf6d91fb65bbdadeed8fbdf1c8ea",
                "md5": "1958eda7ba8046a7e5dbe7165ecf2ad1",
                "sha256": "8ee407c5740e031c8228b85c511559761721840517a2e2a3274f199a097f21a6"
            },
            "downloads": -1,
            "filename": "crx3-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "1958eda7ba8046a7e5dbe7165ecf2ad1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 13506,
            "upload_time": "2023-08-26T04:11:56",
            "upload_time_iso_8601": "2023-08-26T04:11:56.573398Z",
            "url": "https://files.pythonhosted.org/packages/6a/07/1583e4d28adc8eed5a596879f28579b0bf6d91fb65bbdadeed8fbdf1c8ea/crx3-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-26 04:11:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "liying2008",
    "github_project": "python-crx3",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "tox": true,
    "lcname": "crx3"
}
        
Elapsed time: 0.28097s