Skip to main content

Orbex Connect Python SDK

Connect to Orbex Buckets using simple client and resource APIs.

python -m pip install -e sdks/python-orbex-bucket
export ORBEX_API_KEY="your-64-character-api-key"

Low-level client:

import orbex_connect

orbex = orbex_connect.client()
orbex.create_bucket(Bucket="analytics-data")
orbex.upload_file("orders.csv", "analytics-data", "incoming/orders.csv")

response = orbex.get_object(Bucket="analytics-data", Key="incoming/orders.csv")
data = response["Body"].read()

for item in orbex.list_objects_v2(Bucket="analytics-data", Prefix="incoming/")["Contents"]:
    print(item["Key"], item["Size"])

orbex.download_file("analytics-data", "incoming/orders.csv", "downloaded.csv")
orbex.delete_object(Bucket="analytics-data", Key="incoming/orders.csv")

Resource API:

orbex = orbex_connect.resource()
bucket = orbex.Bucket("analytics-data")
bucket.put_object(Key="reports/summary.json", Body='{"status":"ready"}', ContentType="application/json")

for obj in bucket.objects.filter(Prefix="reports/"):
    print(obj.key, obj.size)

Supported client methods include list_buckets, create_bucket, delete_bucket, head_bucket, put_object, get_object, head_object, delete_object, delete_objects, copy_object, list_objects_v2, upload_file, upload_fileobj, download_file, download_fileobj, and get_paginator.

For local development pass base_url="http://localhost:3000" to orbex_connect.client() or set ORBEX_ENDPOINT_URL.

Managed Genorbex notebooks can use the injected ORBEX_API_TOKEN and ORBEX_API_URL variables automatically; no credentials need to appear in code.

Download files

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

Source Distribution

orbex_connect-0.1.1.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

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

orbex_connect-0.1.1-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file orbex_connect-0.1.1.tar.gz.

File metadata

  • Download URL: orbex_connect-0.1.1.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.2

File hashes

Hashes for orbex_connect-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b5c514736b4339359c565b12ac1bab8030174d8315e5770fe85d37a01565b6d8
MD5 3971019d0928c155cbc8a4f9e534d581
BLAKE2b-256 e82709bc93e9728d16b7cef39de9a91584d8640eb4e2032cf1534bee268e6192

See more details on using hashes here.

File details

Details for the file orbex_connect-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: orbex_connect-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.2

File hashes

Hashes for orbex_connect-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 95829b0dc0be772645f281616fa9aef45389de8eb1e0acd8d42f3862468616a8
MD5 33da00ff97c2d31fb19c12944873bd0b
BLAKE2b-256 5fe9c2e063df865b500567caa7417d1d02cfe23c75d1a3d4269e8ab3e105fa2e

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

0.1.0

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