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

Quick Install (Recommended)

Simply use pip to install the package:

pip install rallyio

Development Installation

If you want to install the package in development mode or contribute to the project:

  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.1.tar.gz (5.2 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.1-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rallyio-0.1.1.tar.gz
  • Upload date:
  • Size: 5.2 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.1.tar.gz
Algorithm Hash digest
SHA256 acf3f763d8ddb9d79d129d1839de1eb63fbcca8abe08cf53bb9b32c363261b35
MD5 e2e694708f2a17262512fa7eae246a53
BLAKE2b-256 042ed7174f751a0d34733e1068efed5122eb4b22b781b999ee764edbee38b4e2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rallyio-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e1163aef88913b2a81f8072b31200d8d06de545e3768c656772a46fa3f42ff61
MD5 71a65273a8305b9193d704ee3e7751e8
BLAKE2b-256 0e882499a4b64820b00b4c6d0559c7069144f7d1ec3ff27cbbaff27360997c35

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