Skip to main content

Pilot Platform Storage Manager

Run Tests Python PyPI

Provides a simple and flexible Python library for efficient and reliable object storage solutions. Enables direct interaction with multiple object storage APIs, starting with Azure Blob API and with plans to add more in the future

Getting Started

Manager

import asyncio
from object_storage.factories import get_manager

connection_string = 'DefaultEndpointsProtocol=https;AccountName=pilot;AccountKey=any;EndpointSuffix=core.windows.net'
azr_manager = get_manager('azure', connection_string)

account_sas = asyncio.run(azr_manager.get_container_sas('test'))
print(blob_sas)
> 'https://pilot.blob.core.windows.net/test/file.txt?sp=rw&st=2023-04-28T15:15:14Z&se=2023-04-28T23:15:14Z&spr=https&sv=2021-12-02&sr=b&sig=account_signature'


blob_sas = asyncio.run(azr_manager.get_blob_sas('test', 'small.txt'))

print(blob_sas)
> 'https://pilot.blob.core.windows.net/test/file.txt?sp=rw&st=2023-04-28T15:15:14Z&se=2023-04-28T23:15:14Z&spr=https&sv=2021-12-02&sr=b&sig=blob_signature'


blobs_list = asyncio.run(azr_manager.list_objects('test'))
print(blobs_list)
> [<class 'azure.storage.blob._models.BlobProperties'>, ...]


blobs_list = asyncio.run(azr_manager.create_container('test'))

File Client

import asyncio
from object_storage.factories import get_file_client

blob_sas_url = 'https://pilot.blob.core.windows.net/test/file.txt?sp=rw&st=2023-04-28T15:15:14Z&se=2023-04-28T23:15:14Z&spr=https&sv=2021-12-02&sr=b&sig=account_signature'
azr_file_client = get_file_client('azure', blob_sas_url)
asyncio.run(azr_file_client.upload_file('./small.txt'))

Container Client

import asyncio
from object_storage.factories import get_container_client

container_sas_url = 'https://pilot.blob.core.windows.net/test?sp=rw&st=2023-04-28T15:15:14Z&se=2023-04-28T23:15:14Z&spr=https&sv=2021-12-02&sr=b&sig=account_signature'
azr_container_client = get_container_client('azure', container_sas_url)
asyncio.run(azr_container_client.upload_file('small.txt', './small.txt'))

Installation & Quick Start

The latest version of the object-storage package is available on PyPi and can be installed into another service via Pip.

Pip install from PyPi:

pip install pilot-platform-object-storage

In pyproject.toml:

pilot-platform-object-storage = "^<VERSION>"

Pip install from a local .whl file:

pip install pilot_platform_object_storage-<VERSION>-py3-none-any.whl

Documentation

API Reference and User Guide available at pilotdataplatform.github.io/object-storage

Contribution

You can contribute the project in following ways:

  • Report a bug.
  • Suggest a feature.
  • Open a pull request for fixing issues or adding functionality. Please consider using pre-commit in this case.
  • For general guidelines on how to contribute to the project, please take a look at the contribution guide.

Metadata

Release files for pilot-platform-object-storage 3.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pilot-platform-object-storage 3.0.0
File Size Uploaded Provenance Actions
pilot_platform_object_storage-3.0.0.tar.gz 14.5 kB Without provenance Details for pilot_platform_object_storage-3.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pilot-platform-object-storage 3.0.0
File Interpreter ABI Platform Actions
pilot_platform_object_storage-3.0.0-py3-none-any.whl Python 3 none any Details for pilot_platform_object_storage-3.0.0-py3-none-any.whl

Total release size: 37.1 kB

Release files / pilot_platform_object_storage-3.0.0.tar.gz

Download URL pilot_platform_object_storage-3.0.0.tar.gz
Size 14.5 kB
Tags Source
SHA-256 checksum
How to use checksums
65a57f8a4f208cf2e2b21b3ba3fbfb9b00dcbe6d094116d3aaa69c71bdf496f0
BLAKE2b-256 checksum
How to use checksums
3ab625f24dfab8f560ead21c5d018917d1d08b67b177c6a99b1abbd835c25f97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / pilot_platform_object_storage-3.0.0-py3-none-any.whl

Download URL pilot_platform_object_storage-3.0.0-py3-none-any.whl
Size 22.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f70662b1ed3da110b6bd1cb9013fddf869fdcf76b6d7e866da05320b90475df3
BLAKE2b-256 checksum
How to use checksums
3f9ed5f801977682b28002509571f486366c334ef5809c5b746cc7f8d45c72ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for pilot-platform-object-storage 3.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page