pyxivapi
An asynchronous Python client for XIVAPI
Requirements
python>=3.6.0
asyncio
aiohttp
Installation
pip install pyxivapi
Supported API end points
- /character/search
- /character/id
- /freecompany/search
- /freecompany/id
- /linkshell/search
- /linkshell/id
- /pvpteam/search
- /pvpteam/id
- /index/search (e.g. recipe, item, action, pvpaction, mount, e.t.c.)
- /index/id
- /lore/search
- /lodestone/worldstatus
Documentation
Example
import asyncio
import logging
import aiohttp
import pyxivapi
from pyxivapi.models import Filter, Sort
async def fetch_example_results():
client = pyxivapi.XIVAPIClient(api_key="your_key_here")
# Search Lodestone for a character
character = await client.character_search(
world="odin",
forename="lethys",
surname="lightpaw"
)
# Get a character by Lodestone ID with extended data & include their Free Company information, if it has been synced.
character = await client.character_by_id(
lodestone_id=8255311,
extended=True,
include_freecompany=True
)
# Search Lodestone for a free company
freecompany = await client.freecompany_search(
world="gilgamesh",
name="Elysium"
)
# Item search with paging
item = await client.index_search(
name="Eden",
indexes=["Item"],
columns=["ID", "Name"],
filters=[
Filter("LevelItem", "gt", 520)
],
sort=Sort("LevelItem", False),
page=0,
per_page=10
)
# Fuzzy search XIVAPI game data for a recipe by name. Results will be in English.
recipe = await client.index_search(
name="Crimson Cider",
indexes=["Recipe"],
columns=["ID", "Name", "Icon", "ItemResult.Description"]
)
# Fuzzy search XIVAPI game data for a recipe by name. Results will be in French.
recipe = await client.index_search(
name="Cidre carmin",
indexes=["Recipe"],
columns=["ID", "Name", "Icon", "ItemResult.Description"],
language="fr"
)
# Get an item by its ID (Omega Rod) and return the data in German
item = await client.index_by_id(
index="Item",
content_id=23575,
columns=["ID", "Name", "Icon", "ItemUICategory.Name"],
language="de"
)
filters = [
Filter("ClassJobLevel", "gte", 0)
]
# Get non-npc actions matching a given term (Defiance)
action = await client.index_search(
name="Defiance",
indexes=["Action", "PvPAction", "CraftAction"],
columns=["ID", "Name", "Icon", "Description", "ClassJobCategory.Name", "ClassJobLevel", "ActionCategory.Name"],
filters=filters,
string_algo="match"
)
# Search ingame data for matches against a given query. Includes item, minion, mount & achievement descriptions, quest dialog & more.
lore = await client.lore_search(
query="Shiva",
language="fr"
)
# Search for an item using specific filters
filters = [
Filter("LevelItem", "gte", 100)
]
sort = Sort("LevelItem", True)
item = await client.index_search(
name="Omega Rod",
indexes=["Item"],
columns=["ID", "Name", "Icon", "Description", "LevelItem"],
filters=filters,
sort=sort,
language="de"
)
await client.session.close()
if __name__ == '__main__':
logging.basicConfig(level=logging.INFO, format='%(message)s', datefmt='%H:%M')
loop = asyncio.get_event_loop()
loop.run_until_complete(fetch_example_results())
Metadata
Release files for pyxivapi 0.5.1
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 | Actions |
|---|---|---|---|---|
| pyxivapi-0.5.1.tar.gz | 8.5 kB | Without provenance | Details for pyxivapi-0.5.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyxivapi-0.5.1-py3-none-any.whl | Python 3 | none | any | Details for pyxivapi-0.5.1-py3-none-any.whl |
Total release size: 17.0 kB
Release files / pyxivapi-0.5.1.tar.gz
| Download URL | pyxivapi-0.5.1.tar.gz |
|---|---|
| Size | 8.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3b9135fa6042cd31193ea76f4e2cbc55d189375cea78fbfedd8255a2dc5de662
|
|
BLAKE2b-256 checksum How to use checksums |
f389ee60e97c68af6112ed19e9df13793050fc35eadce7d834dfe8d0c5fec4e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1
|
Release files / pyxivapi-0.5.1-py3-none-any.whl
| Download URL | pyxivapi-0.5.1-py3-none-any.whl |
|---|---|
| Size | 8.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
90da2ec1810eea060be624a8fefa098fdc1ce54fd5f37117ceb30eea9d3c5733
|
|
BLAKE2b-256 checksum How to use checksums |
7f9ecf99a2d6063001554e03d55e83a2e00253c7429704b23d471ff3aa9deb0d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1
|
Security for pyxivapi 0.5.1
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.