Skip to main content

Agentic Ability in One Line

Project description

TextPy

| Documentation | Blog | Paper |

TextPy ── Agentic Ability in One Line

🚀 Core Philosophy

Code as Natural Language Manifestation

Programming <-> Prompting

⚡ Revolutionary Features

  • Hybrid Execution: Seamlessly blend LLM-generated code with legacy systems
  • Semantic Transpiler: Just write function signatures, and our powerful AIComipler will auto-generate natural language instructions (TextFunc) or code generation instructions (CodeFunc) for your workflow
  • Self-Replication: Extend the framework using our @text and @code decorators for easier support of recursive workflows

🛠️ Quick Start

# examples/write_poem.py
from textpy import code, text

# the text/code will auto-generated by AICompiler(Just in Time)
@text
def generate_poem(*, theme: str, style: str) -> str: ...

@code
# text should in center of the SVG, use a white background, add visually striking elements
def create_svg_from_text_with_svgwrite(*, text: str) -> str: ...

@code
def save_svg_to_file(*, svg: str, path: str): ...

# execute this code
poem = generate_poem(theme="Quantum Physics and Romance", style="haiku")
svg = create_svg_from_text_with_svgwrite(text=poem)
save_svg_to_file(svg=svg, path="poem.svg")
pip install textpy-llm
# NOTE: set your api key, api url, and model like @code(api_key="", base_url="", model="")
# or using env, ref: litellm
python examples/write_poem.py

🗯️ Awesome Example

# this example will summary the paper
# and aswsome! to recursively read all references and summarize them, then generate a relationship diagram in HTML format
cd ./examples
DEEPSEEK_API=xxx ARXIV_ID=<xxxx.xxxx> ./arxiv_search.sh

📌 Join the Revolution

git clone https://github.com/yezhengmao1/TextPy

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

textpy_llm-0.1.1.tar.gz (12.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

textpy_llm-0.1.1-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

Details for the file textpy_llm-0.1.1.tar.gz.

File metadata

  • Download URL: textpy_llm-0.1.1.tar.gz
  • Upload date:
  • Size: 12.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for textpy_llm-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d8aab5224da7853aa0ecf050b38cfada26b7206bee1d97b0cefe8d5883ac1584
MD5 3e5eaf8666364bb72acb34f900bcdf0a
BLAKE2b-256 f7f6f3497aad2a18e2e67bf5526a6f21ca3ce3c68d3107bbe47f82107c73f7c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for textpy_llm-0.1.1.tar.gz:

Publisher: python-publish.yml on yezhengmao1/TextPy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file textpy_llm-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: textpy_llm-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 16.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for textpy_llm-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ba90a30ce72a602e399c8680ad2f86386d615160ae1af73b98997bcff061dbfa
MD5 4a25a68f7b82b84f8aa51ad2f81c49ea
BLAKE2b-256 8794d976bebf2b2675d7b22c4c4afa946febed7867ff01125f6a33309996eb18

See more details on using hashes here.

Provenance

The following attestation bundles were made for textpy_llm-0.1.1-py3-none-any.whl:

Publisher: python-publish.yml on yezhengmao1/TextPy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page