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 details)

Uploaded Source

File details

Details for the file gw2-0.0.2.tar.gz.

File metadata

  • Download URL: gw2-0.0.2.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.20.0 CPython/3.6.4

File hashes

Hashes for gw2-0.0.2.tar.gz
Algorithm Hash digest
SHA256 365bd402102af3b72572db0b117c290955fcff30067bbd486ebe8680ab3a697d
MD5 d0fdab076161fd83ff2f62939a84cf0e
BLAKE2b-256 777ca155e4047b3361765a1c56c104c1593cebe9302ee5fe0f6390ef2b441a1d

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