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 JSONGOOGLE_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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dataorigin-1.6.2.tar.gz.
File metadata
- Download URL: dataorigin-1.6.2.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0dac74eb72e4ddf0a156ee350eec79fcb353cc61cae705a9157785b7e959c67a
|
|
| MD5 |
5c8038f8624b3889b4493111b3ca3eee
|
|
| BLAKE2b-256 |
a6d5911826030aa10a106b4c815099ed75b9e28cfd1a443bfa5eada290540b72
|
File details
Details for the file dataorigin-1.6.2-py3-none-any.whl.
File metadata
- Download URL: dataorigin-1.6.2-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1df870a1515957016a7fa8f0d360f382f350e59310955120233b03fa86b06f1
|
|
| MD5 |
42c154839e891f9ad4dba4e716f124b0
|
|
| BLAKE2b-256 |
942765c366fdc3c3d3d8301ffe1c60acaf80a375a83fe07eb37a9e50ababfe26
|