Skip to main content

Python SDK for a C++ image processing API server

Project description

설명

  • 이미지 처리를 해주는 서버에 쉽게 요청하게 해주는 라이브러리.
  • 최신 서버 ip : 3.106.215.74, 포트 : 8080

테스트용 코드

  • python
# 패키지에서 ImageApiClient를 가져온다.
from image_api_sdk import ImageApiClient


# 서버 주소를 넣어서 클라이언트 생성
client = ImageApiClient("http://3.106.215.74:8080")

# 서버 헬스체크
# /health를 호출해서 서버가 살아 있는지 확인
print(client.health())

# 실제 이미지 처리 요청
result = client.process_image(
    image_url="https://image.utoimage.com/preview/cp872722/2022/12/202212008462_500.jpg",
    operations=[
        # 1단계: 흑백 변환
        {"type": "grayscale"},

        # 2단계: 블러 적용
        {
            "type": "blur",
            "options": {
                "ksize": 9,
                "sigma": 2.0
            }
            
        },
    ],
    output_format="jpg",
)

# 서버가 알려준 결과 메타데이터 출력
print("mime_type =", result.mime_type)
print("width =", result.width)
print("height =", result.height)

# 결과 이미지를 파일로 저장
result.save("result.jpg")

# Pillow 이미지 객체로 바꾼 뒤 기본 이미지 뷰어로 띄워보기
img = result.to_pil()
img.show()

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

image_api_sdk-0.1.3.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

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

image_api_sdk-0.1.3-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file image_api_sdk-0.1.3.tar.gz.

File metadata

  • Download URL: image_api_sdk-0.1.3.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for image_api_sdk-0.1.3.tar.gz
Algorithm Hash digest
SHA256 390a4b00c712b6b96d26b4fe70376750f772e7d19d909a798e7d1c7ea8bb31d5
MD5 e77cdf10f14341497697731475a577ca
BLAKE2b-256 02183735e3ee51869c8a118b401e9409002de038b5c7795f3718d8cca1b286ac

See more details on using hashes here.

File details

Details for the file image_api_sdk-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: image_api_sdk-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for image_api_sdk-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 daa4ceb6251349b976c6d8fd73ec370cf48d8226abe47f26dd20e6c971556980
MD5 37028983c9a9779f626d355c200bc199
BLAKE2b-256 36f4436de9e9f961ec0af478dcafe9ad9b3474c4863d3474a8e71fff4a7f6338

See more details on using hashes here.

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