A CLI tool to access https://lorcania.com
Project description
lorcania-cli is an unofficial CLI to work with Lorcania, a website to collect your Lorcana cards. Lorcania provides a valuable service for the community and this utility is not ment to replace it, but rather to allow (currently: me) to obtain a local backup for my collection.
It currently only allows to:
- Get your collection of Lorcana cards.
Installation
pip install lorcania-cli
Usage
To get your collection at the command line
$ lorcania-cli collection show "<e-mail address used for Lorcania>"
Password: "<Lorcania password>"
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ collection ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ rarity_collection foil op regular │
│ card_set_id number name title │
│ 1 1 Mickey Mouse Brave Little Tailor │
...
└───────────────────────────────────────────────────────────────────────────────────────────────┘
You can also use environment variables or an .env file to store your credentials:
LORCANIA_EMAIL="<e-mail address used for Lorcania>"
LORCANIA_PASSWORD="<Lorcania password>"
Then, you can directly use
lorcania-cli
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ collection ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ rarity_collection foil op regular │
│ card_set_id number name title │
│ 1 1 Mickey Mouse Brave Little Tailor │
...
└───────────────────────────────────────────────────────────────────────────────────────────────┘
Please always remember, that your credentials are secrets and should not be stored in version control.
To get your collection as an excel file (here: my-collection.xlsx), use
$ lorcania-cli collection show --out-file my-collection.xlsx
Test
To test lorcania-cli, use pytest.
In order to don't waste Lorcania resources, a vcr.py suite is included for an account with the following collection:
- Mickey Mouse Detective (Promo): 1x
- Ariel - On Human Legs (The First Chapter): 2x (regular)
- Cinderella - Gentle and Kind (The First Chapter): 1x (regular), 2x (foil)
If you want to extend lorcania-cli and need to run tests against real Lorcania, I recommend to
- create a lorcania account for this purpose
- add the above cards
- add any other cards as required for your use case
- delete the vcr.py cassettes at
tests/cassettes - make the credentials to your lorcania test account available in
.env.tests(which is ignored via .gitignore) - rerun
pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lorcania_cli-0.1.1.tar.gz.
File metadata
- Download URL: lorcania_cli-0.1.1.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.10.2 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
604935e5b44ea6bb77e3d92fd3ce154060b308ce47845f16f3cc4c32092957d4
|
|
| MD5 |
820930fa634a62fd094608816bef1a51
|
|
| BLAKE2b-256 |
1e63e6b9a4ded916e00c5740b7c7f3a4ffb4bcb42df9df19839ec2f79e62ee9c
|
File details
Details for the file lorcania_cli-0.1.1-py3-none-any.whl.
File metadata
- Download URL: lorcania_cli-0.1.1-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.10.2 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
534ea6455b903ee196a4288d47653b484fd2dbce66efa34771209475e940c6d8
|
|
| MD5 |
834aad202ab83580dc52b56f958092f2
|
|
| BLAKE2b-256 |
25f1d5b406fcf936f26450571bc396a7bd5d3b5d8138c01104f5313214d28592
|