Installation#
Required Dependencies#
Optional, provider-specific dependencies (installed via extras):
- AWS S3: boto3 (1.35.40 or later)
- Google Cloud Storage: google-cloud-storage (2.1.0 or later), google-api-python-client (2.119.0 or later)
Installation Methods#
It's recommended to install unicloud in a virtual environment to avoid conflicts with your system's Python packages.
Conda#
The easiest way to install unicloud is using the conda package manager. unicloud is available in the conda-forge channel:
This installs the base package. For provider SDKs, add them explicitly:
PyPI#
Install the base package:
Install with provider extras:
pip install unicloud[s3] # pulls in boto3
pip install unicloud[gcs] # pulls in google-cloud-storage + google-api-python-client
pip install unicloud[all] # both providers
Pin a specific version:
From Sources#
The sources for unicloud can be downloaded from the GitHub repository.
You can clone the public repository:
Or download the tarball:
Once you have a copy of the source, install it with:
To install directly from GitHub (HEAD of main):
Or a specific release:
Development Installation#
If you are planning to contribute, make a git clone and do an editable install so your changes are picked up without reinstalling.
This project uses uv for dependency and environment management. To sync the dev environment (runtime deps + dev group + all provider extras):
To include the docs group:
Credentials#
AWS S3#
unicloud's S3 client reads credentials from the standard AWS environment variables:
AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYAWS_DEFAULT_REGION
It also honors IAM roles (on EC2 / ECS / Lambda) and the shared credentials file written by aws configure, because those are picked up by boto3 directly. You can pass a custom botocore.config.Config via the configs argument:
from botocore.config import Config
from unicloud.aws.aws import S3
s3 = S3(configs={
"config": Config(signature_version="s3v4"),
"region_name": "us-west-2",
})
Google Cloud Storage#
The GCS client supports three authentication modes:
- Service-account JSON file path passed directly:
GOOGLE_APPLICATION_CREDENTIALSenvironment variable pointing at a service-account JSON file:SERVICE_KEY_CONTENTenvironment variable containing the encoded contents of a service-account JSON file — useful for CI environments where you cannot ship a file. Encode it ahead of time withunicloud.utils.encode.
Verifying the Installation#
To check that the installation is successful, run:
And verify the provider you care about imports: