Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

ManaLens

A modern Python client for the Scryfall API

Installation

pip install manalens

Usage

Shared Client

from manalens import Scryfall


with Scryfall() as client:
    # Search for cards
    cards = client.cards.search(
        q="t:dragon c:r",
        order="name",
        page=1,
    )

    card = client.cards.by_id(scryfall_id=UUID("75240bbc-adc7-48ff-9523-c79776d710d3"))

    # Card by Arena ID
    card = client.cards.by_id(arena_id=73347)

    # Card by MTGO ID
    card = client.cards.by_id(mtgo_id=83265)

    # Card by TCGplayer ID
    card = client.cards.by_id(tcgplayer_id=222039)

    # Card by Cardmarket ID
    card = client.cards.by_id(cardmarket_id=495735)

    # Card text
    text = client.cards.text_by_id(scryfall_id=UUID("75240bbc-adc7-48ff-9523-c79776d710d3"))

    # Card image
    image = client.cards.image_by_id(scryfall_id=UUID("75240bbc-adc7-48ff-9523-c79776d710d3"))

    # Specific card face / image version
    image = client.cards.image_by_id(
        scryfall_id=UUID("75240bbc-adc7-48ff-9523-c79776d710d3"),
        face="back",
        version="large",
    )

    # Symbols
    symbols = client.symbols.get_all()

    # Parse a mana cost
    mana = client.symbols.parse_mana("2WW")

Manual Client (good for quick one-off requests)

from manalens import scry

card = scry.cards.by_id(scryfall_id=UUID("75240bbc-adc7-48ff-9523-c79776d710d3"))

cards = scry.cards.search(q="t:goblin c:r")

text = scry.cards.text_by_id(scryfall_id=UUID("75240bbc-adc7-48ff-9523-c79776d710d3"))

image = scry.cards.image_by_id(scryfall_id=UUID("75240bbc-adc7-48ff-9523-c79776d710d3"))

ManaLens is an independent fan project and is not affiliated with, endorsed by, or sponsored by Scryfall, Wizards of the Coast, or Hasbro. Magic: The Gathering and related names, artwork, and game content belong to their respective owners.

Metadata

Release files for manalens 0.0.1rc1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for manalens 0.0.1rc1
File Size Uploaded
manalens-0.0.1rc1.tar.gz 11.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for manalens 0.0.1rc1
File Interpreter ABI Platform
manalens-0.0.1rc1-py3-none-any.whl Python 3 none any Details

Total release size: 28.8 kB

Release files / manalens-0.0.1rc1.tar.gz

Download URL manalens-0.0.1rc1.tar.gz
Size 11.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7ba5aa41d244d1c43a4eac37bff51984f2cf1b5dff0589fd7074e91d5747a0ae
BLAKE2b-256 checksum
How to use checksums
a808836e0cf58ddeb3659652d55b3c9cb85ac20c6cdc02af0f7b06d5aaab30c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / manalens-0.0.1rc1-py3-none-any.whl

Download URL manalens-0.0.1rc1-py3-none-any.whl
Size 17.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
26a5d4fbb81b6db2c551a0dc05f26f71cc43fa6993c44d89b6f51ff34bb0849e
BLAKE2b-256 checksum
How to use checksums
d5b5df144be61097e9a80fbd14fbcf9fd13ac0dde58a2e35ca7f05a3d540a6aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.0.1rc1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page