Skip to main content

data-convertible

PyPI version License: MIT Downloads LinkedIn

A Python package that provides a structured and reliable way to process user input related to common developer utilities such as JSON, Base64, URL, and hash operations. It uses an LLM to interpret user requests and return formatted, validated outputs, ensuring consistency and correctness in the results.

Installation

You can install the package via pip:

pip install data_convertible

Usage

Here's a basic example of how to use the package:

from data_convertible import data_convertible

# Process user input
response = data_convertible("Convert 'hello' to base64")
print(response)

Parameters

  • user_input (str): The user input text to process.
  • llm (Optional[BaseChatModel]): The LangChain LLM instance to use. If not provided, the default ChatLLM7 will be used.
  • api_key (Optional[str]): The API key for LLM7. If not provided, the environment variable LLM7_API_KEY will be used, or a default free tier key will be used.

Using a Custom LLM

You can pass your own LangChain LLM instance if you want to use another LLM provider. For example, to use OpenAI:

from langchain_openai import ChatOpenAI
from data_convertible import data_convertible

llm = ChatOpenAI()
response = data_convertible("Validate this JSON: {'name': 'John'}", llm=llm)

To use Anthropic:

from langchain_anthropic import ChatAnthropic
from data_convertible import data_convertible

llm = ChatAnthropic()
response = data_convertible("Encode this URL: example.com?q=test", llm=llm)

To use Google Generative AI:

from langchain_google_genai import ChatGoogleGenerativeAI
from data_convertible import data_convertible

llm = ChatGoogleGenerativeAI()
response = data_convertible("Compute SHA256 of 'hello'", llm=llm)

API Key for LLM7

By default, the package uses ChatLLM7 from langchain_llm7 with a free tier API key. The default rate limits are sufficient for most use cases. If you need higher rate limits, you can:

  • Set the environment variable LLM7_API_KEY to your API key.
  • Pass the API key directly: data_convertible(..., api_key="your_api_key").

You can get a free API key by registering at https://token.llm7.io/.

Contributing

If you encounter any issues or have suggestions for improvements, please open an issue on GitHub.

Author

Metadata

Release files for data-convertible 2025.12.21173829

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

Source distribution (sdist)

Source distribution for data-convertible 2025.12.21173829
File Size Uploaded
data_convertible-2025.12.21173829.tar.gz 4.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for data-convertible 2025.12.21173829
File Interpreter ABI Platform
data_convertible-2025.12.21173829-py3-none-any.whl Python 3 none any Details

Total release size: 10.3 kB

Release files / data_convertible-2025.12.21173829.tar.gz

Download URL data_convertible-2025.12.21173829.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5865994a9cc4484b3366b2139106f78eca7bdc4d26d3de9cf6b1b549da3f2277
BLAKE2b-256 checksum
How to use checksums
df695394630efa47ddabef91e59708be402463df5fcb7cdc45c6fb630399f173
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.1

Release files / data_convertible-2025.12.21173829-py3-none-any.whl

Download URL data_convertible-2025.12.21173829-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8dd2353e32e742d942485a39e02041f064bc5a944044c46b4799a659b542cf4a
BLAKE2b-256 checksum
How to use checksums
e4e28da06445678a266108393856f10ec47c9f4847ee89a5c6895819ccfc3911
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.1

Release history Release notifications | RSS feed

This release

2025.12.21173829 This release

2 release files

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