or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/modal@1.1.x
tile.json

tessl/pypi-modal

tessl install tessl/pypi-modal@1.1.0

Python client library for Modal, a serverless cloud computing platform that enables developers to run Python code in the cloud with on-demand access to compute resources.

Agent Success

Agent success rate when using this tile

85%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.6x

Baseline

Agent success rate without this tile

53%

task.mdevals/scenario-8/

Multi-Environment Configuration Manager

A utility that manages application credentials across different deployment environments using secure credential injection.

Capabilities

Load credentials from dictionary

  • When given a dictionary with keys "API_KEY" and "SECRET_TOKEN", the function creates a credential configuration that can be used by remote functions @test
  • When given an empty dictionary, the function creates a credential configuration with no values @test

Load credentials from environment variables

  • When environment variables "DATABASE_URL" and "API_ENDPOINT" are set locally, the function copies them to make them available in remote execution @test

Load credentials from configuration file

  • When given a path to a .env file containing "SERVICE_KEY=abc123" and "AUTH_TOKEN=xyz789", the function loads these credentials for remote use @test

Execute remote function with injected credentials

  • A remote function decorated with credential injection successfully accesses "API_KEY" from its environment variables when credentials are provided from a dictionary @test

Implementation

@generates

API

import modal

def create_credentials_from_dict(creds_dict: dict) -> modal.Secret:
    """
    Creates a credential configuration from a dictionary.

    Args:
        creds_dict: Dictionary mapping environment variable names to values

    Returns:
        A credential configuration object
    """
    pass

def create_credentials_from_env(*var_names: str) -> modal.Secret:
    """
    Creates a credential configuration by copying specified environment variables.

    Args:
        *var_names: Names of environment variables to copy

    Returns:
        A credential configuration object
    """
    pass

def create_credentials_from_file(filepath: str) -> modal.Secret:
    """
    Creates a credential configuration from a .env file.

    Args:
        filepath: Path to the .env file

    Returns:
        A credential configuration object
    """
    pass

Dependencies { .dependencies }

modal { .dependency }

Provides serverless cloud compute with credential management support.