Organise db files
This commit is contained in:
parent
332fb247d4
commit
b9ea237f44
3 changed files with 5 additions and 4 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -1,2 +1,3 @@
|
|||
.venv
|
||||
__pycache__
|
||||
.venv/
|
||||
__pycache__
|
||||
data/
|
||||
2
db.py
2
db.py
|
|
@ -1,7 +1,7 @@
|
|||
import aiosqlite
|
||||
|
||||
async def connect() -> aiosqlite.Connection:
|
||||
return await aiosqlite.connect('your_database.db')
|
||||
return await aiosqlite.connect('./data/your_database.db')
|
||||
|
||||
async def create():
|
||||
import products.db as product_db
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ async def scrape_recipe(url: str) -> dict:
|
|||
|
||||
def _dump_json_data_to_log(data: dict) -> str:
|
||||
import os, re
|
||||
dir = './dump'
|
||||
dir = './data/dump'
|
||||
if not os.path.exists(dir):
|
||||
os.makedirs(dir)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue