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.5.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.5-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: move_data-0.1.5.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.5.tar.gz
Algorithm Hash digest
SHA256 a967e09cf9dc5d4a19dac80e14c1adef0b5aadbcf92f3261adb07e6993884af9
MD5 14ffb50f41e9ab30597e389a672a2a89
BLAKE2b-256 4a8dbc1bef6077f77f34f2ed6fc62a95e02e200af5c5d4c0c03914dff02cabe8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: move_data-0.1.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 17f7483a4fec5fb4a8b011322168b0e103fd555e132f6c8773ac197d22756748
MD5 0312b8d9a79f857cc1eb0c79bbc37c55
BLAKE2b-256 582acca9d9c3514d62d33a153f9625cb1723da737fe35d0f11acbff672e2e863

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