Skip to main content

Guild Wars 2 API Python Wrapper

Project description

Guild Wars 2 API Python Wrapper

Build Status Latest Version Supported Python versions

Installation

  • Pre-requisites: Python >= 3.6
  • Install the package from PyPi directly:
pip install gw2apy

Quickstart

  • Create a client:
from gw2apy.client import Client

client = Client()

You can specify an API key to access authenticated endpoints, such as bank content or wallet:

client = Client(api_key="YOUR_API_KEY")
  • Create an endpoint, e.g. Items:
from gw2apy.endpoints import Items

items_endpoint = Items(client=client)
  • Request data from the endpoint:
# Returns the list of ids for all available items.
items_ids = items_endpoint.endpoint()

# Return the item associated to an id.
item = items_endpoint.id(id=28445)

# Return a list of item given a list of ids.
items = items_endpoint.ids(ids=[28445, 12452])

# Return a list of all the items.
all_items = items_endpoint.all()

Credits

This package is inspired from:

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

gw2apy-0.0.2.tar.gz (12.0 kB view hashes)

Uploaded Source

Built Distribution

gw2apy-0.0.2-py2.py3-none-any.whl (25.3 kB view hashes)

Uploaded Python 2 Python 3

Supported by

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