Skip to main content

DataOrigin utilities in a single library.

Project description

DataOrigin Package

This package provides core utilities for the DataOrigin project, focusing on leveraging AI-driven data insights for sales prospecting and lead generation in the B2B event space.

Installation

To install the dataorigin package, you can use pip:

pip install dataorigin

Usage

Example usage for google_sheets.py (assuming you have configured credentials using environment variables):

  • GOOGLE_SERVICE_ACCOUNT_JSON: full Service Account JSON as a string (recommended for containers)
  • GOOGLE_APPLICATION_CREDENTIALS: absolute path to Service Account JSON
  • GOOGLE_OAUTH_CLIENT_SECRET_FILE: path to OAuth client secret file (interactive, local dev)
  • GOOGLE_OAUTH_TOKEN_FILE: where to persist OAuth token (default: token.json)
  • GOOGLE_OAUTH_PORT: OAuth local server port (default: 0)
import os
import pandas as pd
from dataorigin.google_sheets import upsert_google_sheet, read_google_sheet

# Example: Write data to a spreadsheet
df = pd.DataFrame([{"a": 1, "b": 2}, {"a": 3, "b": 4}])

res = upsert_google_sheet(
    df=df,
    spreadsheet_id="YOUR_SPREADSHEET_ID",           # or use spreadsheet_title="..."
    sheet_name="data",                              # optional: target sheet (created if missing)
    folder_id=os.getenv("GDRIVE_FOLDER_ID"),         # optional
    clear=True,
    value_input_option="USER_ENTERED",              # "RAW" or "USER_ENTERED"
    rename_sheet=False
)

# Example: Read data from a spreadsheet (reads the first sheet by default)
data = read_google_sheet(spreadsheet_id="YOUR_SPREADSHEET_ID")
print(data)

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.

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

dataorigin-1.6.3.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

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

dataorigin-1.6.3-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file dataorigin-1.6.3.tar.gz.

File metadata

  • Download URL: dataorigin-1.6.3.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for dataorigin-1.6.3.tar.gz
Algorithm Hash digest
SHA256 d3ab95d176db0f90f9abbfa3a50e544d73602096ac022ed963aee1808f9a62c8
MD5 4aa358026d95211251d836c9c5ef24ad
BLAKE2b-256 e7256295966fa05df0a79a8f5af5de95766919f8f50c2d440ac96966eb7049f4

See more details on using hashes here.

File details

Details for the file dataorigin-1.6.3-py3-none-any.whl.

File metadata

  • Download URL: dataorigin-1.6.3-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for dataorigin-1.6.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a6fb7c542a3593e2ddfcdbe1891dca082c78f00860251737e4857f74477c7f8f
MD5 e3f8a781a10e42f0bcbc971fcaec2942
BLAKE2b-256 890d718b833a7a70c6029f0458559872892c580e6e85887f32353ca8adbb8544

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