apiverve-countryboundaries 1.1.14
Country Boundaries is a simple tool for getting the shape of a specific country's border. It returns the shape of the specified country's border.
License: MIT
Requires Python: >=3.7

Country Boundaries API
============

Country Boundaries is a simple tool for getting the shape of a specific country's border. It returns the shape of the specified country's border.

![Build Status](https://img.shields.io/badge/build-passing-green)
![Code Climate](https://img.shields.io/badge/maintainability-B-purple)
![Prod Ready](https://img.shields.io/badge/production-ready-blue)

This is a Python API Wrapper for the [Country Boundaries API](https://apiverve.com/marketplace/countryboundaries?utm_source=pypi&utm_medium=readme)

---

## Installation

Using `pip`:

```bash
pip install apiverve-countryboundaries
```

Using `pip3`:

```bash
pip3 install apiverve-countryboundaries
```

---

## Configuration

Before using the countryboundaries API client, you have to setup your account and obtain your API Key.
You can get it by signing up at [https://apiverve.com](https://apiverve.com?utm_source=pypi&utm_medium=readme)

---

## Quick Start

Here's a simple example to get you started quickly:

```python
from apiverve_countryboundaries.apiClient import CountryboundariesAPIClient

# Initialize the client with your APIVerve API key
api = CountryboundariesAPIClient("[YOUR_API_KEY]")

query = { "country": "CA" }

try:
    # Make the API call
    result = api.execute(query)

    # Print the result
    print(result)
except Exception as e:
    print(f"Error: {e}")
```

---

## Usage

The Country Boundaries API documentation is found here: [https://docs.apiverve.com/ref/countryboundaries](https://docs.apiverve.com/ref/countryboundaries?utm_source=pypi&utm_medium=readme).
You can find parameters, example responses, and status codes documented here.

### Setup

```python
# Import the client module
from apiverve_countryboundaries.apiClient import CountryboundariesAPIClient

# Initialize the client with your APIVerve API key
api = CountryboundariesAPIClient("[YOUR_API_KEY]")
```

---

## Perform Request

Using the API client, you can perform requests to the API.

###### Define Query

```python
query = { "country": "CA" }
```

###### Simple Request

```python
# Make a request to the API
result = api.execute(query)

# Print the result
print(result)
```

###### Example Response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "features": [
      {
        "geometry": {
          "coordinates": [
            [
              [
                [
                  -127.23,
                  50.64
                ],
                [
                  -125.45,
                  50.32
                ],
                [
                  -123.29,
                  48.41
                ],
                [
                  -125.11,
                  48.73
                ],
                [
                  -124.81,
                  49.24
                ],
                [
                  -125.48,
                  48.92
                ],
                [
                  -125.9,
                  49.44
                ],
                [
                  -126.54,
                  49.37
                ],
                [
                  -126.09,
                  49.66
                ],
                [
                  -127.9,
                  50.11
                ],
                [
                  -127.41,
                  50.59
                ],
                [
                  -128.42,
                  50.77
                ],
                [
                  -127.23,
                  50.64
                ]
              ]
            ],
            [
              [
                [
                  -53.76,
                  48.5
                ],
                [
                  -52.98,
                  48.6
                ],
                [
                  -53.95,
                  48.18
                ],
                [
                  -53.55,
                  47.53
                ],
                [
                  -52.83,
                  48.1
                ],
                [
                  -53.27,
                  47.61
                ],
                [
                  -52.61,
                  47.52
                ],
                [
                  -53.1,
                  46.64
                ],
                [
                  -53.62,
                  46.64
                ],
                [
                  -53.59,
                  47.16
                ],
                [
                  -54.19,
                  46.82
                ],
                [
                  -53.87,
                  47.4
                ],
                [
                  -54.2,
                  47.86
                ],
                [
                  -55.69,
                  46.86
                ],
                [
                  -55.98,
                  46.95
                ],
                [
                  -54.94,
                  47.78
                ],
                [
                  -55.59,
                  47.4
                ],
                [
                  -56.17,
                  47.5
                ],
                [
                  -55.77,
                  47.96
                ],
                [
                  -56.84,
                  47.52
                ],
                [
                  -59.41,
                  47.89
                ],
                [
                  -58.42,
                  48.49
                ],
                [
                  -59.26,
                  48.48
                ],
                [
                  -58.4,
                  49.13
                ],
                [
                  -57.88,
                  48.97
                ],
                [
                  -58.22,
                  49.39
                ],
                [
                  -57.7,
                  49.46
                ],
                [
                  -57.38,
                  50.69
                ],
                [
                  -55.9,
                  51.63
                ],
                [
                  -55.41,
                  51.56
                ],
                [
                  -56.09,
                  51.37
                ],
                [
                  -55.73,
                  51.08
                ],
                [
                  -56.85,
                  49.54
                ],
                [
                  -56.15,
                  50.15
                ],
                [
                  -55.49,
                  50.01
                ],
                [
                  -56.13,
                  49.43
                ],
                [
                  -55.14,
                  49.55
                ],
                [
                  -55.38,
                  49.04
                ],
                [
                  -53.78,
                  49.4
                ],
                [
                  -53.49,
                  49.22
                ],
                [
                  -54.1,
                  48.81
                ],
                [
                  -53.76,
                  48.5
                ]
              ],
              [
                [
                  -53.76,
                  48.5
                ],
                [
                  -54.09,
                  48.43
                ],
                [
                  -54.14,
                  48.36
                ],
                [
                  -53.76,
                  48.5
                ]
              ]
            ],
            [
              [
                [
                  -85.48,
                  65.79
                ],
                [
                  -84.92,
                  65.21
                ],
                [
                  -84.44,
                  65.46
                ],
                [
                  -81.76,
                  64.5
                ],
                [
                  -81.99,
                  63.99
                ],
                [
                  -80.17,
                  63.77
                ],
                [
                  -81.08,
                  63.45
                ],
                [
                  -83.07,
                  64.19
                ],
                [
                  -85.27,
                  63.12
                ],
                [
                  -85.72,
                  63.72
                ],
                [
                  -87.19,
                  63.59
                ],
                [
                  -86.19,
                  64.1
                ],
                [
                  -86.1,
                  65.53
                ],
                [
                  -85.48,
                  65.79
                ]
              ]
            ],
            [
              [
                [
                  -95.9,
                  66.95
                ],
                [
                  -95.22,
                  66.97
                ],
                [
                  -95.71,
                  67.73
                ],
                [
                  -95.47,
                  68.06
                ],
                [
                  -93.55,
                  68.59
                ],
                [
                  -93.67,
                  68.97
                ],
                [
                  -94.63,
                  68.76
                ],
                [
                  -94.3,
                  69.3
                ],
                [
                  -93.36,
                  69.37
                ],
                [
                  -96.53,
                  70.13
                ],
                [
                  -95.79,
                  70.54
                ],
                [
                  -96.61,
                  70.79
                ],
                [
                  -96.5,
                  71.28
                ],
                [
                  -94.61,
                  71.86
                ],
                [
                  -95.22,
                  71.94
                ],
                [
                  -93.71,
                  71.76
                ],
                [
                  -92.97,
                  71.34
                ],
                [
                  -93.03,
                  70.85
                ],
                [
                  -91.51,
                  70.17
                ],
                [
                  -92.92,
                  69.67
                ],
                [
                  -90.31,
                  69.45
                ],
                [
                  -91.45,
                  69.35
                ],
                [
                  -90.44,
                  68.87
                ],
                [
                  -90.27,
                  68.24
                ],
                [
                  -89.31,
                  69.25
                ],
                [
                  -88.05,
                  68.82
                ],
                [
                  -87.79,
                  68.33
                ],
                [
                  -88.37,
                  67.96
                ],
                [
                  -87.51,
                  67.11
                ],
                [
                  -86.52,
                  67.35
                ],
                [
                  -85.66,
                  68.73
                ],
                [
                  -84.53,
                  69.02
                ],
                [
                  -85.47,
                  69.27
                ],
                [
                  -85.57,
                  69.86
                ],
                [
                  -82.26,
                  69.64
                ],
                [
                  -83.23,
                  69.54
                ],
                [
                  -81.33,
                  69.18
                ],
                [
                  -82.06,
                  68.87
                ],
                [
                  -81.27,
                  68.63
                ],
                [
                  -82.64,
                  68.5
                ],
                [
                  -81.24,
                  67.47
                ],
                [
                  -81.5,
                  67
                ],
                [
                  -83.4,
                  66.35
                ],
                [
                  -83.92,
                  66.88
                ],
                [
                  -84.27,
                  66.72
                ],
                [
                  -84.37,
                  66.97
                ],
                [
                  -84.92,
                  67.06
                ],
                [
                  -84.64,
                  66.98
                ],
                [
                  -85.23,
                  66.88
                ],
                [
                  -84.6,
                  66.94
                ],
                [
                  -83.69,
                  66.19
                ],
                [
                  -86.78,
                  66.53
                ],
                [
                  -85.9,
                  66.17
                ],
                [
                  -87.4,
                  65.32
                ],
                [
                  -91.43,
                  65.95
                ],
                [
                  -86.93,
                  65.14
                ],
                [
                  -88.11,
                  64.14
                ],
                [
                  -90.12,
                  64.13
                ],
                [
                  -89.81,
                  63.94
                ],
                [
                  -90.28,
                  64
                ],
                [
                  -90.21,
                  63.61
                ],
                [
                  -92.48,
                  63.81
                ],
                [
                  -90.63,
                  63.06
                ],
                [
                  -92.42,
                  62.83
                ],
                [
                  -91.89,
                  62.6
                ],
                [
                  -93.62,
                  61.94
                ],
                [
                  -93.24,
                  61.78
                ],
                [
                  -93.98,
                  61.46
                ],
                [
                  -94.82,
                  59.64
                ],
                [
                  -94.23,
                  58.78
                ],
                [
                  -94.36,
                  58.22
                ],
                [
                  -94.14,
                  58.76
                ],
                [
                  -93.15,
                  58.74
                ],
                [
                  -92.42,
                  57.34
                ],
                [
                  -92.88,
                  56.91
                ],
                [
                  -90.82,
                  57.26
                ],
                [
                  -85.71,
                  55.63
                ],
                [
                  -85.12,
                  55.34
                ],
                [
                  -85.42,
                  54.99
                ],
                [
                  -82.31,
                  55.15
                ],
                [
                  -82.3,
                  53.02
                ],
                [
                  -81.55,
                  52.44
                ],
                [
                  -81.88,
                  52.19
                ],
                [
                  -80.44,
                  51.46
                ],
                [
                  -81.02,
                  51.03
                ],
                [
                  -80.12,
                  51.3
                ],
                [
                  -79.33,
                  50.72
                ],
                [
                  -79.75,
                  51.18
                ],
                [
                  -79.32,
                  51.66
                ],
                [
                  -78.85,
                  51.17
                ],
                [
                  -79.04,
                  51.77
                ],
                [
                  -78.51,
                  52.46
                ],
                [
                  -79.05,
                  54.18
                ],
                [
                  -79.76,
                  54.65
                ],
                [
                  -77.75,
                  55.3
                ],
                [
                  -76.53,
                  56.32
                ],
                [
                  -76.86,
                  57.72
                ],
                [
                  -78.57,
                  58.64
                ],
                [
                  -77.77,
                  59.71
                ],
                [
                  -77.31,
                  59.56
                ],
                [
                  -77.43,
                  59.91
                ],
                [
                  -76.76,
                  60.16
                ],
                [
                  -77.59,
                  60.06
                ],
                [
                  -77.41,
                  60.54
                ],
                [
                  -77.83,
                  60.64
                ],
                [
                  -77.51,
                  60.84
                ],
                [
                  -78.19,
                  60.79
                ],
                [
                  -77.47,
                  61.54
                ],
                [
                  -78.16,
                  62.28
                ],
                [
                  -77.51,
                  62.56
                ],
                [
                  -74.57,
                  62.1
                ],
                [
                  -73.68,
                  62.48
                ],
                [
                  -72.01,
                  61.68
                ],
                [
                  -72.3,
                  61.57
                ],
                [
                  -71.58,
                  61.61
                ],
                [
                  -71.89,
                  61.43
                ],
                [
                  -71.39,
                  61.14
                ],
                [
                  -69.52,
                  61.07
                ],
                [
                  -69.62,
                  60.07
                ],
                [
                  -70.95,
                  60.06
                ],
                [
                  -69.6,
                  59.83
                ],
                [
                  -69.76,
                  59.32
                ],
                [
                  -69.23,
                  59.23
                ],
                [
                  -70.15,
                  58.78
                ],
                [
                  -69.82,
                  58.59
                ],
                [
                  -68.36,
                  58.78
                ],
                [
                  -68.34,
                  58.13
                ],
                [
                  -69.37,
                  57.77
                ],
                [
                  -68.4,
                  58.04
                ],
                [
                  -68,
                  58.58
                ],
                [
                  -68.13,
                  58.07
                ],
                [
                  -67.72,
                  58.46
                ],
                [
                  -67.71,
                  57.92
                ],
                [
                  -66.39,
                  58.85
                ],
                [
                  -66.06,
                  58.32
                ],
                [
                  -65.99,
                  58.9
                ],
                [
                  -65.32,
                  59.04
                ],
                [
                  -65.56,
                  59.49
                ],
                [
                  -64.98,
                  59.38
                ],
                [
                  -65.53,
                  59.72
                ],
                [
                  -64.47,
                  60.28
                ],
                [
                  -64.83,
                  59.99
                ],
                [
                  -64.17,
                  60.02
                ],
                [
                  -63.72,
                  59.51
                ],
                [
                  -64.06,
                  59.38
                ],
                [
                  -63.36,
                  59.2
                ],
                [
                  -64.04,
                  59.02
                ],
                [
                  -62.85,
                  58.69
                ],
                [
                  -63.59,
                  58.3
                ],
                [
                  -62.56,
                  58.48
                ],
                [
                  -63.34,
                  57.98
                ],
                [
                  -62.45,
                  58.18
                ],
                [
                  -62.67,
                  57.93
                ],
                [
                  -61.88,
                  57.63
                ],
                [
                  -62.55,
                  57.5
                ],
                [
                  -61.36,
                  57.09
                ],
                [
                  -61.67,
                  56.62
                ],
                [
                  -62.57,
                  56.79
                ],
                [
                  -60.67,
                  55.59
                ],
                [
                  -60.33,
                  55.78
                ],
                [
                  -60.68,
                  54.99
                ],
                [
                  -59.78,
                  55.33
                ],
                [
                  -59.43,
                  55.14
                ],
                [
                  -59.94,
                  54.75
                ],
                [
                  -59.16,
                  55.24
                ],
                [
                  -59.39,
                  54.98
                ],
                [
                  -57.35,
                  54.58
                ],
                [
                  -60.13,
                  53.53
                ],
                [
                  -60.86,
                  53.79
                ],
                [
                  -60.1,
                  53.5
                ],
                [
                  -60.42,
                  53.27
                ],
                [
                  -57.79,
                  54.07
                ],
                [
                  -58.18,
                  54.24
                ],
                [
                  -57.38,
                  54.15
                ],
                [
                  -57.34,
                  53.44
                ],
                [
                  -56.46,
                  53.78
                ],
                [
                  -55.81,
                  53.34
                ],
                [
                  -56.17,
                  53.03
                ],
                [
                  -55.76,
                  52.61
                ],
                [
                  -56.5,
                  52.59
                ],
                [
                  -55.65,
                  52.44
                ],
                [
                  -56.2,
                  52.44
                ],
                [
                  -55.7,
                  52.08
                ],
                [
                  -56.95,
                  51.42
                ],
                [
                  -58.63,
                  51.28
                ],
                [
                  -60.01,
                  50.25
                ],
                [
                  -66.47,
                  50.26
                ],
                [
                  -67.38,
                  49.33
                ],
                [
                  -69.06,
                  48.77
                ],
                [
                  -71.3,
                  46.74
                ],
                [
                  -68.21,
                  48.64
                ],
                [
                  -65,
                  49.22
                ],
                [
                  -64.22,
                  48.9
                ],
                [
                  -64.55,
                  48.88
                ],
                [
                  -64.25,
                  48.49
                ],
                [
                  -66.84,
                  47.99
                ],
                [
                  -64.8,
                  47.81
                ],
                [
                  -65.37,
                  47.09
                ],
                [
                  -64.8,
                  47.08
                ],
                [
                  -64.5,
                  46.24
                ],
                [
                  -62.46,
                  45.61
                ],
                [
                  -61.92,
                  45.89
                ],
                [
                  -60.96,
                  45.31
                ],
                [
                  -64.2,
                  44.58
                ],
                [
                  -65.48,
                  43.46
                ],
                [
                  -66.17,
                  43.86
                ],
                [
                  -65.84,
                  44.58
                ],
                [
                  -66.19,
                  44.42
                ],
                [
                  -64.49,
                  45.34
                ],
                [
                  -64.16,
                  44.98
                ],
                [
                  -63.36,
                  45.36
                ],
                [
                  -64.94,
                  45.33
                ],
                [
                  -64.28,
                  45.8
                ],
                [
                  -64.75,
                  46.09
                ],
                [
                  -64.78,
                  45.61
                ],
                [
                  -67.21,
                  45.18
                ],
                [
                  -67.8,
                  45.7
                ],
                [
                  -67.79,
                  47.07
                ],
                [
                  -69.23,
                  47.47
                ],
                [
                  -70.88,
                  45.24
                ],
                [
                  -74.99,
                  44.99
                ],
                [
                  -76.8,
                  43.63
                ],
                [
                  -78.72,
                  43.63
                ],
                [
                  -79.18,
                  43.47
                ],
                [
                  -78.99,
                  42.82
                ],
                [
                  -82.7,
                  41.68
                ],
                [
                  -83.17,
                  42.05
                ],
                [
                  -82.13,
                  43.59
                ],
                [
                  -82.54,
                  45.36
                ],
                [
                  -84.13,
                  46.53
                ],
                [
                  -88.37,
                  48.31
                ],
                [
                  -91.42,
                  48.04
                ],
                [
                  -94.61,
                  48.72
                ],
                [
                  -95.08,
                  49.36
                ],
                [
                  -95.15,
                  49
                ],
                [
                  -122.76,
                  49
                ],
                [
                  -123.21,
                  49.13
                ],
                [
                  -122.85,
                  49.44
                ],
                [
                  -123.24,
                  49.34
                ],
                [
                  -123.16,
                  49.7
                ],
                [
                  -123.96,
                  49.51
                ],
                [
                  -123.53,
                  49.7
                ],
                [
                  -123.83,
                  50.16
                ],
                [
                  -123.98,
                  49.8
                ],
                [
                  -124.77,
                  49.99
                ],
                [
                  -124.35,
                  50.5
                ],
                [
                  -125.08,
                  50.32
                ],
                [
                  -124.81,
                  50.92
                ],
                [
                  -125.71,
                  50.43
                ],
                [
                  -126.27,
                  50.63
                ],
                [
                  -125.62,
                  50.75
                ],
                [
                  -125.63,
                  51.1
                ],
                [
                  -126.13,
                  50.68
                ],
                [
                  -126.56,
                  50.84
                ],
                [
                  -126.18,
                  50.95
                ],
                [
                  -127.18,
                  50.93
                ],
                [
                  -127.03,
                  50.82
                ],
                [
                  -127.54,
                  51.01
                ],
                [
                  -126.66,
                  51.19
                ],
                [
                  -127.79,
                  51.17
                ],
                [
                  -126.62,
                  51.68
                ],
                [
                  -127.88,
                  51.67
                ],
                [
                  -127.17,
                  52.31
                ],
                [
                  -126.67,
                  51.98
                ],
                [
                  -126.73,
                  52.37
                ],
                [
                  -127.19,
                  52.38
                ],
                [
                  -127.02,
                  52.85
                ],
                [
                  -128.39,
                  52.29
                ],
                [
                  -128.13,
                  52.88
                ],
                [
                  -128.97,
                  53.55
                ],
                [
                  -127.87,
                  53.24
                ],
                [
                  -128.81,
                  53.62
                ],
                [
                  -128.6,
                  54.03
                ],
                [
                  -129.27,
                  53.38
                ],
                [
                  -130.05,
                  53.89
                ],
                [
                  -129.47,
                  54.24
                ],
                [
                  -130.48,
                  54.36
                ],
                [
                  -129.96,
                  54.32
                ],
                [
                  -130.37,
                  54.65
                ],
                [
                  -129.91,
                  54.61
                ],
                [
                  -130.17,
                  54.85
                ],
                [
                  -129.47,
                  55.47
                ],
                [
                  -130.11,
                  55
                ],
                [
                  -130.16,
                  55.09
                ],
                [
                  -129.94,
                  55.28
                ],
                [
                  -130.1,
                  55.56
                ],
                [
                  -130.13,
                  55.72
                ],
                [
                  -130.02,
                  55.91
                ],
                [
                  -131.82,
                  56.6
                ],
                [
                  -133.43,
                  58.46
                ],
                [
                  -135.47,
                  59.8
                ],
                [
                  -137.48,
                  58.91
                ],
                [
                  -139.07,
                  60.35
                ],
                [
                  -141,
                  60.31
                ],
                [
                  -141,
                  69.64
                ],
                [
                  -134.31,
                  68.68
                ],
                [
                  -134.55,
                  69.09
                ],
                [
                  -132.89,
                  69.65
                ],
                [
                  -129.4,
                  70.12
                ],
                [
                  -133.49,
                  68.83
                ],
                [
                  -132.92,
                  68.69
                ],
                [
                  -133.35,
                  68.83
                ],
                [
                  -127.52,
                  70.22
                ],
                [
                  -128,
                  70.59
                ],
                [
                  -125.43,
                  69.31
                ],
                [
                  -124.82,
                  69.71
                ],
                [
                  -125.2,
                  70
                ],
                [
                  -124.44,
                  70.15
                ],
                [
                  -124.5,
                  69.73
                ],
                [
                  -124.04,
                  69.7
                ],
                [
                  -124.45,
                  69.37
                ],
                [
                  -121.68,
                  69.79
                ],
                [
                  -114.07,
                  68.48
                ],
                [
                  -115.54,
                  67.92
                ],
                [
                  -115.1,
                  67.8
                ],
                [
                  -110.08,
                  68.01
                ],
                [
                  -108.02,
                  67.29
                ],
                [
                  -108.62,
                  67.15
                ],
                [
                  -107.25,
                  66.35
                ],
                [
                  -107.75,
                  66.92
                ],
                [
                  -107.08,
                  66.82
                ],
                [
                  -107.89,
                  68.08
                ],
                [
                  -106.43,
                  68.15
                ],
                [
                  -106.47,
                  68.34
                ],
                [
                  -105.74,
                  68.42
                ],
                [
                  -105.64,
                  68.63
                ],
                [
                  -106.54,
                  68.51
                ],
                [
                  -106.54,
                  68.29
                ],
                [
                  -107.89,
                  68.27
                ],
                [
                  -107.6,
                  68.17
                ],
                [
                  -108.82,
                  68.27
                ],
                [
                  -106.23,
                  68.94
                ],
                [
                  -105.49,
                  68.73
                ],
                [
                  -105.54,
                  68.41
                ],
                [
                  -104.61,
                  68.24
                ],
                [
                  -104.5,
                  68.03
                ],
                [
                  -102.25,
                  67.73