Metadata-Version: 2.2
Name: orbex-connect
Version: 0.1.1
Summary: Official Python SDK for connecting to Genorbex Orbex Buckets.
Author-email: Genorbex AI <support@genorbex.com>
License: MIT
Project-URL: Homepage, https://www.genorbex.com/orbexdb
Project-URL: Documentation, https://www.genorbex.com/orbex
Keywords: orbex,genorbex,bucket,object-storage,sdk
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: System :: Archiving
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == "dev"

# Orbex Connect Python SDK

Connect to Orbex Buckets using simple client and resource APIs.

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

Low-level client:

```python
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:

```python
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.
