Skip to content

Instantly share code, notes, and snippets.

@andrewdoss-bit
Created February 17, 2022 01:09
Show Gist options
  • Save andrewdoss-bit/3fdc0e6a0cec6903bbe7cb131dde19b1 to your computer and use it in GitHub Desktop.
Save andrewdoss-bit/3fdc0e6a0cec6903bbe7cb131dde19b1 to your computer and use it in GitHub Desktop.
Example import with bitdotio Python package
import bitdotio
# Connect to bit.io
b = bitdotio.bitdotio(<YOUR_BITIO_KEY>)
# Download demo csv here:
# https://raw.githubusercontent.com/bitdotioinc/connection_snippets/main/video-game-sales.csv
# Upload to 'my_new_repo' with table name 'video_game_sales_csv'
with open('video-game-sales.csv', 'r', encoding='utf-8') as f:
b.create_import_file(f, 'my_new_repo', 'video_game_sales_csv')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment