Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.mirage.strukto.ai/llms.txt

Use this file to discover all available pages before exploring further.

Dependencies

uv sync --extra s3
OCI Object Storage uses the same aiobotocore dependency as S3 because MIRAGE talks to OCI through its S3-compatible API. For credential setup, see the OCI Setup guide.

Configuration

import os

from mirage import MountMode, Workspace
from mirage.resource.oci import OCIConfig, OCIResource

config = OCIConfig(
    bucket=os.environ["OCI_BUCKET"],
    namespace=os.environ["OCI_NAMESPACE"],
    region=os.environ["OCI_REGION"],
    access_key_id=os.environ["OCI_ACCESS_KEY_ID"],
    secret_access_key=os.environ["OCI_SECRET_ACCESS_KEY"],
)
resource = OCIResource(config)
ws = Workspace({"/oci/": resource}, mode=MountMode.READ)
The resource derives the default OCI S3 endpoint as:
https://<namespace>.compat.objectstorage.<region>.oci.customer-oci.com
It also forces path-style S3 addressing, which is the safest default for OCI.

Config Reference

FieldRequiredDefaultDescription
bucketYesOCI bucket name
namespaceYesObject Storage namespace
regionYesOCI region
endpoint_urlNoNoneCustom endpoint override
access_key_idYesOCI Customer Secret Key access key
secret_access_keyYesOCI Customer Secret Key secret
timeoutNo30Request timeout in seconds
proxyNoNoneHTTP proxy URL

Example Layout

If your bucket is mirage and your objects live under the data/ prefix, they appear under the mount like this:
/oci/data/example.json
/oci/data/example.jsonl