Skip to main content

This package enables you receive BMRS data as json instead of the default XML

Project description

bmrs-json-api

For returning BMRS API data in json format, it fetches data and auto converts it to a dictionary object, easier for data processing.

Installation

Use the package manager pip to install bmrs-json-api.

pip install bmrs

Example Usage

'''This could be your example consumer file from which you will receive and process the API responses'''
import bmrs


def on_message(json_response):
    '''Receive a JSON reponse and do stuff with it'''
    print(list(json_response.keys()))
    # print(json_response)

# connect to the bmrs API using your credentials
bmrs.connect_to_api(
        api_key = 'YOUR API KEY HERE',
        client_id = YOUR_CLIENT_ID_HERE,
        listener=on_message # mention the name of your main data recieving function s a parameter
    )

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to contribute. Please make sure to update tests as appropriate. Also, add your name to the readme in the Contributors section (below).

Contributors and acknowledgment

  1. Edison Abahurire simicode

License

MIT

Packaged with: Flit

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bmrs-1.2.2.tar.gz (3.4 kB view hashes)

Uploaded Source

Built Distribution

bmrs-1.2.2-py3-none-any.whl (5.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page