Skip to content

Commit

Permalink
misc/py-anthropic: new port - REST-based SDK for Anthropic API
Browse files Browse the repository at this point in the history
  • Loading branch information
dch committed May 22, 2024
1 parent f0fec65 commit 18ac24a
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 0 deletions.
1 change: 1 addition & 0 deletions misc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@
SUBDIR += py-SoapySDR
SUBDIR += py-accelerate
SUBDIR += py-alive-progress
SUBDIR += py-anthropic
SUBDIR += py-apache-beam
SUBDIR += py-ascii-magic
SUBDIR += py-ast-comments
Expand Down
30 changes: 30 additions & 0 deletions misc/py-anthropic/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
PORTNAME= anthropic
DISTVERSION= 0.26.0
CATEGORIES= misc python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}

MAINTAINER= dch@FreeBSD.org
COMMENT= Convenient access to the Anthropic REST API via python
WWW= https://github.com/anthropics/anthropic-sdk-python

LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE

BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}hatch-fancy-pypi-readme>=0:devel/py-hatch-fancy-pypi-readme@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}hatchling>=0:devel/py-hatchling@${PY_FLAVOR}
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}anyio>=3.5:devel/py-anyio@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}cached-property>=1.2.0:devel/py-cached-property@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}distro>0:sysutils/py-distro@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}httpx>=0.23.0:www/py-httpx@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pydantic2>1.9.0:devel/py-pydantic2@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}sniffio>0:devel/py-sniffio@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}tokenizers>0:textproc/py-tokenizers@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}typing-extensions>=4.7:devel/py-typing-extensions@${PY_FLAVOR}

USES= python
USE_PYTHON= autoplist concurrent pep517

NO_ARCH= yes

.include <bsd.port.mk>
3 changes: 3 additions & 0 deletions misc/py-anthropic/distinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
TIMESTAMP = 1716217275
SHA256 (anthropic-0.26.0.tar.gz) = 6aaffeb05d515cf9788eef57150a5f827f3786883628ccac71dbe5671ab6f44e
SIZE (anthropic-0.26.0.tar.gz) = 828128
5 changes: 5 additions & 0 deletions misc/py-anthropic/pkg-descr
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Provides convenient access to the Anthropic REST API from any Python application.
It includes type definitions for all request params and response fields, and
offers both synchronous and asynchronous clients powered by httpx.

The REST API documentation can be found on docs.anthropic.com.

0 comments on commit 18ac24a

Please sign in to comment.