SportsCardTool
SportsCardTool is designed to gather card data and track collections of cards. We hope to build the modern dynamic checklist and price book.
Currently SportsCardTool provides the ability to gather all baseball card setlists and to search prescraped data via data API and Querybuilder tool.
Potential contributors should check out SportsCardToolServer and soon to launch SportsCardToolApp.
Install it from PyPI
pip install SportsCardTool
Usage
Scraping a year of data:
from SportsCardTool import grab_card_list, dump_data, grab_year_links
# Find All Cards for 2023 Season, returned as list of dictionaries
year_links = grab_year_links(["2023"])
card_list = grab_card_list(year_link)
# Create CSV to allow for manipulation via pandas
dump_data(mock_data, "2023_cards.csv")
Grabbing cards from scraped data via code: Also accessible directly here!
from SportsCardTool import QueryBuilder
qb = QueryBuilder()
# Construct query requesting Barry Bonds cards from 2000 with an autograph and a print run of 25 or 250
qb.add_item({"name": "Barry Bonds", "year": "2000", "auto": "True", "serial": "25,250"})
# Make request and return in form of tuple (list[dict], int)
data = qb.grab_data()
print(data[0])
[
{
"_id": "641f49185ee984b20a66ef77",
"auto": true,
"back_img": null,
"front_img": null,
"group": "fleer-ultra",
"listing": "2000 Fleer Ultra Fresh Ink #11 Barry Bonds",
"mem": false,
"name": "Barry Bonds",
"number": "11",
"price": 0,
"rc": false,
"serial": 250,
"set": "fleer-ultra-fresh-ink-baseball-trading-card-checklist",
"team": "San Francisco Giants",
"year": 2000
},
{
"_id": "641f49185ee984b20a66f5f4",
"auto": true,
"back_img": null,
"front_img": null,
"group": "fleer-ultra",
"listing": "2000 Fleer Ultra Fresh Ink #11 Barry Bonds",
"mem": false,
"name": "Barry Bonds",
"number": "11",
"price": 0,
"rc": false,
"serial": 250,
"set": "fleer-ultra-fresh-ink-baseball-trading-card-checklist",
"team": "San Francisco Giants",
"year": 2000
},
{
"_id": "641f49185ee984b20a674b2f",
"auto": true,
"back_img": null,
"front_img": null,
"group": "upper-deck",
"listing": "2000 Upper Deck Game Jersey Autograph Numbered #BB Barry Bonds",
"mem": true,
"name": "Barry Bonds",
"number": "BB",
"price": 0,
"rc": false,
"serial": 25,
"set": "upper-deck-game-jersey-autograph-numbered-baseball-trading-card-checklist",
"team": "San Francisco Giants",
"year": 2000
},
{
"_id": "641f49185ee984b20a678e31",
"auto": true,
"back_img": null,
"front_img": null,
"group": "upper-deck-pros-and-prospects",
"listing": "2000 Upper Deck Pros and Prospects Game Jersey Autograph Gold #BB Barry Bonds",
"mem": true,
"name": "Barry Bonds",
"number": "BB",
"price": 0,
"rc": false,
"serial": 25,
"set": "upper-deck-pros-and-prospects-game-jersey-autograph-gold-baseball-trading-card-checklist",
"team": "San Francisco Giants",
"year": 2000
},
{
"_id": "641f49185ee984b20a67958c",
"auto": true,
"back_img": null,
"front_img": null,
"group": "sp-authentic",
"listing": "2000 SP Authentic Chirography Gold #GBB Barry Bonds",
"mem": false,
"name": "Barry Bonds",
"number": "GBB",
"price": 0,
"rc": false,
"serial": 25,
"set": "sp-authentic-chirography-gold-baseball-trading-card-checklist",
"team": "San Francisco Giants",
"year": 2000
}
]
Development
Read the CONTRIBUTING.md file.
Attribution
This README was adapted from an example here
Metadata
Release files for SportsCardTool 0.2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| SportsCardTool-0.2.4.tar.gz | 601.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| SportsCardTool-0.2.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.2 MB
Release files / SportsCardTool-0.2.4.tar.gz
| Download URL | SportsCardTool-0.2.4.tar.gz |
|---|---|
| Size | 601.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
529a9ddaab9ec5d05ff2106e5405793b51e6808ada85dd01b32c1031f829b70f
|
|
BLAKE2b-256 checksum How to use checksums |
7ad4c4e4effbe3e0cba235df84fe0a30c7b9d15107123b86df3fc870d4aeaaaa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|
Release files / SportsCardTool-0.2.4-py3-none-any.whl
| Download URL | SportsCardTool-0.2.4-py3-none-any.whl |
|---|---|
| Size | 621.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d85b04fe91e8c62aaaf8983186a6f70d5cb7cd8ea012d4ed1d129e1460a05080
|
|
BLAKE2b-256 checksum How to use checksums |
312de8e773d0c1bfd812c62d7ca99eb98e601c55dc3d837c0edfe7627c5e6d98
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|