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.8.tar.gz
(6.1 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.8.tar.gz.
File metadata
- Download URL: move_data-0.1.8.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6ff86be3b29bb8cdd4a1702052ac8bb2d20ae653b699239cfe483e9029c5d10
|
|
| MD5 |
90294b821347361399d2f78c6fbc72d5
|
|
| BLAKE2b-256 |
d732f88de835ddab15cccaf4ee2673fb2e70816f3ca9375a1a96c1f1d166f3df
|
File details
Details for the file move_data-0.1.8-py3-none-any.whl.
File metadata
- Download URL: move_data-0.1.8-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46a95544205f4f3ec4210a03a8503f4d4e75240d7f7940c215602653aef92bd3
|
|
| MD5 |
98665a50fd1e32f47b2e52b774613d09
|
|
| BLAKE2b-256 |
86ef24780b4cc8c8e2cb5e302c7b66ada3b6c750dc4e05a1888f2db9467a4b5a
|