Metadata-Version: 2.1
Name: jais-search
Version: 0.1.2
Summary: 
Home-page: https://github.com/busla/jais-cli
Author: Jón Levy
Author-email: jon.levy@pm.me
Requires-Python: >=3.10,<=3.12
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: httpx (>=0.24.0,<0.25.0)
Requires-Dist: pydantic (>=1.10.7,<2.0.0)
Requires-Dist: typer[all] (>=0.9.0,<0.10.0)
Project-URL: Repository, https://github.com/busla/jais-cli
Description-Content-Type: text/markdown

# Simple cli client for ja.is

Personal tool that is probably not useful for anyone else

## Install

```bash
pip install jais-search
```

## Play around

Start by exporting your api token

```bash
export JAIS_API_KEY=your-token
```

Alternatively you can always pass it as an argument to each command, but that's just boring

```bash
jais search --token your-token -n "some company name"
```

Only one command is available, that is `search`, but comes with multiple search filter options.

```bash
jais search --help
```

### Search examples

```bash
jais search -n "Banana"
jais search -p 105 # postal code
jais search -s  Suðurlandsbraut # street
jais search -m  Reykjavík # municipality
jais search -b  E1 # business type, I have no idea what codes are available.
```

Or just pass them all in if you want

```bash
jais search -n "Banana" -p 105 -s  Suðurlandsbraut -m  Reykjavík municipality -b  E1
```

It will store results in `test.csv`, until I make it configurable and fix the dict serialization.

The https://ja.is api paginates the data so you have to pass in `--start [default: 1]` and `--count [default: 1000]`, but it comes with defaults.

```bash
# Get me 50 records and start at record 1000
jais search -n "Banana" --start 1000 --count 50
```

