Skip to main content

PyPI version Documentation Status

CloudSpeak - Azure Backend Abstractions for Python

CloudSpeak is a Python package that simplifies and abstracts the usage of Azure as a backend for specific Python data structures. It provides easy-to-use classes and methods for working with Azure Blob Storage and Azure Queue Storage, allowing you to seamlessly integrate Azure services into your Python applications.

Features

CloudSpeak offers the following key features:

  • Azure Blob Storage Interaction: Easily iterate through containers, create and delete them, and access individual blob files.

  • File Upload and Download: Seamlessly upload and download files to and from Azure Blob Storage with built-in tracking of upload and download progress.

  • Azure Blob Storage Lock Management: Efficiently manage locks offered by Azure Blob Storage to synchronize multiple processes.

  • Remote Dictionaries: Create and manage dictionaries hosted entirely in Azure Blob Storage. You can choose between indexed dictionaries (with a maintained index for key retrieval) and non-indexed dictionaries for faster access to dictionary keys.

  • Remote Queues: Create, send, and receive messages using a user-friendly interface, with Azure Storage as the backend.

Getting Started

To get started with CloudSpeak, follow these simple steps:

  1. Install CloudSpeak using pip:

    pip install cloudspeak
    
  2. Import the necessary modules and set up Azure credentials:

    from cloudspeak.azure import AzureCredentials
    from cloudspeak.azure import AzureFactory
    
    credentials = AzureCredentials()
    credentials.connection_string_storage = "YOUR_CONNECTION_STRING"
    
    factory = AzureFactory(credentials=credentials)
    
  3. Use CloudSpeak to interact with Azure services. For example, to access blob storage:

    service = factory.service_storage
    container = service.containers["example"]
    
    # Uploading content to a blob file named "file"
    file = container["file"]
    file.data = b"test"
    progress = file.upload()
    progress.join()
    
    # Downloading content from a blob file named "file"
    file = container["file"]
    progress = file.download()
    progress.join()
    downloaded_data = file.data
    
  4. Create and use remote queues:

    queue = factory.queue("example", create=True)
    queue.push("hello")
    
    message = queue.pop(wait_time=-1)
    
    # Automatically release the message from the queue when exiting the 'with' block.
    with message:
        print(message.content)
    
  5. Access remote dictionaries:

    factory = AzureFactory(credentials=credentials)
    
    # Create a non-indexed remote dictionary
    ad = factory.dictionary('container', 'example', create_container=False, indexed=False)
    
    ad["key"] = "value"
    print(ad["key"])
    
  • Transferring with progress:

Abstractions Overview

CloudSpeak provides two main abstractions:

Abstraction Description
Remote Dictionaries Dictionaries hosted entirely in Azure Blob Storage. Choose between indexed or non-indexed versions for various use cases.
Remote Queues User-friendly interface for managing queues with Azure Storage as the backend.

Documentation

For detailed documentation and examples, please refer to the CloudSpeak Documentation.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for cloudspeak 0.1.2

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

Source distribution (sdist)

Source distribution for cloudspeak 0.1.2
File Size Uploaded
cloudspeak-0.1.2.tar.gz 28.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cloudspeak 0.1.2
File Interpreter ABI Platform
cloudspeak-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 104.9 kB

Release files / cloudspeak-0.1.2.tar.gz

Download URL cloudspeak-0.1.2.tar.gz
Size 28.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ffcacbd200c7248de5075cb3b08a7e13caf46c2c81a621ad638faf7c692e3bea
BLAKE2b-256 checksum
How to use checksums
02fe0b3d3f789e5b335a0a2e809e372c73dd8b7332b771eb3c27efbc88ddaec0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.5.0.1 requests/2.31.0 setuptools/68.0.0 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.7.10

Release files / cloudspeak-0.1.2-py3-none-any.whl

Download URL cloudspeak-0.1.2-py3-none-any.whl
Size 76.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bd3f2f4bb9234765e4ea9423020924c97c1e81fccdd4ffe01e7bdb46105a6f18
BLAKE2b-256 checksum
How to use checksums
bde1de554fc984e91c0ca432a21ad2b528b3808068e46c30be95a7c96c9a2540
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.5.0.1 requests/2.31.0 setuptools/68.0.0 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.7.10

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

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