NinjaKiwi API (Open Data) for Python! (My first library)
Project description
NinjaKiwi API
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
Project details
Release history Release notifications | RSS feed
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.16.tar.gz
(8.3 kB
view hashes)
Built Distribution
Close
Hashes for ninjakiwi_api-0.0.16-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24707a128066b3ac7b0d542b9f2d64f99d958ff722b5f7aaa70783e89ee56666 |
|
MD5 | 3187e10db363729c752c7ff2a5f674c4 |
|
BLAKE2b-256 | de5a876289dfd3f99e903f1d35d75118d9d59931029734b9dee6ce186cd0a7d4 |