Skip to main content

hwpx-agent

프롬프트를 통해 hwpx을 파일을 생성하고 수정하는 agent

시작하기

pip install hwpx-agent
import asyncio
import os
from hwpx import HwpxDocument
from hwpx_agent.hwpx_agent import HwpxAgent


os.environ["OPENAI_API_KEY"] = "sk-??"

async def main():
    agent = HwpxAgent(
        model="gpt-4.1-mini-2025-04-14",
    )

    hwpx_document: HwpxDocument = await agent.generate_template(
        prompt="생명과학 논문을 작성하고 싶은데 그거에 대한 초안을 작성해주고, 테이블로 이해하기 쉽도록 작성해줘"
    )

    hwpx_document.save_to_path("life_science.hwpx")

if __name__ == "__main__":
    asyncio.run(main())

hwpx 파일 생성하기 (generate_template)

프롬프트를 바탕으로 새로운 HWPX 문서 초안을 생성합니다.

시그니처 (Signature)

from hwpx import HwpxDocument

async def generate_template(
    prompt: str,
) -> HwpxDocument:
    ...

파라미터 (Parameters)

파라미터 타입 기본값 설명
prompt str 필수 생성할 HWPX 문서의 내용, 구조, 구성 요소(표, 제목 등)에 대한 자연어 요청 사항

리턴 타입 (Return)

  • HwpxDocument 생성된 HWPX 문서 객체를 반환합니다. 반환된 객체의 .save_to_path("파일명.hwpx") 메서드를 호출하여 파일로 저장할 수 있습니다.

사용 예시 (Example)

from hwpx import HwpxDocument

hwpx_document: HwpxDocument = await agent.generate_template(
    prompt="생명과학 논문 초안 및 요약 표 작성"
)
hwpx_document.save_to_path("output.hwpx")

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hwpx_agent-0.0.2.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

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

hwpx_agent-0.0.2-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file hwpx_agent-0.0.2.tar.gz.

File metadata

  • Download URL: hwpx_agent-0.0.2.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for hwpx_agent-0.0.2.tar.gz
Algorithm Hash digest
SHA256 ffabc6ccd6b0ca7d35a3d445f00c7e04de9c5cf4a2df7413de7cd8c30541fb0a
MD5 81556938b99398e9e7a450cf5048a283
BLAKE2b-256 6ac3e5a29fc10ee661b46b2755a6e8eb1b88f83e088aee28d6052399afa40d37

See more details on using hashes here.

Provenance

The following attestation bundles were made for hwpx_agent-0.0.2.tar.gz:

Publisher: workflow.yml on Seungkyu-Han/hwpx-agent-python

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

File details

Details for the file hwpx_agent-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: hwpx_agent-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for hwpx_agent-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1cd24a3cd7f66916d27796ce1097073be77c011d61a76fec1a38e026fec63368
MD5 eebb1a3de177c2430f45b25cb627df35
BLAKE2b-256 d466255c0536f7d4ee8e64ee5159d9daff076ae66668037bd9e91e837347c2b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for hwpx_agent-0.0.2-py3-none-any.whl:

Publisher: workflow.yml on Seungkyu-Han/hwpx-agent-python

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

Release history Release notifications | RSS feed

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

This release

0.0.2 This release

2 files

0.0.1

2 files

0.0.0

2 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