Metadata-Version: 2.0
Name: directory-api-client
Version: 9.14.0
Summary: Python client for Directory API.
Home-page: https://github.com/uktrade/directory-api-client
Author: Department for International Trade
Author-email: UNKNOWN
License: MIT
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Framework :: Django :: 1.11
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: certifi (==2018.1.18)
Requires-Dist: chardet (==3.0.4)
Requires-Dist: directory-client-core (==0.1.0)
Requires-Dist: django (==1.11.5)
Requires-Dist: djangorestframework (==3.4.7)
Requires-Dist: idna (==2.6)
Requires-Dist: mohawk (==0.3.4)
Requires-Dist: monotonic (==1.2)
Requires-Dist: pkginfo (==1.4.1)
Requires-Dist: pytz (==2017.2)
Requires-Dist: requests (==2.18.4)
Requires-Dist: requests-toolbelt (==0.8.0)
Requires-Dist: sigauth (==2.1.0)
Requires-Dist: six (==1.11.0)
Requires-Dist: tqdm (==4.19.6)
Requires-Dist: twine (==1.9.1)
Requires-Dist: urllib3 (==1.22)

# directory-api-client

[![code-climate-image]][code-climate]
[![circle-ci-image]][circle-ci]
[![codecov-image]][codecov]
[![gemnasium-image]][gemnasium]

**Export Directory internal API client.**

---

## Requirements

## Installation

```shell
pip install -e git+https://git@github.com/uktrade/directory-api-client.git@0.0.2#egg=directory-api-client
```

## Usage

```python
from directory_api_client.client import DirectoryAPIClient

directory_client = DirectoryAPIClient(
    base_url="https://api.directory.exportingisgreat.gov.uk",
    api_key=api_key
)
```

### Send registration form

```python
directory_client.enrolment.send_form(
    form_data=form_data
)
```

### Confirm registration email

```python
directory_client.registration.confirm_email(
    confirmation_code=confirmation_code,
)
```

## Development

    $ git clone https://github.com/uktrade/directory-api-client
    $ cd directory-api-client

## Publish to PyPI

The package should be published to PyPI on merge to master. If you need to do it locally then get the credentials from rattic and add the environment variables to your host machine:

| Setting                     |
| --------------------------- |
| DIRECTORY_PYPI_USERNAME     |
| DIRECTORY_PYPI_PASSWORD     |


Then run the following command:

    make publish


[code-climate-image]: https://codeclimate.com/github/uktrade/directory-api-client/badges/issue_count.svg
[code-climate]: https://codeclimate.com/github/uktrade/directory-api-client

[circle-ci-image]: https://circleci.com/gh/uktrade/directory-api-client/tree/master.svg?style=svg
[circle-ci]: https://circleci.com/gh/uktrade/directory-api-client/tree/master

[codecov-image]: https://codecov.io/gh/uktrade/directory-api-client/branch/master/graph/badge.svg
[codecov]: https://codecov.io/gh/uktrade/directory-api-client

[gemnasium-image]: https://gemnasium.com/badges/github.com/uktrade/directory-api-client.svg
[gemnasium]: https://gemnasium.com/github.com/uktrade/directory-api-client


