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!
The games supported in Open Data are:
Usage
To import the module use:
import ninjakiwi_api
installation
To get the latest release use:
$ python -m pip install --upgrade ninjakiwi-api
Alternative installation
To get the latest release via a tarball use:
To check which version the library is on go to Releases and search for releases!
$ python -m pip install --upgrade https://github.com/GustavoSchip/NinjaKiwi-API/releases/download/v{VERSION-NUMBER-HERE}/ninjakiwi_api-{VERSION-NUMBER-HERE}.tar.gz
To get the latest pre-release via a tarball use:
To check which version the library (dev) is on go to Releases and search for pre-releases!
$ python -m pip install --upgrade --pre https://github.com/GustavoSchip/NinjaKiwi-API/releases/download/v{VERSION-NUMBER-HERE}-dev/ninjakiwi_api-{VERSION-NUMBER-HERE}.tar.gz
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()
Documentation
The documentation is available on the project its Wiki!
Additional info
Metadata
Release files for ninjakiwi-api 1.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ninjakiwi_api-1.3.2.tar.gz | 11.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ninjakiwi_api-1.3.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.0 kB
Release files / ninjakiwi_api-1.3.2.tar.gz
| Download URL | ninjakiwi_api-1.3.2.tar.gz |
|---|---|
| Size | 11.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3aa9c0bfe7b15ca5f5a49105d29adced3d149fad19f3a025d3581d585b9280aa
|
|
BLAKE2b-256 checksum How to use checksums |
02d2e55e3ef59a75429752169079cd5ddd5f97d3c671bc55ca2629022a2c362d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Release files / ninjakiwi_api-1.3.2-py3-none-any.whl
| Download URL | ninjakiwi_api-1.3.2-py3-none-any.whl |
|---|---|
| Size | 12.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
daf47e9e5644fd86791657bae949275a3b0d16bee41e86e8933130d5c93d9439
|
|
BLAKE2b-256 checksum How to use checksums |
a3370e437fa0ec5c338f739b861d274b862d70686202ff15bd76ac7127e977c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Security for ninjakiwi-api 1.3.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.