Skip to main content

Archidekt API Wrapper for Python

Project description

Pyrchidekt

Pyrchidekt is a Python library for interfacing with decks from the website Archidekt.

Installation

pip install pyrchidekt

Example

The following example shows how to use pyrchidekt to query a deck and iterate through all cards in each category.

from pyrchidekt.api import getDeckById

deck = getDeckById(1)
for category in deck.categories:
    print(f"{category.name}")
    for card in category.cards:
        print(f"\t{card.quantity} {card.card.oracle_card.name}")
    print("")

Developing

It is encouraged to use virtual environments to develop pyrchidekt. To start developing, install the requirements:

pip install -r requirements/dev.txt

Testing

Testing will be run on PRs and before deploys for new releases. For local testing, see below.

Setup

You must additionally install the testing dependencies:

pip install -r requirements/test.txt

All tests can be run as follows:

coverage run -m pytest tests

With reporting then checked using:

coverage report

There are two types of tests: unit and integration.

Unit Tests

Unit tests ensure that the basic data dict conversion works correctly from how the inferred API works. These are run as follows:

coverage run -m pytest tests/unit

These tests should be run often when changing the dataclasses

Integration Tests

Integration tests ensure that pyrchidekt works with the current API of Archidekt. They are run as follows:

coverage run -m pytest tests/integration

These tests can be run less frequently. So long as Archidekt doesn't change their API data structures, these will pass.

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

pyrchidekt-2.2.0.tar.gz (17.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyrchidekt-2.2.0-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

Details for the file pyrchidekt-2.2.0.tar.gz.

File metadata

  • Download URL: pyrchidekt-2.2.0.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.23

File hashes

Hashes for pyrchidekt-2.2.0.tar.gz
Algorithm Hash digest
SHA256 4e349d661ce6f5d3c2efdcdeca029166ab1a3653ac6607dd7e88c49655abc07f
MD5 572cb3dd9b1de08854067cad8ee8279a
BLAKE2b-256 d53f0053dab4f0df56430e0a6179fe88c9d9847158e7bb47e37bfc5e1dd39660

See more details on using hashes here.

File details

Details for the file pyrchidekt-2.2.0-py3-none-any.whl.

File metadata

  • Download URL: pyrchidekt-2.2.0-py3-none-any.whl
  • Upload date:
  • Size: 14.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.23

File hashes

Hashes for pyrchidekt-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d759e1ff9bd51e4ef9bf7f2270ffded379c0f074e3b86ed97fc6d4bb85fe696f
MD5 b5975c432c3d411911614ce9986753f9
BLAKE2b-256 97d4695b6ee4ca03d1bc903f2d5625d89c13e640282ee013d10beaa603ca809e

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