Metadata-Version: 2.2
Name: insider_scripts
Version: 1.0.0
Summary: Run python scripts from inside a package without relative import error.
Author-email: Sébastien Gachoud <sebastien.gachoud@gmail.com>
Maintainer: Sébastien Gachoud
Maintainer-email: sebastien.gachoud@gmail.com
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: requests
Dynamic: maintainer
Dynamic: maintainer-email

# Insider Scripts

## Purpose

Run python scripts from inside a package without relative import error.

## Installation

```
pip install insider_scripts
```

## Usage

Import the function define script from the insider_scripts and call it with either the depth of the script in the package, or the path of the package root.

### Example layout

```
your_package/
|-- A_folder/
|   ├── A.py
|   └── script.py
|-- B_folder/
|   └── B.py
```

### Example script:\n"

```python
from pathlib import Path
from insider_scripts import define_script
define_script(1) # or define_script(Path(__file__).parent.parent) or define_script(-1)

from .A import A
from ..B_folder.B import B
```
