MCPcopy Create free account
hub / github.com/0010aor/FlashNotes / create_cards

Function create_cards

backend/tests/stats/utils.py:4–11  ·  view source on GitHub ↗
(db, collection, num_cards)

Source from the content-addressed store, hash-verified

2
3
4def create_cards(db, collection, num_cards):
5 cards = [
6 Card(front=f"Front {i}", back=f"Back {i}", collection_id=collection.id)
7 for i in range(num_cards)
8 ]
9 db.add_all(cards)
10 db.flush()
11 return cards
12
13
14def create_sessions(db, user_id, collection, num_sessions, num_cards):

Callers 2

_createFunction · 0.90
_createFunction · 0.90

Calls 1

CardClass · 0.90

Tested by 2

_createFunction · 0.72
_createFunction · 0.72