olot

raw JSON →
0.1.17 verified Fri May 01 auth: no python

OCI layers on top — a Python library for building and manipulating OCI container images at the layer level. Current version 0.1.17, active development, monthly releases.

pip install olot
error ModuleNotFoundError: No module named 'olot'
cause Outdated pip or missing installation.
fix
Run pip install --upgrade olot or pip install olot.
error TypeError: RegistryClient.__init__() got an unexpected keyword argument 'insecure'
cause Using old parameter that was removed in 0.1.15.
fix
Replace insecure with tls_verify.
error StopIteration during blob content iteration
cause Iterating over Blob.content more than once (generator exhausted).
fix
Convert to list or bytes: data = list(blob.content) or data = b''.join(blob.content) and reuse the variable.
breaking RegistryClient constructor changed signature in 0.1.15: removed `insecure` parameter, added `tls_verify`.
fix Replace `insecure=True` with `tls_verify=False`.
deprecated olot.push_layer() is deprecated since 0.1.16, use RegistryClient.push() instead.
fix Migrate to RegistryClient.push(manifest, blobs).
gotcha Blob.content is a generator by default; calling it multiple times yields empty after first iteration. Always consume or convert to bytes once.
fix Use `content = b''.join(blob.content)` for reliable reuse.

Initialize a registry client for OCI operations.

import os
from olot import RegistryClient

# Use environment variables for auth
registry = os.environ.get('REGISTRY_URL', 'https://index.docker.io/v1/')
username = os.environ.get('REGISTRY_USERNAME', '')
password = os.environ.get('REGISTRY_PASSWORD', '')

client = RegistryClient(registry, username, password)
print('Connected to registry:', registry)