Skip to main content

Rails Delegated Analyzer

PyPI version License: MIT Downloads LinkedIn

Rails Delegated Analyzer is a Python package designed to help developers understand and apply the Rails Delegated Type pattern. It analyzes text-based descriptions of database relationships or use cases and provides structured explanations for implementing delegated types in Rails applications.

Features

  • Analyzes user input about data models or scenarios
  • Provides structured explanations for implementing delegated types
  • Assists in designing polymorphic-like structures in Rails applications
  • Supports custom LLM instances for flexible usage

Installation

pip install rails_delegated_analyzer

Usage

Basic Usage

from rails_delegated_analyzer import rails_delegated_analyzer

user_input = "Describe your data model or scenario here."
response = rails_delegated_analyzer(user_input)
print(response)

Using a Custom LLM Instance

The package uses ChatLLM7 from langchain_llm7 by default. However, you can safely pass your own LLM instance if you want to use another LLM.

Example with OpenAI

from langchain_openai import ChatOpenAI
from rails_delegated_analyzer import rails_delegated_analyzer

llm = ChatOpenAI()
response = rails_delegated_analyzer(user_input, llm=llm)
print(response)

Example with Anthropic

from langchain_anthropic import ChatAnthropic
from rails_delegated_analyzer import rails_delegated_analyzer

llm = ChatAnthropic()
response = rails_delegated_analyzer(user_input, llm=llm)
print(response)

Example with Google

from langchain_google_genai import ChatGoogleGenerativeAI
from rails_delegated_analyzer import rails_delegated_analyzer

llm = ChatGoogleGenerativeAI()
response = rails_delegated_analyzer(user_input, llm=llm)
print(response)

Using a Custom API Key

If you want to use a custom API key for LLM7, you can pass it directly or via an environment variable.

Using Environment Variable

export LLM7_API_KEY="your_api_key"

Passing API Key Directly

from rails_delegated_analyzer import rails_delegated_analyzer

user_input = "Describe your data model or scenario here."
response = rails_delegated_analyzer(user_input, api_key="your_api_key")
print(response)

Rate Limits

The default rate limits for LLM7 free tier are sufficient for most use cases of this package. If you need higher rate limits, you can get a free API key by registering at LLM7.

Issues

If you encounter any issues, please report them on the GitHub issues page.

Author

Metadata

Release files for rails-delegated-analyzer 2025.12.21150543

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rails-delegated-analyzer 2025.12.21150543
File Size Uploaded Provenance Actions
rails_delegated_analyzer-2025.12.21150543.tar.gz 4.8 kB Without provenance Details for rails_delegated_analyzer-2025.12.21150543.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rails-delegated-analyzer 2025.12.21150543
File Interpreter ABI Platform Actions
rails_delegated_analyzer-2025.12.21150543-py3-none-any.whl Python 3 none any Details for rails_delegated_analyzer-2025.12.21150543-py3-none-any.whl

Total release size: 10.3 kB

Release files / rails_delegated_analyzer-2025.12.21150543.tar.gz

Download URL rails_delegated_analyzer-2025.12.21150543.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
08b520ef78947ac7e5762a4f4a6252edf9334b7afa81bd15cd2381836a4940ce
BLAKE2b-256 checksum
How to use checksums
e41c6b64949da6cf48e071f4ae15caadd5901d3eda815c438eb52971fb5c8b4d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.1

Release files / rails_delegated_analyzer-2025.12.21150543-py3-none-any.whl

Download URL rails_delegated_analyzer-2025.12.21150543-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7247fb94ae00b6a947106eadf68822b1b3fbb62798a531d3a8c9f04bea55dfae
BLAKE2b-256 checksum
How to use checksums
491125fbe0a9bf3e85d065473a2308d4ee847bf709d2f07b8a9d5f944caccd0b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.1

Security for rails-delegated-analyzer 2025.12.21150543

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page