Metadata-Version: 2.3
Name: pi-downloader
Version: 0.1.11
Summary: 
Author: Lei Ma
Author-email: lei.ma@orioncarbons.com
Requires-Python: >=3.10,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: boto3 (>=1.34.132,<2.0.0)
Requires-Dist: click (>=8.1.7,<9.0.0)
Requires-Dist: loguru (>=0.7.2,<0.8.0)
Requires-Dist: orjsonl (>=1.0.0,<2.0.0)
Requires-Dist: pandas (>=2.2.2,<3.0.0)
Requires-Dist: python-dateutil (>=2.9.0.post0,<3.0.0)
Requires-Dist: pyyaml (>=6.0.3,<7.0.0)
Requires-Dist: requests (>=2.32.3,<3.0.0)
Requires-Dist: tqdm (>=4.66.5,<5.0.0)
Description-Content-Type: text/markdown

Download PI data in batch.

## Usage

- Install the requirements: `poetry install`
- Prepare a config, e.g., `config/config.json`
- Run the command, e.g., `poetry run pi download --config-path configs/config.json`

Additional dependencies due to windows compatibility:
- Please follow this to install the related packages for linux: https://pypi.org/project/requests-kerberos/
    - e.g., `apt-get install gcc python3-dev libkrb5-dev`

## Dev


Create a file named `.env`

```
AWS_PROFILE="[YOUR_AWS_PROFILE]"

AWS_ACCESS_KEY_ID='testing'
AWS_SECRET_ACCESS_KEY='testing'
AWS_SECURITY_TOKEN='testing'
AWS_SESSION_TOKEN='testing'
AWS_DEFAULT_REGION='us-east-1'
```

## Publish

Log in to aws codeartifact:

```
aws codeartifact login --tool pip --repository [YOUR_REPO] --domain [YOUR_DOMAIN] --domain-owner [ID] --region eu-west-1
```

1. Build the package using `poetry build`
2. Publish using twine: `twine upload dist/* `
    1. Use the instructions at the codeartifact repository `[YOUR REPO]` on aws.
    2. For example, use this: `twine upload --repository codeartifact dist/*   `


## FAQ

### I use pipx to install this package, but it says request_kerberos is not installed.

Use the `inject` command to install the `requests-kerberos` dependency:

```bash
pipx inject pi-downloader requests-kerberos
```
