Untitled

mail@pastecode.io avatar
unknown
python
2 years ago
500 B
1
Indexable
Never
import json
from pyairtable import Api,Base,Table
import pandas as pd

apikey = 'keyCdDgsXcHNeMrkE'
base_id = 'app13rNUH6u4lyLN5'
table_name = 'ИП'

# api = Api(f'{apikey}')
# api.all(f'{base_id}', f'{table_name}')

# base = Base(f'{apikey}', f'{base_id}')
# base.all(f'{table_name}')

table = Table('keyCdDgsXcHNeMrkE', 'app13rNUH6u4lyLN5', 'ИП')
data = table.all()
for i in data:
    for k,v in i.items():
        print(k,v)
        with open("data.txt", "w") as f:
            f.write(str(v))