How to use the pyforest.active_imports function in pyforest

To help you get started, we’ve selected a few pyforest examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github 8080labs / pyforest / tests / test_pyforest.py View on Github external
def test_complementary_import():
    from pyforest import pd, active_imports

    df = pd.DataFrame()
    assert "import pandas_profiling" in active_imports()
github 8080labs / pyforest / tests / test_pyforest.py View on Github external
def test_imports():
    from pyforest import os, pd, Path, active_imports

    os.name
    assert "import os" in active_imports()

    df = pd.DataFrame()
    assert "import pandas as pd" in active_imports()

    Path(".")
    assert "from pathlib import Path" in active_imports()

pyforest

Lazy-import of all popular Python Data Science libraries. Stop writing the same imports over and over again.

MIT
Latest version published 5 months ago

Package Health Score

74 / 100
Full package analysis