Upload_File_Tutorial (eng) - datawizio/pythonAPI GitHub Wiki

Upload Data via file Tutorial

---

Step 1 - setting up of Datawiz library

git clone https://github.com/datawizio/pythonAPI.git
cd pythonAPI
pip install -r requirments.txt

Step 2 - registering a new user

python
from datawiz_upload import Up_DW
dw = Up_DW()
user = dw.register_user('<name>', '<email>', '<password>')
print user['API_KEY'], ':' , user['API_SECRET']

Save a pair email: the key to the following access to API

Step 3 - data downloading

#Initialize a copy of the class 
dw = Up_DW(API_KEY=user['API_KEY'], API_SECRET = user['API_SECRET'])

#Download data about units of measurement 
dw.upload_units('upload_file_tutorial/data/units.csv')

#Download data about shops 
dw.upload_shops('upload_file_tutorial/data/shops.csv')

#Download data about categories
dw.upload_categories('upload_file_tutorial/data/categories.csv')

#Download data about terminals
dw.upload_terminals('upload_file_tutorial/data/terminals.csv')

#Download data about cashiers
dw.upload_cashiers('upload_file_tutorial/data/cashiers.csv')

#Download data about products
dw.upload_products('upload_file_tutorial/data/products.csv')

#Download data about loyalty program clients 
dw.upload_loyalty_client_info('upload_file_tutorial/data/loyalty.csv')

#Download data about receipts
dw.upload_receipts('upload_file_tutorial/data/receipts.csv')

#Download data about prices for products 
dw.upload_price('upload_file_tutorial/data/price.csv')

#Download inventory data 
dw.upload_inventory('upload_file_tutorial/data/inventory.csv')

#Start the process of data subscripting. After termination, 
#receive a message to the given e-mail address.
dw.upload_to_service('<email>')

After termination of caching you will receive a message to the given e-mail address. Caching process may be lasting from several minutes to several hours

⚠️ **GitHub.com Fallback** ⚠️