facehuggershield


Namefacehuggershield JSON
Version 0.1.11 PyPI version JSON
download
home_pagehttps://github.com/Capsize-Games/facehuggershield
SummaryNone
upload_time2024-08-25 16:12:50
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/e6/da/2f10cc57f4c97cf4b5a52ebe469aadf6c568c8fdd046989e5089266458eb/facehuggershield-0.1.11.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.11",
    "project_urls": {
        "Homepage": "https://github.com/Capsize-Games/facehuggershield"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4c15617ae8efeb894076e202c3d5f4ed9ad2f6fbe12d82974894897641bf2f7a",
                "md5": "a9c4dd382d624ca09f618e633c59c4e6",
                "sha256": "df75203c51871b66bd171950fbbb57b3380087f4bdf9b812aee34b620cdd426c"
            },
            "downloads": -1,
            "filename": "facehuggershield-0.1.11-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a9c4dd382d624ca09f618e633c59c4e6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10.0",
            "size": 19302,
            "upload_time": "2024-08-25T16:12:48",
            "upload_time_iso_8601": "2024-08-25T16:12:48.937883Z",
            "url": "https://files.pythonhosted.org/packages/4c/15/617ae8efeb894076e202c3d5f4ed9ad2f6fbe12d82974894897641bf2f7a/facehuggershield-0.1.11-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e6da2f10cc57f4c97cf4b5a52ebe469aadf6c568c8fdd046989e5089266458eb",
                "md5": "32548eeb6b069342097500056a6f0858",
                "sha256": "e69e9bc41321296a4a5e2bdbc2827d408c96b64e4694be50f99ca91dbdcb9bc1"
            },
            "downloads": -1,
            "filename": "facehuggershield-0.1.11.tar.gz",
            "has_sig": false,
            "md5_digest": "32548eeb6b069342097500056a6f0858",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10.0",
            "size": 18963,
            "upload_time": "2024-08-25T16:12:50",
            "upload_time_iso_8601": "2024-08-25T16:12:50.276619Z",
            "url": "https://files.pythonhosted.org/packages/e6/da/2f10cc57f4c97cf4b5a52ebe469aadf6c568c8fdd046989e5089266458eb/facehuggershield-0.1.11.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-25 16:12:50",
    "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.96468s