Skip to main content

Python client for Robin-Cloud storage and logs (X-Api-Key auth)

Project description

robin-cloud-client (Python)

Robin-Cloud 스토리지·로그를 API 키로 이용하는 Python SDK.

pip install robin-cloud-client

사용

from robincloud import RobinCloud

rc = RobinCloud(api_key="rbk_…", project="raxis")
# 또는 환경변수: ROBIN_CLOUD_API_KEY, ROBIN_CLOUD_BASE_URL

# 스토리지
rc.storage.create_bucket("assets")                       # storage:admin 스코프 필요
rc.storage.upload("assets", "img/logo.png", data)        # presign→PUT→complete 자동
raw = rc.storage.download("assets", "img/logo.png")      # -> bytes
listing = rc.storage.list_objects("assets", prefix="img/")
rc.storage.delete("assets", keys=["img/logo.png"])

# 로그
for src in rc.logs.sources():
    print(src.pod, src.containers)
print(rc.logs.tail(source="web-1", lines=200))

rc.close()   # 또는 with RobinCloud(...) as rc:

에러

상태코드가 타입 예외로 매핑된다: AuthenticationError(401), PermissionDeniedError(403), NotFoundError(404), ConflictError(409), PayloadTooLargeError(413), ValidationError(422), ServiceUnavailableError(503), 그 외 ApiError. 모두 RobinCloudError 하위.

from robincloud import PermissionDeniedError
try:
    rc.storage.create_bucket("x")
except PermissionDeniedError as e:
    print(e.status_code, e.message)   # 403 "key is missing required scope 'storage:admin'"

범위

  • 스토리지(버킷·오브젝트·업로드/다운로드·이동·삭제·public URL) + 로그(소스·tail).
  • 키 발급/폐기는 세션 인증이라 SDK 범위 밖(콘솔 UI).
  • 업로드는 단일 presigned PUT(~5GB 상한). 멀티파트는 백로그.

개발

cd python
uv venv && uv pip install -e ".[dev]"
uv run pytest          # respx 모킹, 실 네트워크 없음
uv run ruff check .

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

robin_cloud_client-0.1.0.tar.gz (41.5 kB view details)

Uploaded Source

Built Distribution

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

robin_cloud_client-0.1.0-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: robin_cloud_client-0.1.0.tar.gz
  • Upload date:
  • Size: 41.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for robin_cloud_client-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ae19662a2958bbd7464998d2c6311e850229a8e8e5852940f6501f86719b9a5c
MD5 b923533dbab9288557527521ea2c2710
BLAKE2b-256 7212cdc0b8c96ea5819e0fe584ef88d06897842c9393e5d1285ee1969c144c36

See more details on using hashes here.

File details

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

File metadata

  • Download URL: robin_cloud_client-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for robin_cloud_client-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c712a6b7452d76990a6a0953f821293c8511fc36680a02044feb803f870ebea7
MD5 ad761347562dfeb77f2dfbfe8730bc92
BLAKE2b-256 4c0a08546c378f18705c4f0ffe1b2f02ff276e31bf82f646c1486edc717a2dcb

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