semvec/pypi-packages huggingface dataset:
statsnz 1.0.7
A collection of functions to enable ease of use of the various Stats NZ APIs
License: MIT

# statsnz

A collection of functions to enable ease of use of the various Stats New Zealand APIs, in python.

Installion:

  pip install statsnz



Examples:


Geocoding:


  To get the region with a set of coordinates:

    from statsnz import statsnz

    region_example = statsnz("YOUR_API_KEY").get_region(-41.242,172.323)


  Or TLA:

    region_example = statsnz("YOUR_API_KEY").get_tla(-41.242,172.323)

  Or DHB:

      region_example = statsnz("YOUR_API_KEY").get_dhb(-41.242,172.323)



  Or a custom layer:

    region_example = statsnz("YOUR_API_KEY").get_custom(-41.242,172.323)


Odata API:


    from statsnz import statsnz

    statsnz = statsnz("YOUR_API_KEY")
    service = 'https://api.stats.govt.nz/opendata/v1'
    endpoint = 'EmploymentIndicators'
    entity = 'Resources'
    query_option = "10" ##Top 10 records



    Observations = statsnz.get_odata_api(service, endpoint, entity, query_option)
ndd-rest-tools 1.0.6
A group of tools for Restful API
License: MIT
Requires Python: <4,>=3.0.*

# Usage
  > json_config_file_path = "/path/to/file/json"  
  > client = ApiClient(json_config_file_path)   
  > data = client.make_request('example1')   
  >  

# JSON Format
```yaml
{  
  "name": "api endpoints",  
  "description": "hello",  
  "config": {    
    "example1": {  
      "method": "GET",  
      "url": "https://gorest.co.in/public/v1/users",  
      "header": {  
        "Content-Type": "application/json"  
      },  
      "parameters": {  
        "hello": "world"  
      },  
      "save_response": false  
    }  
  }  
}