nullscream


Namenullscream JSON
Version 0.1.3 PyPI version JSON
download
home_pagehttps://github.com/Capsize-Games/nullscream
SummaryNone
upload_time2024-04-25 17:45:24
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.
            # NULLSCREAM

---

![img.png](img.png)

[![Upload Python Package](https://github.com/Capsize-Games/nullscream/actions/workflows/python-publish.yml/badge.svg)](https://github.com/Capsize-Games/nullscream/actions/workflows/python-publish.yml)

---

`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

```bash
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.


```python
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.

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

```python
import nullscream

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

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

```python
import requests

print(requests.__doc__)

# Output: Original requests library docstring
```

---

## Testing

```bash
python -m unittest discover -s tests
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Capsize-Games/nullscream",
    "name": "nullscream",
    "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/09/d8/d8db9cfd7f0aadd7a448d1a1d8918838a4488954f55f05a5a6a3fd0dfc81/nullscream-0.1.3.tar.gz",
    "platform": null,
    "description": "# NULLSCREAM\n\n---\n\n![img.png](img.png)\n\n[![Upload Python Package](https://github.com/Capsize-Games/nullscream/actions/workflows/python-publish.yml/badge.svg)](https://github.com/Capsize-Games/nullscream/actions/workflows/python-publish.yml)\n\n---\n\n`nullscream` is a simple library that allows you to\nimport noop functions and classes that you can use as drop in replacements for functions you wish to override.\n\nThis allows anything on the blacklist to be importable, but not executable.\n\n---\n\n## Installation\n\n```bash\npip install nullscream\n```\n\n## Usage\n\nImport the `install_nullscream` function the top of your main entry file (e.g. `main.py`), import `nullscream` before \nimporting any other libraries.\n\n\n```python\nimport nullscream\n\nnullscream_blacklist = [\"requests\"]\n\nnullscream.activate(\n    blacklist=nullscream_blacklist,\n)\n```\n\nNow when you import requests, you will get a noop version of the requests library.\n\n```python\nimport requests\n\nprint(requests.__doc__)\n\n# Output:\n# This is a noop stand-in module.\n\nprint(requests.foobar())\n\n# Output:\n# MagicType instance\n```\n\nYou can uninstall the noop module by calling `uninstall_nullscream`\n\n```python\nimport nullscream\n\nnullscream.uninstall(blacklist=[\"requests\"])\n```\n\nNow when you import requests, you will get the original requests library.\n\n```python\nimport requests\n\nprint(requests.__doc__)\n\n# Output: Original requests library docstring\n```\n\n---\n\n## Testing\n\n```bash\npython -m unittest discover -s tests\n```\n",
    "bugtrack_url": null,
    "license": "GPL-3.0",
    "summary": null,
    "version": "0.1.3",
    "project_urls": {
        "Homepage": "https://github.com/Capsize-Games/nullscream"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0d16d99d74817e607e6c15cf0be652647e9182b02d2519b0471af545564ecae0",
                "md5": "4fe1e6c4c2a6207b32ce6ec9c5060ecb",
                "sha256": "dda4bf7887ebb8af29ada7020a418ccc5a29e579781eafc2af881b140ea1c6a2"
            },
            "downloads": -1,
            "filename": "nullscream-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4fe1e6c4c2a6207b32ce6ec9c5060ecb",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10.0",
            "size": 15472,
            "upload_time": "2024-04-25T17:45:23",
            "upload_time_iso_8601": "2024-04-25T17:45:23.004463Z",
            "url": "https://files.pythonhosted.org/packages/0d/16/d99d74817e607e6c15cf0be652647e9182b02d2519b0471af545564ecae0/nullscream-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "09d8d8db9cfd7f0aadd7a448d1a1d8918838a4488954f55f05a5a6a3fd0dfc81",
                "md5": "ae044c1301cbeb29645a0d0c4fe4ef9b",
                "sha256": "5485bac1e227b6860d52c23d73a8224e45c848f49f19b28cafb9d2e641c1e9a1"
            },
            "downloads": -1,
            "filename": "nullscream-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "ae044c1301cbeb29645a0d0c4fe4ef9b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10.0",
            "size": 15285,
            "upload_time": "2024-04-25T17:45:24",
            "upload_time_iso_8601": "2024-04-25T17:45:24.276709Z",
            "url": "https://files.pythonhosted.org/packages/09/d8/d8db9cfd7f0aadd7a448d1a1d8918838a4488954f55f05a5a6a3fd0dfc81/nullscream-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-25 17:45:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Capsize-Games",
    "github_project": "nullscream",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "nullscream"
}
        
Elapsed time: 0.39252s