Ubai Client

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

Universal Binary Archiver Service client for Python. Version 1.2.1, monthly releases.

pip install ubai-client
error ModuleNotFoundError: No module named 'ubai'
cause Old module name 'ubai' no longer exists after package rename to 'ubai-client'.
fix
Install 'pip install ubai-client' and change import to 'from ubai_client import UbaiClient'.
error ImportError: cannot import name 'UbaiClient' from 'ubai'
cause Mixing old package name with new import symbol.
fix
Use 'from ubai_client import UbaiClient' after installing ubai-client version 1.0.0+.
error ubai_client.exceptions.UnauthorizedError: 401 - Invalid API key
cause API key not set or invalid.
fix
Set UBAI_API_KEY environment variable with a valid key.
breaking Package renamed from 'ubai' to 'ubai-client' in v1.0.0. Update imports and requirements.
fix Replace 'import ubai' with 'import ubai_client' and update requirements to 'ubai-client>=1.0.0'.
gotcha API key must be set via environment variable or passed explicitly. Missing key raises UnauthorizedError.
fix Set UBAI_API_KEY environment variable or pass api_key kwarg to UbaiClient.
deprecated Method 'archive_file' renamed to 'archive' in v1.1.0.
fix Use 'client.archive()' instead of 'client.archive_file()'.

Initialize client with API key and archive a binary file.

from ubai_client import UbaiClient

client = UbaiClient(api_key=os.environ.get('UBAI_API_KEY', ''))
result = client.archive('/path/to/binary')
print(result)