Skip to main content

A simple, easy to use python wrapper for the Nookipedia API

Project description

AIO-Nookipedia

A simple, all-in-one python wrapper for the Nookipedia API with caching

Nookipedia is a community-driven Animal Crossing wiki. The main page of the Nookipedia wiki can be found here.

Installation

The wrapper can be installed via pip using pip install aio-nookipedia

General Usage:

Every endpoint in the API is accessible through the get functions inside NookClient found in client.py These functions each return an object or list of objects containing all the data stored in the API.

Example Usage:

import asyncio
from aionookipedia.client import NookClient 
        
async def main():
    async with NookClient("YOUR_API_KEY") as client:
        data = await client.getFish('pike')
        print(data.name) # will return "Pike"

asyncio.run(main())

Most attributes (eg. name, species, rarity, etc.) follow the same naming scheme as the API. The only exception to this is the "from" attribute in the Availability object that is stored in items. Since from is a keyword in Python, this can be accessed with .availability.location instead.

async def getFurnitureByLocation(client, location: str):
    data = await getAllFurniture()
    furniture = []
    for x in data:
        if x.availability.location == location.title():
            furniture.append(x)
    return furniture # returns a list of all furniture that is available from the specified location

There is also a custom object called FossilSet that accesses an endpoint containing the FossilGroup objects with their respective fossils. I modified the objects stored here to contain an array of Fossil objects that are identical to the objects at the "Single New Horizons Fossil" endpoint.

For security in your own project, it is best if you use python-dotenv to load your api key, but you can pass the api key into NookClient() manually if you wish.

Requirements

Issues and Feature Requests

If you have any issues using the wrapper, or want to request a new feature, feel free to use the issue system on GitHub

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

aio_nookipedia-0.2.0.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aio_nookipedia-0.2.0-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file aio_nookipedia-0.2.0.tar.gz.

File metadata

  • Download URL: aio_nookipedia-0.2.0.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for aio_nookipedia-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ef3722b2ea6ed83d629cd721edbf7a411aba486e2ba287f265cdbb6b3b2bac2f
MD5 e5b7700ea861479025514e6a50f72c95
BLAKE2b-256 c0896db8d9d45d7e86faddf83a902be708b789e348480735422911e230db2175

See more details on using hashes here.

File details

Details for the file aio_nookipedia-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: aio_nookipedia-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 14.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for aio_nookipedia-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5e787fe3ac8234c95a3a24db76291632754651ca6517c50b30bdcd4f1097f86a
MD5 89ec96b24ce10030a274a3156ec957ab
BLAKE2b-256 4443c60efd53174f96f7d927683f06e244d4289c771ceafe369292ac415688ce

See more details on using hashes here.

Supported by

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