Skip to main content

WaveAssist Python SDK for storing and retrieving structured data

Project description

WaveAssist SDK & CLI 🌊

WaveAssist SDK makes it simple to store and retrieve data in your automation workflows. Access your projects through our Python SDK or CLI.


✨ Features

  • 🔐 One-line init() to connect with your WaveAssist project
  • ⚙️ Automatically works on local and WaveAssist Cloud (worker) environments
  • 📦 Store and retrieve data (DataFrames, JSON, strings)
  • 🧠 LLM-friendly function names (init, store_data, fetch_data)
  • 📁 Auto-serialization for common Python objects
  • 🖥️ Command-line interface for project management
  • ✅ Built for automation workflows, cron jobs, and AI pipelines

🚀 Getting Started

1. Install

pip install waveassist

2. Initialize the SDK

import waveassist

# Option 1: Use no arguments (recommended)
waveassist.init()

# Will auto-resolve from:
# 1. Explicit args (if passed)
# 2. .env file (WA_UID, WA_PROJECT_KEY, WA_ENV_KEY)
# 3. Worker-injected credentials (on [WaveAssist Cloud](https://waveassist.io))

🛠 Setting up .env (for local runs)

uid=your-user-id
project_key=your-project-key

# optional
environment_key=your-env-key

This file will be ignored by Git if you use our default .gitignore.


3. Store Data

🧾 Store a string

waveassist.store_data("welcome_message", "Hello, world!")

📊 Store a DataFrame

import pandas as pd

df = pd.DataFrame({"name": ["Alice", "Bob"], "score": [95, 88]})
waveassist.store_data("user_scores", df)

🧠 Store JSON/dict/array

profile = {"name": "Alice", "age": 30}
waveassist.store_data("profile_data", profile)

4. Fetch Data

result = waveassist.fetch_data("user_scores")

# Will return:
# - A DataFrame (if stored as one)
# - A dict/list (if stored as JSON)
# - A string (if stored as text)

🖥️ Command Line Interface

WaveAssist CLI comes bundled with the Python package. After installation, you can use the following commands:

🔑 Authentication

waveassist login

This will open your browser for authentication and store the token locally.

📤 Push Code

waveassist push PROJECT_KEY [--force]

Push your local Python code to a WaveAssist project.

📥 Pull Code

waveassist pull PROJECT_KEY [--force]

Pull Python code from a WaveAssist project to your local machine.

ℹ️ Version Info

waveassist version

Display CLI version and environment information.


🧪 Running Tests

If you’re not using pytest, just run the test script directly:

python tests/run_tests.py

✅ Includes tests for:

  • String roundtrip
  • JSON/dict roundtrip
  • DataFrame roundtrip
  • Error if init() is not called

🛠 Project Structure

WaveAssist/
├── waveassist/
│   ├── __init__.py          # init(), store_data(), fetch_data()
│   ├── _config.py           # Global config vars
│   └── ...
├── tests/
│   └── run_tests.py         # Manual test runner

📌 Notes

  • Data is stored in your WaveAssist backend (e.g. MongoDB) as serialized content
  • store_data() auto-detects the object type and serializes it (CSV/JSON/text)
  • fetch_data() deserializes it back to the right Python object

🧠 Example Use Case

import waveassist
waveassist.init()  # Auto-initialized from .env or worker

# Store GitHub PR data
waveassist.store_data("latest_pr", {
    "title": "Fix bug in auth",
    "author": "alice",
    "status": "open"
})

# Later, fetch it for further processing
pr = waveassist.fetch_data("latest_pr")
print(pr["title"])

🤝 Contributing

Want to add formats, features, or cloud extensions? PRs welcome!


📬 Contact

Need help or have feedback? Reach out at connect@waveassist.io, visit WaveAssist.io, or open an issue.


© 2025 WaveAssist

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

waveassist-0.1.7.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

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

waveassist-0.1.7-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file waveassist-0.1.7.tar.gz.

File metadata

  • Download URL: waveassist-0.1.7.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for waveassist-0.1.7.tar.gz
Algorithm Hash digest
SHA256 e635007eae878e2e8c3d857bff9e11949719ab0d7aa90c87390030d7da3fc86f
MD5 420b6eb5c6166d0151f9cd2725d9c767
BLAKE2b-256 947445d58b048b82c0f54f4ae9fc6cd524f49834322870843873bef9adc499e5

See more details on using hashes here.

Provenance

The following attestation bundles were made for waveassist-0.1.7.tar.gz:

Publisher: python-publish.yml on WaveAssist/WaveAssist

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file waveassist-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: waveassist-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for waveassist-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 4a11c19fb1c5892c5069161e2c78895ce4a5b6f91624d3f5d12058a02b71582c
MD5 1c6b05a313c3ff244f5d0b4d0ecd650b
BLAKE2b-256 10f14da4455d13df0f6707e0823d493cc4aacfab7d529d5a8dfe5024c75d017b

See more details on using hashes here.

Provenance

The following attestation bundles were made for waveassist-0.1.7-py3-none-any.whl:

Publisher: python-publish.yml on WaveAssist/WaveAssist

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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