Skip to main content

A Python library for interacting with Rally.io services

Project description

Rally.io Python Package

A Python package for interacting with Rally.io services, including search and RAG (Retrieval Augmented Generation) capabilities.

Installation

  1. Clone the repository:
git clone https://github.com/jatinarora2409/rallyio.git
cd rallyio
  1. Create a virtual environment (recommended):
python -m venv venv
source venv/bin/activate  # On Windows, use: venv\Scripts\activate
  1. Install the package in development mode:
pip install -e .

Usage

Search Tool

import rallyio

# Initialize the search tool
search_tool = rallyio.get_search_tool(
    data_id="your-data-id",
    api_key="your-api-key"
)

# Perform a search
results = search_tool.search("your search query")
print(results)

# Get information about the data source
data_info = search_tool.get_data_info()
print(data_info)

RAG Tool

import rallyio

# Initialize the RAG function
rag_function = rallyio.get_rag_function(
    project_id="your-google-cloud-project-id",
    rag_corpus_id="your-rag-corpus-id",
    location="us-central1"  # optional, defaults to "us-central1"
)

# Use the RAG function to get responses
response = rag_function("What is the capital of France?")
print(response)

# You can reuse the same function for multiple queries
response2 = rag_function("Tell me about quantum computing")
print(response2)

Requirements

  • Python 3.8 or higher
  • Google Cloud credentials configured (for RAG functionality)
  • Required Python packages (automatically installed with the package):
    • requests
    • google-cloud-aiplatform
    • google-generativeai

Google Cloud Setup

To use the RAG functionality, you need to:

  1. Have a Google Cloud project set up
  2. Enable the Vertex AI API
  3. Create a RAG corpus in your project
  4. Set up authentication:
    # Install Google Cloud CLI
    # Then authenticate:
    gcloud auth application-default login
    

Development

To run tests:

pytest

To format code:

black .

License

[Your chosen license]

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

rallyio-0.1.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

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

rallyio-0.1.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file rallyio-0.1.0.tar.gz.

File metadata

  • Download URL: rallyio-0.1.0.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for rallyio-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e52a0804c8c485cd55f959b33527f93e84fd0615938e36b75cea7df9d1555931
MD5 30bad6e63942eb6f20a7c5459bade749
BLAKE2b-256 aefdf87e171981fc44a0e80249010e7ff4ca024fbf49cd25f92486b77bb4f25b

See more details on using hashes here.

File details

Details for the file rallyio-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: rallyio-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for rallyio-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c076e94af00b351896af5b8aba06ad21f51c8357de1762d5c07f4c37c152be02
MD5 e15b69baeafa804df674dcba19b1e9cc
BLAKE2b-256 c21aad31f7e839ab7cefefce066641fae67cc6be42bd72c46b39753a6c03d002

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