Skip to main content

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.toml for full dependency list

License

MIT

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

Project details


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.6.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

move_data-0.1.6-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file move_data-0.1.6.tar.gz.

File metadata

  • Download URL: move_data-0.1.6.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.5

File hashes

Hashes for move_data-0.1.6.tar.gz
Algorithm Hash digest
SHA256 befc660f58a0760b3c458ad236f68674627d38681e733cb0c072c7827944b676
MD5 23bb1265c48c3c4dfe05ab7250a9a5a6
BLAKE2b-256 1ea0351f031a183b579af1d6b4027264beb913696600ad53268211f0ee0d4f3f

See more details on using hashes here.

File details

Details for the file move_data-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: move_data-0.1.6-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.10.5

File hashes

Hashes for move_data-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 ae0403bdd2e5bb020780c2248f5a2ff8147a295aa78f3fd6c87c20bef4faefc2
MD5 af02b51c6219ceeddc6c334d95f49cb8
BLAKE2b-256 fd68a673a57dfb63f51ba29e202259b41ccd3b44fe53782397edcd9177f9932d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page