Skip to main content

digline-anthropic

An Anthropic target for digline: a prompt file goes in, a priced Response comes out.

from pathlib import Path
from digline_anthropic import AnthropicTarget

target = AnthropicTarget(
    prompt_file=Path(__file__).parent / "prompts/answer.md",
    system_file=Path(__file__).parent / "prompts/system.md",
    model="claude-sonnet-5",
    max_tokens=1024,
    prefill="{",  # put JSON in the model's mouth
)

Both files are recorded in every run, so the committed baseline carries the prompt that produced it. Cost comes from a price list declared in code and replaceable in one argument; an unknown model raises rather than costing nothing. The key is never named here — the SDK reads ANTHROPIC_API_KEY.

Apache-2.0. Docs: digline/digline.

Download files

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

Source Distribution

digline_anthropic-0.1.0.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

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

digline_anthropic-0.1.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file digline_anthropic-0.1.0.tar.gz.

File metadata

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

File hashes

Hashes for digline_anthropic-0.1.0.tar.gz
Algorithm Hash digest
SHA256 586ca6b76580cef9c1839110ad4a934dacdc3ca2323d8cc29c848e8eba0b4b39
MD5 2b41e33a1cc0c2daab3f0decc700f6a5
BLAKE2b-256 1274f7b5d3a18a51002b7fbd814af3e9adc7b30d29dcf8f34de33f8a37e6a870

See more details on using hashes here.

Provenance

The following attestation bundles were made for digline_anthropic-0.1.0.tar.gz:

Publisher: publish.yml on digline/digline

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

File details

Details for the file digline_anthropic-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for digline_anthropic-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a9293e500b8449a1ac5f0e99ec8d8063e0531ee9b52ebfc883e40bce19a781b5
MD5 c80d9b581bf813bec3dee6922b60111a
BLAKE2b-256 a1c0a43839efaa49cc61408f61c6ad9f6d749b8125174e101d65ceef5f2e1bb2

See more details on using hashes here.

Provenance

The following attestation bundles were made for digline_anthropic-0.1.0-py3-none-any.whl:

Publisher: publish.yml on digline/digline

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

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Supported by

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