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.5.tar.gz (11.7 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.5-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dataorigin-1.6.5.tar.gz
  • Upload date:
  • Size: 11.7 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.5.tar.gz
Algorithm Hash digest
SHA256 370de46791cf5581db5d09bac568f2e5d3bd0196f8ff0d9067fbabc4f133a28b
MD5 7457a591b5b4c473c1fb69d6bd64c081
BLAKE2b-256 7252468a65db5542e93f10f32f6686dbf3c2513674edae99d49b9828cfbf9cd6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dataorigin-1.6.5-py3-none-any.whl
  • Upload date:
  • Size: 11.3 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 2968da8d8be257f0b72ade17c9aa94ada183f2f5b207d44f77e5b8a3398ab0c5
MD5 ab3aab9f81f13f26d848f71f7906196e
BLAKE2b-256 739ce4c8c80f80c20662c9d19cd2bd2866a7044779342c05bc8eacc4d459386e

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