A Python package for moving data between Google Sheets, SharePoint, Google Cloud Storage, and Snowflake
Project description
move-data
A Python package for moving data between Google Sheets, SharePoint, Google Cloud Storage, and Snowflake.
Features
- Google Sheets Integration: Extract data from Google Sheets with automatic column name normalization
- SharePoint Integration: Download and upload files from SharePoint Online
- Google Cloud Storage: Retrieve files from GCS buckets
- Snowflake Integration: Load data to and extract data from Snowflake databases
Installation
pip install move-data
Usage
Google Sheets
from move_data import get_googlesheets_data
data, sf_query, sf_tr_query = get_googlesheets_data(
name="My Spreadsheet",
sheet="Sheet1",
service_account_path="/path/to/service_account.json",
skip_rows=0 # Optional: skip first N rows
)
SharePoint
from move_data import sharepoint
sp = sharepoint(
client_id="your_client_id",
client_secret="your_client_secret",
tenant_id="your_tenant_id",
site_id="your_site_id",
library_name="Documents",
drive_id="your_drive_id"
)
data, sf_query, sf_tr_query, file, api_url = sp.get_data(
search_query="filename",
relative_path="folder/path",
date_col="date_column",
sheet_name="Sheet1",
skip_rows=0
)
Snowflake
from move_data import snowflake
sf = snowflake(
user="username",
pw="password",
database="database_name",
schema="schema_name",
role="role_name"
)
# Load data to Snowflake
sf.load_data(sf_query, sf_tr_query, "table_name", data, change_tracking=True)
# Get data from Snowflake
df = sf.get_data(sheet_name="Sheet1", search_query="SELECT * FROM table")
Google Cloud Storage
from move_data import googlestorage
gs = googlestorage(service_account="/path/to/service_account.json")
df = gs.get_data(
bucket_name="my-bucket",
path="folder/path",
search_query="filename",
sheet_name="Sheet1",
skip_rows=0
)
Requirements
- Python 3.7+
- See
pyproject.tomlfor full dependency list
License
MIT
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
move_data-0.1.7.tar.gz
(6.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file move_data-0.1.7.tar.gz.
File metadata
- Download URL: move_data-0.1.7.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65f7a4f482d43bea80e65458e8f420782f71265a7412e8dcc69be2b434653844
|
|
| MD5 |
cf70c239ca979c502218bdee83c148f7
|
|
| BLAKE2b-256 |
bd9fe44ce449a09689c0cf00bd12e16fee07f2e3b5550aaf7be25cae8a431174
|
File details
Details for the file move_data-0.1.7-py3-none-any.whl.
File metadata
- Download URL: move_data-0.1.7-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7aaceb58b887116445ff27555f460923e38491b4be254c32edea351f70b19cd
|
|
| MD5 |
590e01c095b88e3702e351228166371a
|
|
| BLAKE2b-256 |
c1793b45e1c297f9b10741af5dd2194392f4fa9767b944760faf9768fc49df1e
|