llmcodxtracter
llmcodxtracter is a Python package designed to extract code snippets from plain text using Large Language Models (LLMs).
Installation
Install via pip:
pip install llmcodxtracter
Usage
python
from llmcodxtracter.processor import LLMOutputProcessor
from llmcodxtracter.validator import LLMOutputValidator
from llmcodxtracter.extractor import LLMCodeExtractor
from llmcodxtracter.exceptions import LLMOutputException
# Instantiate components
validator = LLMOutputValidator()
extractor = LLMCodeExtractor()
processor = LLMOutputProcessor(validator, extractor)
# Example usage
text = "```python //script.py print('Test')```"
try:
code_block = processor.process(text)
print(code_block)
except LLMOutputException as e:
print(f"Error processing LLM output: {e}")
Features
- Extracts code snippets from plain text.
- Supports multiple programming languages.
- Easily integrates into other LLM-based projects.
Contributing
- Fork the repository.
- Clone it: git clone https://github.com/DarthMuzammil/llmcodxtracter.git
- Install dependencies: pip install -r requirements.txt
- Submit a pull request!
License
This project is licensed under the MIT License.
Next Steps
- Make sure
src/lasso/__init__.pyexists. - Create
pyproject.toml(or usesetup.pyif preferred). - Build and upload to PyPI using
twine.
Let me know if you need help with any step! 🚀
Metadata
Release files for llmcodxtracter 0.2.5
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 | |
|---|---|---|---|---|
| llmcodxtracter-0.2.5.tar.gz | 4.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| llmcodxtracter-0.2.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.3 kB
Release files / llmcodxtracter-0.2.5.tar.gz
| Download URL | llmcodxtracter-0.2.5.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1e51aa87e6cda14de2906d6872407cb9539906d1bfa29310381fe6dc9c4a069c
|
|
BLAKE2b-256 checksum How to use checksums |
52a5a84aafded0be43ec9b4b1b45439b455c4e0669bea8d416e138c8a613f432
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|
Release files / llmcodxtracter-0.2.5-py3-none-any.whl
| Download URL | llmcodxtracter-0.2.5-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
49da5f12380bd45c4ad8cddaa55c2fa00ec884e09d553f8a23c2f85b19fee012
|
|
BLAKE2b-256 checksum How to use checksums |
29f6287b83bd2142838f7d7d8289322d1826e12462ed7260ffb42a3c1ef8981e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|
Security for llmcodxtracter 0.2.5
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.