Skip to main content

NinjaKiwi API (Open Data) for Python! (My first library)

Project description


NinjaKiwi API

Release Status


This project was born because of the need of an API wrapper for the NinjaKiwi API. (A.K.A. Open Data)
Do note that this is my first ever library and I still have a lot to learn!

Usage

To import the module use:

import ninjakiwi_api

All the functions, models/classes and attributes are as followed:

"""
TODO
"""

Example

In this example we make a request to the api and we want the value of id.

import asyncio
from ninjakiwi_api import fetch


async def start():
    data = await fetch("BTD6", "races")
    if data is not None:
        raw = await data.get_raw_data()
        example = await data.get_data("id")
        print(f"Successfully fetched race data: {raw}")
        if example is not None:
            print(f"Successfully fetched race data: {example}")
    else:
        print("Failed to fetch race data.")


def main():
    asyncio.run(start())


if __name__ == "__main__":
    main()

Additional info

LICENSE
CONTRIBUTING


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

ninjakiwi_api-0.0.13.tar.gz (7.0 kB view hashes)

Uploaded Source

Built Distribution

ninjakiwi_api-0.0.13-py3-none-any.whl (9.9 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