Skip to main content

No project description provided

Project description

NULLSCREAM


img.png

Upload Python Package


nullscream is a simple library that allows you to import noop functions and classes that you can use as drop in replacements for functions you wish to override.

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


Installation

pip install nullscream

Usage

Import the install_nullscream function the top of your main entry file (e.g. main.py), import nullscream before importing any other libraries.

import nullscream

nullscream_blacklist = ["requests"]

nullscream.activate(
    blacklist=nullscream_blacklist,
)

Now when you import requests, you will get a noop version of the requests library.

import requests

print(requests.__doc__)

# Output:
# This is a noop stand-in module.

print(requests.foobar())

# Output:
# MagicType instance

You can uninstall the noop module by calling uninstall_nullscream

import nullscream

nullscream.uninstall(blacklist=["requests"])

Now when you import requests, you will get the original requests library.

import requests

print(requests.__doc__)

# Output: Original requests library docstring

Testing

python -m unittest discover -s tests

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

nullscream-0.1.5.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

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

nullscream-0.1.5-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file nullscream-0.1.5.tar.gz.

File metadata

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

File hashes

Hashes for nullscream-0.1.5.tar.gz
Algorithm Hash digest
SHA256 77ba4b59ddab35949aa4720787f1fd13b09d1355c016b0690c358f92a2f77da2
MD5 3a24b5aa2dac9a09990eb86364cdf835
BLAKE2b-256 1a21b09c8595b49fe5e3ce3718acb326769a0c23263bd6a458f5814fe26a1a4e

See more details on using hashes here.

File details

Details for the file nullscream-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: nullscream-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.22

File hashes

Hashes for nullscream-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 2a4f9c9b1243aa9710e6be008e404dded670b568b122f437a2a4d8d33b7aa4a3
MD5 31c85d0730981b97b7dc8fd7bb7cf232
BLAKE2b-256 9f05d270ffa4ceec376471136155438f8b00a19ac7b3d0eab0ebfe9638c390f7

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