readme updates

This commit is contained in:
Pablo Martin 2024-06-12 18:07:27 +02:00
parent e3ec041922
commit e1bcdb1309

View file

@ -38,18 +38,36 @@ To be able to write rates into the DWH, take these points into consideration:
Remember to activate the project virtual environment. Remember to activate the project virtual environment.
You can use `xexe` to get rates and store them locally like this: You can use `xexe` to get rates and store them locally as a `.csv` file like this:
```bash ```bash
xexe get-rates --start-date "2024-01-01" --end-date "2024-01-10" --output my_rates.csv xexe get-rates --start-date "2024-01-01" --end-date "2024-01-10" --output my_rates.csv
``` ```
By default, `xexe` runs against a mock rate generator. To get real rates from xe.com, you need to specify the `--rates-source` to `xe` like this:
```bash
xexe get-rates --rates-source xe --output my_xe_rates.csv
```
You can also be explicit about wanting mock rates like this:
```bash
xexe get-rates --rates-source mock --output my_mock_rates.csv
```
If you want to point writing to the DWH instead of a local file. If you want to point writing to the DWH instead of a local file.
```bash ```bash
xexe get-rates --output dwh xexe get-rates --output dwh
``` ```
If you don't want to write the rates anywhere, activate the `--dry-run` flag. You still need to specify some output.
```bash
xexe get-rates --dry-run --output my_rates.csv
```
You can also run without specifying dates. Not specifying `end-date` will get rates up to today. Not specifying `start-date` will get dates up to last week. You can also run without specifying dates. Not specifying `end-date` will get rates up to today. Not specifying `start-date` will get dates up to last week.
```bash ```bash
@ -63,7 +81,7 @@ xexe get-rates --output my_rates.csv
xexe get-rates --currencies USD,EUR,GBP --output my_rates.csv xexe get-rates --currencies USD,EUR,GBP --output my_rates.csv
``` ```
The output file will follow this schema: The output file for `.csv` outputs will follow this schema:
- `date` - `date`
- `from_currency` - `from_currency`
@ -76,7 +94,7 @@ The file will contain all the combinations of the different currencies and dates
This is better understood with an example. Find below a real call and its real CSV output: This is better understood with an example. Find below a real call and its real CSV output:
```bash ```bash
xexe get-rates --start-date 2024-01-01 --end-date 2024-01-03 --currencies EUR,USD,GBP --output file.csv --ignore-warnings xexe get-rates --start-date 2024-01-01 --end-date 2024-01-03 --rates-source xe --currencies EUR,USD,GBP --output file.csv
``` ```
```csv ```csv