# Darkwood Data Python Client


## Installation

You can install the Darkwood Data Python client from [PyPI](https://pypi.org/project/realpython-reader/):

    python -m pip install darkwood

## Setup
    darkwood-data setup configure
This will result in a file at `~/.darkwood/credentials`.

The client is supported on Python 3.6 and above.

## How to use

The Darkwood client can be used as a command line application or as a python package.
The cli is named `darkwood-data`. 

### Calling the linking api

    darkwood-data entity-mapper --transaction "Amazon Tips*1Z3MJ3KL2 Amzn.com/bi WA"


You can also call the Darkwood API in your own Python code, by importing from the `darkwood` package.
If you have configured the host machine using the `darkwood-data cli configure` command use:

    >>> from darkwood.client.call import credit_card_mapper
    >>> credit_card_mapper(transaction="Amazon Tips*1Z3MJ3KL2 Amzn.com/bi WA")

Additionally, you have the option to explicity pass in credentials

    >>> from darkwood.client.call import credit_card_mapper
    >>> credit_card_mapper(transaction="Amazon Tips*1Z3MJ3KL2 Amzn.com/bi WA", creds=<PASTE-YOUR-DARKWOOD-CREDS>)