Skip to main content

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.


img.png

Upload Python Package


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

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 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

facehuggershield-0.1.12.tar.gz (19.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

facehuggershield-0.1.12-py3-none-any.whl (19.6 kB view details)

Uploaded Python 3

File details

Details for the file facehuggershield-0.1.12.tar.gz.

File metadata

  • Download URL: facehuggershield-0.1.12.tar.gz
  • Upload date:
  • Size: 19.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.22

File hashes

Hashes for facehuggershield-0.1.12.tar.gz
Algorithm Hash digest
SHA256 6b05b983063e78e483f19cbf9427ba020636f013bfa80b6cb978aeceefb41c5d
MD5 f0cd182ab1dc375c1e9db86e14d8b263
BLAKE2b-256 7eddf26b5b7d64b16dc802c636e2322cb93e9bef147b215e874937f3b6834dc8

See more details on using hashes here.

File details

Details for the file facehuggershield-0.1.12-py3-none-any.whl.

File metadata

File hashes

Hashes for facehuggershield-0.1.12-py3-none-any.whl
Algorithm Hash digest
SHA256 f053a1c6d338031ab6c46174ef03ed1925a26e2a99f65bce9482fb954a3bd695
MD5 5b43e6c835f7d48dddffe2e5d83cec8a
BLAKE2b-256 0685495db9f894fe4a4ef8d4e03e3eec50a22aaa839cd723ff2ee7b44e2ee278

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page