Skip to main content

Guild Wars 2 API client for Python.

Project description

Guild Wars 2 API client for Python.

Installation

pip install gw2

It is recommended to use a virtual environment.

Usage

import gw2

client = gw2.Client()

client.get('achievements/daily')

client.get('achievements', ids=[1, 2])  # pass query parameters as keyword arguments

client.auth('YOUR-API-KEY')  # set api key for authenticated endpoints

client.get('account')

To handle error responses:

try:
    client.get('...')
except gw2.HTTPError as e:
    print(e.response.status_code, e.response.json())

License

MIT

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

gw2-0.0.2.tar.gz (2.3 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page