Skip to main content

A Python client for the Kruncher API

Project description

Kruncher Client

Kruncher Logo

Kruncher Client is a Python library for interacting with Kruncher data, allowing users to seamlessly access and analyze structured information.

🚀 Installation

To install the kruncherclient library, use pip:

pip install kruncherclient

🔑 API Key Setup

To use the Kruncher API, an API key is required. Follow these steps to obtain it:

  1. Log in to your account on kruncher.ai with an owner/admin account.
  2. Navigate to Settings.
  3. Go to Integrations.
  4. Copy the KRUNCHER_API_KEY and store it securely.

Save it in a .env file within your project directory:

KRUNCHER_API_KEY=your_api_key_here

Or set it as an environment variable:

export KRUNCHER_API_KEY=your_api_key_here

📖 Usage

To use the KruncherClient, either pass the API key directly when initializing the client or ensure it is set in your environment variables.

✅ Basic Example

from kruncher import KruncherClient

# Initialize the client with the API key
client = KruncherClient(api_key='your_api_key_here')

# Alternatively, if the API key is set in the .env file, initialize without arguments
client = KruncherClient()

# Fetch projects
projects_json = client.get_projects(page=0)
print(projects_json)

# Fetch projects as a DataFrame
projects_df = client.get_projects_df_full(page=0)
print(projects_df)

# Fetch analysis details
analysis_id = 'your_analysis_id_here'
analysis_details = client.get_analysis_detail(analysis_id=analysis_id)
print(analysis_details)

# Fetch analysis details as json object containing different pre-built dataframes
analysis_detail_df = get_analysis_detail_df(analysis_id=analysis_id)
print(analysis_detail_df)

# Fetch analysis details as complete dataframe row with 200+ datapoints
analysis_df_full = get_analysis_df_full(analysis_id=analysis_id)
print(analysis_df_full)

📌 Features

  • 🔍 Retrieve projects from Kruncher API.
  • 📊 Fetch projects as a DataFrame for easy analysis.
  • 📈 Get analysis details using an analysis_id.
  • 🔒 Secure API key storage via .env file or environment variables.

❓ Need Help?

For any issues, feel free to reach out:

Enjoy using kruncherclient! 🚀

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

kruncherclient-0.1.1.tar.gz (14.9 kB view details)

Uploaded Source

Built Distribution

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

kruncherclient-0.1.1-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file kruncherclient-0.1.1.tar.gz.

File metadata

  • Download URL: kruncherclient-0.1.1.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for kruncherclient-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c9a98ae1357ed8c7f31632af7b9210e880f3ecf1f533f33ddbf54e963394a87a
MD5 3a9b530e0f1ee7e03584b600084041ba
BLAKE2b-256 0dfbe3ff0f6cdfb8145640125accfb74f89f0f1c90873a5a8f270b645d2d21d1

See more details on using hashes here.

File details

Details for the file kruncherclient-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: kruncherclient-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 13.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for kruncherclient-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9067b8530f3a4fbc9e53d44f7fdd8651a32a3240860bd8b1beb2d23cbd88fa28
MD5 ff83bf7ec013a41fd2d5fb45be6fd7dc
BLAKE2b-256 0291b22b37dbc8ff61fe819bc4e91097e4db96ab7bbda43225ad52bcfc2588d0

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