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.4.tar.gz (11.2 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.4-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dataorigin-1.6.4.tar.gz
  • Upload date:
  • Size: 11.2 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.4.tar.gz
Algorithm Hash digest
SHA256 c4fa2f7c0b0b17e04466b6e642ef28e2680075c53ad73a908307775d1bfbda58
MD5 ab1727e7005db42f4dabf4777315732b
BLAKE2b-256 210e9c4b1d701e8ab5a1d3cb291d4408a5883a976ab6eaf7683d965b352598df

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dataorigin-1.6.4-py3-none-any.whl
  • Upload date:
  • Size: 10.9 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9ec1e0d15978c8350db3f64dd0e215bfae12bd1fec344c09e978e6c59011e059
MD5 4f6ea6a41f3dac09770c215c95be7a46
BLAKE2b-256 823eafefb53fdc6fb003cf6d6024a69165bcfa82ac409fabec84b268458d25b7

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