No project description provided
Project description
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.
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).
pip install facehuggershield
Import in your application's main entry file (e.g. main.py), import facehuggershield before importing
any other libraries.
import facehuggershield.huggingface
activate()
Now you can use Huggingface libraries without worrying about telemetry, networking or file writes.
Settings
See the activate function in the huggingface/init.py file.
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 the use of Huggingface Hub.
Facehugger Shield also makes use of darklock to lock down network services, and shadowlogger to intercept and reroute logs.
These libraries are combined under defendatron, a simple coordinator library.
Facehugger Shield contains all of the required settings for defendatron, as well as the best Huggingface Library settings for privacy.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file facehuggershield-0.1.13.tar.gz.
File metadata
- Download URL: facehuggershield-0.1.13.tar.gz
- Upload date:
- Size: 19.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c252a9b253e5d3aeed1b36a7dea9b5ef64ed4e7286ed3451f219d0996a94312
|
|
| MD5 |
0c627b3b3696fa9fe150430a4c37a5b9
|
|
| BLAKE2b-256 |
42718dc9438cb975130f60f57634d733d1ccd869e0d17124df852d0acb7f985a
|
File details
Details for the file facehuggershield-0.1.13-py3-none-any.whl.
File metadata
- Download URL: facehuggershield-0.1.13-py3-none-any.whl
- Upload date:
- Size: 19.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd5602c68e15fc51c3415ae664aab99c2bfc9f62815017a5ce1b37621037c73d
|
|
| MD5 |
c06f4fd8715df765534219a47a6fc2e9
|
|
| BLAKE2b-256 |
cadd0ad992560b3e77c6cd7820f6a65719b076b121d644cc1113642fd6383bc0
|