Metadata-Version: 2.4
Name: ideas-python
Version: 1.0.0
Summary: IDEAS Python library and CLI
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: click==8.1.3
Requires-Dist: docker==7.1.0
Requires-Dist: pycognito==2022.12.0
Requires-Dist: pyotp==2.9.0
Requires-Dist: requests==2.28.2
Requires-Dist: sentry-sdk==1.24.0
Requires-Dist: tree-sitter==0.24.0
Requires-Dist: tree-sitter-bash==v0.23.3
Requires-Dist: tree-sitter-python==0.23.6
Requires-Dist: humanize==4.12.3
Requires-Dist: rich==14.1.0
Requires-Dist: questionary==2.1.1
Requires-Dist: jsonschema==4.25.1
Requires-Dist: pywin32==311; platform_system == "Windows"
Provides-Extra: dev
Requires-Dist: pre-commit; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: pytest-mock; extra == "dev"
Requires-Dist: pytest-order; extra == "dev"
Requires-Dist: pytest-watch; extra == "dev"
Requires-Dist: ruff==0.11.4; extra == "dev"
Provides-Extra: docs
Requires-Dist: git-cliff; extra == "docs"
Requires-Dist: mkdocs; extra == "docs"
Requires-Dist: mkdocs-click; extra == "docs"
Requires-Dist: griffe2md; extra == "docs"
Provides-Extra: dist
Requires-Dist: build; extra == "dist"
Requires-Dist: twine; extra == "dist"
Provides-Extra: analysis
Requires-Dist: beartype; extra == "analysis"
Requires-Dist: isx; extra == "analysis"
Requires-Dist: numpy; extra == "analysis"
Requires-Dist: pandas; extra == "analysis"
Requires-Dist: scipy; extra == "analysis"
Requires-Dist: scikit-image; extra == "analysis"
Requires-Dist: opencv-python; extra == "analysis"
Requires-Dist: matplotlib; extra == "analysis"
Requires-Dist: seaborn; extra == "analysis"

# IDEAS Python

This package provides a python API and a CLI to interact with the [IDEAS platform](https://inscopix.cloud/).

1. [Installation](#installation)
2. [Running](#running)
3. [Configuration](#configuration)
    * [With config file](#configuring-with-config-file)
    * [Through arguments](#configuring-through-arguments)

---

## Installation

Requirements:
- `python >= 3.11`

### Installing

The recommended way to install IDEAS Python is with [pip](https://pip.pypa.io/en/stable/) in a virtualenv:

```shell
python3 -m venv venv
pip install ideas-python
```

### Running

Installing adds the `ideas` command to the virtualenv. You can either run it directly from the
virtualenv with `venv/bin/ideas`, or symlink it to a directory in your shell's `PATH` variable:

```bash
# by activating the virtualenv
source venv/bin/activate
# OR, manually
ln -sf $(pwd)/venv/bin/ideas ~/.local/bin/ideas
```

**Note on Windows**: For windows, run these commands instead in a [git-bash](https://git-scm.com/downloads) to make `ideas` available in your path:

```bash
mkdir -p ~/.local/bin && touch ~/.bash_profile && echo 'export PATH="$PATH:$HOME/.local/bin"' >> ~/.bash_profile && source ~/.bash_profile
ln -sf $(pwd)/venv/Scripts/ideas.exe ~/.local/bin/ideas.exe
```

Now you can run the CLI directly:
```bash
ideas
```

## Configuration

As `ideas` interfaces with the IDEAS platform, it must authenticate, and we provide two ways to
do so: through CLI parameters (like `--username`), or through a configuration wizard.

### Configuration wizard

`ideas` offers a handy shortcut to edit your configuration interactively:

```bash
ideas configure
```

You will be asked for:
- Which region are you in: this corresponds to which region you specified as your home region when you signed up for your IDEAS account.
- Your credentials: use the email address and password you sign into IDEAS with.
- [Optional] You may be asked which tenant you would like to use, if you belong to multiple tenants.

You may call `ideas configure` again at any point to change these values.

### Configuring and using profiles

It is possible also to configure multiple profiles, with arbitrary names. This could be for accessing different regions, using separate accounts, or selecting another tenant ID.

```bash
ideas configure --profile us
ideas configure --profile jp
```

A given profile can then be used by specifying the profile:

```commandline
ideas --profile jp tenants
```

### Configuring through arguments

Alternatively, you can configure `ideas` through arguments. If no configuration file exists,
`ideas` will exclusively use arguments. If you have a configuration file, these arguments will
override the file:

| CLI argument     | Config file name | Description                                                                                 |
|------------------|------------------|---------------------------------------------------------------------------------------------|
| `-e/--env`       | `env`            | Which environment to use. List supported environments with `ideas environments`.        |
| `-u/--username`  | `username`       | Your IDEAS username/email address.                                                          |
| `-p/--password`  | `password`       | The password you log into IDEAS with.                                                       |
| `-t/--tenant-id` | `tenant_id`      | The numerical ID of the tenant you want to use. List your tenants with `ideas tenants`. |
