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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pilot_platform_object_storage-1.5.0.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pilot_platform_object_storage-1.5.0-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

Details for the file pilot_platform_object_storage-1.5.0.tar.gz.

File metadata

File hashes

Hashes for pilot_platform_object_storage-1.5.0.tar.gz
Algorithm Hash digest
SHA256 78ae16c9833c59d705b1f0777f4cbf2c797537c8d21022d05b8f095b34aa1310
MD5 c0748991dc4b5f0f4bea51b5683577d0
BLAKE2b-256 423c5dfb6a2a0e0267ab3b7695ddd5e54b0870fb02b9b8114c8b62def71ff788

See more details on using hashes here.

File details

Details for the file pilot_platform_object_storage-1.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pilot_platform_object_storage-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 58d257f717d4c1d281faa429d80e48a3356eed2d87a4fe06ffe947083cee435c
MD5 2b90d00b0cdb0d800e6bcf9cc8ce4938
BLAKE2b-256 818d85bf2b8fe135fec13ab3fb0874c7b690bb2f54770dcdc115844f915bf388

See more details on using hashes here.

Release history Release notifications | RSS feed

2.1.0

2 files

2.0.0

2 files

1.9.0

2 files

1.8.1

2 files

1.7.0

2 files

1.6.0

2 files

1.5.8

2 files

1.5.7

2 files

1.5.4

2 files

1.5.3

2 files

1.5.2

2 files

1.5.1

2 files

This release

1.5.0 This release

2 files

1.4.0

2 files

1.3.0

2 files

1.2.0

2 files

1.1.1

2 files

1.1.0

2 files

1.0.0

2 files

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