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
- Python >= 3.13.7
- aiohttp-client-cache
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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aio_nookipedia-0.1.9.tar.gz.
File metadata
- Download URL: aio_nookipedia-0.1.9.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af77d6e077dc185dccc5949edcda7372bec70629de238803ec21c244612d1b49
|
|
| MD5 |
35d56b397727a8c9d1ddccd2230683da
|
|
| BLAKE2b-256 |
2b401890e7ed3fd4713e26554c212f98e229d9d35af854a92cee96e455848ff2
|
File details
Details for the file aio_nookipedia-0.1.9-py3-none-any.whl.
File metadata
- Download URL: aio_nookipedia-0.1.9-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df384d5edfb3a7843711360463e142ddb75041f4940cc833d8a7a695a78203f5
|
|
| MD5 |
8f45dd4b1287dfe9ec657f6e8e6af848
|
|
| BLAKE2b-256 |
add3a30000887605b9e617dcdcd081fe7e087a4fb3546e7d32735e458735a0c1
|