Skip to main content

Set of python tools that eases integration of cloud services in Python projects

Project description

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.

Project details


Download files

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

Source Distribution

cloudspeak-0.1.2.tar.gz (28.7 kB view details)

Uploaded Source

Built Distribution

cloudspeak-0.1.2-py3-none-any.whl (76.2 kB view details)

Uploaded Python 3

File details

Details for the file cloudspeak-0.1.2.tar.gz.

File metadata

  • Download URL: cloudspeak-0.1.2.tar.gz
  • Upload date:
  • Size: 28.7 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for cloudspeak-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ffcacbd200c7248de5075cb3b08a7e13caf46c2c81a621ad638faf7c692e3bea
MD5 a1f6181c06057a0378bab59c806dbff5
BLAKE2b-256 02fe0b3d3f789e5b335a0a2e809e372c73dd8b7332b771eb3c27efbc88ddaec0

See more details on using hashes here.

File details

Details for the file cloudspeak-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: cloudspeak-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 76.2 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for cloudspeak-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bd3f2f4bb9234765e4ea9423020924c97c1e81fccdd4ffe01e7bdb46105a6f18
MD5 7bb324c75b82e6cc14e8508b52aab5fa
BLAKE2b-256 bde1de554fc984e91c0ca432a21ad2b528b3808068e46c30be95a7c96c9a2540

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page