TyphonLint-ThreadSafe
Thread Safety Analyzer for JavaScript Code
A package that analyzes JavaScript code snippets to detect potential race conditions and concurrency conflicts, helping developers ensure thread-safe implementations in multi-threaded environments like Node.js or web workers.
🚀 Installation
Install via pip:
pip install typhonlint_threadsafe
📝 Usage
Basic Usage (Default LLM7)
from typhonlint_threadsafe import typhonlint_threadsafe
# Analyze JavaScript code for thread safety
response = typhonlint_threadsafe(
user_input="""
// Example JavaScript code snippet
let sharedVar = 0;
function increment() {
sharedVar++;
}
setInterval(increment, 100);
"""
)
print(response)
Custom LLM Integration
You can replace the default LLM (ChatLLM7) with any LangChain-compatible model:
Using OpenAI
from langchain_openai import ChatOpenAI
from typhonlint_threadsafe import typhonlint_threadsafe
llm = ChatOpenAI()
response = typhonlint_threadsafe(
user_input="...", # Your JS code here
llm=llm
)
Using Anthropic
from langchain_anthropic import ChatAnthropic
from typhonlint_threadsafe import typhonlint_threadsafe
llm = ChatAnthropic()
response = typhonlint_threadsafe(
user_input="...", # Your JS code here
llm=llm
)
Using Google Generative AI
from langchain_google_genai import ChatGoogleGenerativeAI
from typhonlint_threadsafe import typhonlint_threadsafe
llm = ChatGoogleGenerativeAI()
response = typhonlint_threadsafe(
user_input="...", # Your JS code here
llm=llm
)
🔧 Parameters
| Parameter | Type | Description |
|---|---|---|
user_input |
str |
The JavaScript code snippet to analyze. |
api_key |
Optional[str] |
LLM7 API key (if not provided, falls back to LLM7_API_KEY env var). |
llm |
Optional[BaseChatModel] |
Custom LangChain LLM instance (defaults to ChatLLM7). |
🔑 API Key & Rate Limits
- Default LLM: Uses
ChatLLM7from langchain_llm7. - Free Tier: Sufficient for most use cases.
- Custom API Key: Pass via
api_keyparameter orLLM7_API_KEYenv var. - Get API Key: Register at LLM7.
📌 Features
- Detects race conditions in JavaScript code.
- Validates concurrency patterns.
- Structured output for easy integration.
- Supports custom LLMs for flexibility.
📝 Output
Returns a list of structured assessments indicating:
- Potential thread safety issues.
- Safe concurrency patterns.
- Confirmed correct implementations.
📂 License
MIT
📧 Support & Issues
For bugs or feature requests, open an issue on GitHub.
👤 Author
Eugene Evstafev (@chigwell) 📧 hi@euegne.plus
Metadata
Release files for typhonlint-threadsafe 2025.12.21130210
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| typhonlint_threadsafe-2025.12.21130210.tar.gz | 4.2 kB | Without provenance | Details for typhonlint_threadsafe-2025.12.21130210.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| typhonlint_threadsafe-2025.12.21130210-py3-none-any.whl | Python 3 | none | any | Details for typhonlint_threadsafe-2025.12.21130210-py3-none-any.whl |
Total release size: 9.2 kB
Release files / typhonlint_threadsafe-2025.12.21130210.tar.gz
| Download URL | typhonlint_threadsafe-2025.12.21130210.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bd59abef9719f4eaaf4f0d868492a959e186367f57bf27c87b8d041cd204c50d
|
|
BLAKE2b-256 checksum How to use checksums |
488cf4709ca9012d93581b02ba71bc3991f656f5d7fac8788fb3356c8b106d7f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.1
|
Release files / typhonlint_threadsafe-2025.12.21130210-py3-none-any.whl
| Download URL | typhonlint_threadsafe-2025.12.21130210-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
afd7b2681f69c88e5a33a2015deb9e99f5cdf58f2d7a001d38a660e733e2493c
|
|
BLAKE2b-256 checksum How to use checksums |
0018ecae0488fc45d4ae3e38888775b3b51f2634ed4d212d02e48d38cd8555ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.1
|
Security for typhonlint-threadsafe 2025.12.21130210
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.