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:
- Clone the repository:
git clone https://github.com/jatinarora2409/rallyio.git
cd rallyio
- Create a virtual environment (recommended):
python -m venv venv
source venv/bin/activate # On Windows, use: venv\Scripts\activate
- 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:
- Have a Google Cloud project set up
- Enable the Vertex AI API
- Create a RAG corpus in your project
- 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
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 rallyio-0.1.2.tar.gz.
File metadata
- Download URL: rallyio-0.1.2.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e1b455d3c04dee7c71f101005eb037f31c5186d9582fcd9fe3accb03bd05f84
|
|
| MD5 |
e8a1c269fcd8cef0aa69617b13950ae4
|
|
| BLAKE2b-256 |
c0513bf602eb28a8e651f85931a13f682711850747dd68aa084d6caecb032b73
|
File details
Details for the file rallyio-0.1.2-py3-none-any.whl.
File metadata
- Download URL: rallyio-0.1.2-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ddd0415dd0ddaf884153f9c9e0109badb28055ed32f399110943c7d897760d32
|
|
| MD5 |
75da5b691f3c13cf57d120b9839bcee9
|
|
| BLAKE2b-256 |
ef1710af2c41a815f0dd784e8aa7a8cf05af917d5ee4fa4867ad4fe2c36e5f33
|