An open API service indexing awesome lists of open source software.

https://github.com/jcserv/manaql-ingest

manaql-ingest is a Django application that retrieves Scryfall bulk data and processes it into Postgres, to enable the manaql-api
https://github.com/jcserv/manaql-ingest

django etl postgres

Last synced: 3 months ago
JSON representation

manaql-ingest is a Django application that retrieves Scryfall bulk data and processes it into Postgres, to enable the manaql-api

Awesome Lists containing this project

README

          

# manaql-ingest

manaql-ingest is a Django application that ingests Scryfall card data into a PostgreSQL database, to be used by [manaql-api](https://github.com/jcserv/manaql) project.

## installation

### prerequisites
- python3
- pipx
- poetry

### running locally
1. Create a virtual environment
`python3 -m venv .venv`

2. Activate the virtual environment
`source .venv/bin/activate`

3. Run `make setup`
4. Run `make dev-db` to start a local postgres database, then `make migrate`

Then, to run the application:

Run `make run` to run the entire etl process OR:
- `make download` to download the Scryfall data
- `make ingest` to ingest the Scryfall data into the database
- `make process` to process the Scryfall data into the card/printings tables
- `make generate-embeddings` to generate embeddings for the cards
- note: this will take ~5.1 hrs and charge you for about $0.50-$1.00 in total

TODO:
- async.io instead of tqdm?