aioscryfall - Asynchronous Python client for Scryfall API
aioscryfall is a Python client for the Scryfall API. It is primarily designed for asynchronous use with asyncio, but a synchronous client is also provided.
The development is essentially feature complete but the documentation is largely absent, at present. (I need to remind myself how mkdocs works and figure out what I want to say)
As of right now, Python 3.11 is required because I wanted to use a number of typing features that were added in 3.11. I may change this in the future, but it is a lower priority than getting the API to a point where I am happy with it.
Everything is extensively typed and I have tried to make the API as intuitive as possible. I have also tried to make the API as close to the Scryfall API as possible, but I have made some changes to make it more Pythonic (namely converting paginated lists into iterable generators).
A minimal use case to get yourself started:
import asyncio
import aiohttp
from aioscryfall.api.cards import UniqueMode
from aioscryfall.client import ScryfallClient
async def get_bolt():
async with aiohttp.ClientSession() as session:
client = ScryfallClient(session)
bolts = [c async for c in client.cards.search("lightning bolt", unique=UniqueMode.PRINTS)]
return bolts
bolts = asyncio.run(get_bolt())
print(len(bolts), bolts[0])
Or if you prefer not to use async:
from aioscryfall.api.cards import UniqueMode
from aioscryfall.sync.client import ScryfallSyncClient
client = ScryfallSyncClient()
bolts = list(client.cards.search("lightning bolt", unique=UniqueMode.PRINTS))
print(len(bolts), bolts[0])
Metadata
Release files for aioscryfall 0.4.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| aioscryfall-0.4.2.tar.gz | 308.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aioscryfall-0.4.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 341.7 kB
Release files / aioscryfall-0.4.2.tar.gz
| Download URL | aioscryfall-0.4.2.tar.gz |
|---|---|
| Size | 308.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fed6b6ba6aec3162481f3478e5291ab36771b7ac8dfdd891ca63d8066ca91fc5
|
|
BLAKE2b-256 checksum How to use checksums |
a79f36d26e4aad67b2c962114ecb84a350641dae13794b48b6392fd419165879
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.2
|
Release files / aioscryfall-0.4.2-py3-none-any.whl
| Download URL | aioscryfall-0.4.2-py3-none-any.whl |
|---|---|
| Size | 33.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1cff07fe4e321d89c3da862c64f25d5d35a692a3eff2b4d8c14f6ebef31a15cd
|
|
BLAKE2b-256 checksum How to use checksums |
7ecc5cecbec7b97c849e9044a62cb899a94a780a20553fabf2d15611a91618d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.2
|
Security for aioscryfall 0.4.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.