Commit c3b5eb25 authored by Ibrahim Ahmed's avatar Ibrahim Ahmed
Browse files

Add README.md

parent 6be9acc6
Loading
Loading
Loading
Loading

README.md

0 → 100644
+42 −0
Original line number Diff line number Diff line
# BDX

Python package/script for downloading trends from Building Logix Data Exchange (BDX).

## Usage

### Command line

```
python -m bdx user password trend start end file

python -m bdx harrypotter wing@rd1umLeviosa 2422 2020-02-03T15:00Z-6 2020-02-04T16:00Z-6 ~/data.csv
```

If `file` is not provided, output is printed to `STDOUT` and can be piped elsewhere.

Dates should be in the ISO8601 format `yyyy-mm-ddThh:mm:ssZ`, `yyyymmddThhmmssZ` etc. 

### Python

```
from bdx import get_trend
from datetime import datetime, timezone, timedelta

tz_central = timezone(offset=-timedelta(hours=6)
start = datetime(2020,2,3,15,0,0, tz_info=tz_central)
end = datetime(2020,2,4,16,0,0, tz_info=tz_central)

dataframe = get_trend(trend_id='2422',
                      username='harrypotter',
                      password,
                      start=start,
                      end=end)
```

## Requirements

```
dateutil >= 2.8
pandas >= 0.25
requests >= 2.22.0
```
 No newline at end of file