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.4.tar.gz (15.3 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.4-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nullscream-0.1.4.tar.gz
  • Upload date:
  • Size: 15.3 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.4.tar.gz
Algorithm Hash digest
SHA256 899f44d010cdcb6337dffe4e8a96d1d5efe39bb3589db524224447d93e492b6a
MD5 09a6203be1bbed071a38ee1df816e2c7
BLAKE2b-256 092215b2c2c4b4f077fe3f5cfab69a64770822fc298374d4749ae5861f4a0721

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nullscream-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 15.6 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 dd79e4781cdc5ae54ad3e3214cf88546a74eed09d62d6a83e3ecd18877e41209
MD5 0f7f35adb57287603dccaffbd68b261a
BLAKE2b-256 f95bde578344f6df443f26c09d585fc6278a18d59416c5cb4f86efc49c29f393

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