facehuggershield


Namefacehuggershield JSON
Version 0.1.10 PyPI version JSON
download
home_pagehttps://github.com/Capsize-Games/facehuggershield
SummaryNone
upload_time2024-05-09 17:46:35
maintainerNone
docs_urlNone
authorCapsize LLC
requires_python>=3.10.0
licenseGPL-3.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Facehugger Shield

Facehugger Shield automatically locks down operations
for specific modules. It was designed to non-destructively restrict access
to the Huggingface library, but can be used with any library.

---

![img.png](img.png)

[![Upload Python Package](https://github.com/Capsize-Games/facehuggershield/actions/workflows/python-publish.yml/badge.svg)](https://github.com/Capsize-Games/facehuggershield/actions/workflows/python-publish.yml)

---

## Usage

Facehugger Shield was specifically designed to override Huggingface libraries, so the following examples show how to do that.


Install with Huggingface libraries (or any other library you want to restrict).

```bash
pip install facehuggershield
```

Import in your application's main entry file (e.g. `main.py`), import `facehuggershield` before importing
any other libraries.

```python
import facehuggershield.huggingface
```

Now you can use Huggingface libraries without worrying about telemetry, networking or file writes.

---

## How it works

Facehugger Shield uses `nullscream` to intercept blacklisted modules and return Noop modules in their place.
The noop modules are empty classes with functions that return Magic noop classes.
The magic class functions in turn respond with Magic classes.

This allows anything on the blacklist to be importable, but not executable.

By overriding certain functions in the `transformers` library, Facehugger is able to prevent

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Capsize-Games/facehuggershield",
    "name": "facehuggershield",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10.0",
    "maintainer_email": null,
    "keywords": null,
    "author": "Capsize LLC",
    "author_email": "contact@capsizegames.com",
    "download_url": "https://files.pythonhosted.org/packages/69/4e/d6840db133711e44be6be3786c433a08796301b59b31788373b9a05bd358/facehuggershield-0.1.10.tar.gz",
    "platform": null,
    "description": "# Facehugger Shield\n\nFacehugger Shield automatically locks down operations\nfor specific modules. It was designed to non-destructively restrict access\nto the Huggingface library, but can be used with any library.\n\n---\n\n![img.png](img.png)\n\n[![Upload Python Package](https://github.com/Capsize-Games/facehuggershield/actions/workflows/python-publish.yml/badge.svg)](https://github.com/Capsize-Games/facehuggershield/actions/workflows/python-publish.yml)\n\n---\n\n## Usage\n\nFacehugger Shield was specifically designed to override Huggingface libraries, so the following examples show how to do that.\n\n\nInstall with Huggingface libraries (or any other library you want to restrict).\n\n```bash\npip install facehuggershield\n```\n\nImport in your application's main entry file (e.g. `main.py`), import `facehuggershield` before importing\nany other libraries.\n\n```python\nimport facehuggershield.huggingface\n```\n\nNow you can use Huggingface libraries without worrying about telemetry, networking or file writes.\n\n---\n\n## How it works\n\nFacehugger Shield uses `nullscream` to intercept blacklisted modules and return Noop modules in their place.\nThe noop modules are empty classes with functions that return Magic noop classes.\nThe magic class functions in turn respond with Magic classes.\n\nThis allows anything on the blacklist to be importable, but not executable.\n\nBy overriding certain functions in the `transformers` library, Facehugger is able to prevent\n",
    "bugtrack_url": null,
    "license": "GPL-3.0",
    "summary": null,
    "version": "0.1.10",
    "project_urls": {
        "Homepage": "https://github.com/Capsize-Games/facehuggershield"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9ea14dac70500843fd5ac66139f742eed955e9e39deacf1631b35cc718fe11f4",
                "md5": "0364c7cf5231a756d698c9d304680e95",
                "sha256": "2c8a7182f4bed6d0928d108c3c67de7f40f28e1675d9e0d3a8ffab1a17440671"
            },
            "downloads": -1,
            "filename": "facehuggershield-0.1.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0364c7cf5231a756d698c9d304680e95",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10.0",
            "size": 19301,
            "upload_time": "2024-05-09T17:46:33",
            "upload_time_iso_8601": "2024-05-09T17:46:33.584796Z",
            "url": "https://files.pythonhosted.org/packages/9e/a1/4dac70500843fd5ac66139f742eed955e9e39deacf1631b35cc718fe11f4/facehuggershield-0.1.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "694ed6840db133711e44be6be3786c433a08796301b59b31788373b9a05bd358",
                "md5": "4b6ce497ef8d95c44d053b4f98a842c5",
                "sha256": "a469a7f0cfd511458ae41e891c51249ed9a58fd20aa6823c4659bd7083bd4090"
            },
            "downloads": -1,
            "filename": "facehuggershield-0.1.10.tar.gz",
            "has_sig": false,
            "md5_digest": "4b6ce497ef8d95c44d053b4f98a842c5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10.0",
            "size": 18964,
            "upload_time": "2024-05-09T17:46:35",
            "upload_time_iso_8601": "2024-05-09T17:46:35.099559Z",
            "url": "https://files.pythonhosted.org/packages/69/4e/d6840db133711e44be6be3786c433a08796301b59b31788373b9a05bd358/facehuggershield-0.1.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-09 17:46:35",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Capsize-Games",
    "github_project": "facehuggershield",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "facehuggershield"
}
        
Elapsed time: 0.26223s