Skip to main content

Python SDK for meltingface.eu

Project description

Melting Face 🫠

A Python SDK that allows you to load prompts hosted on meltingface.eu. The library handles:

  • Simple prompt objects (Prompt)
  • Fetching public and private prompts from the MeltingFace hub
  • Caching to avoid repeated downloads

Installation

pip install meltingface

Basic Usage

Loading a Public Prompt

from meltingface import Prompt

# Load a prompt from the public hub
prompt = Prompt.from_hub("owner/repo", version="0.1.0")

print(prompt.text)   # -> "Hello from my prompt!"
print(prompt.version) # -> "v1"

Loading a Private Prompt

Private prompts require authentication with an API key:

from meltingface import Prompt

# Option 1: Pass the API key directly
prompt = Prompt.from_hub("owner/private-repo", api_key="your-api-key")

# Option 2: Set the MELTINGFACE_API_KEY environment variable
# export MELTINGFACE_API_KEY="your-api-key"
prompt = Prompt.from_hub("owner/private-repo")

Coming Soon: API key support for accessing private prompts will be available on meltingface.eu as a paid feature. This will allow you to create, manage, and use private prompts programmatically in your applications.

Premium Subscription Benefits:

  • Generate API keys to access your private prompts programmatically
  • Use version-controlled prompts in programmatically
  • Manage team access to shared prompts

Stay tuned for our official launch with multiple subscription tiers for individuals and teams.

API Reference

  • repo_id ("owner/repo") is how you reference your prompt's repository on meltingface.eu
  • version is optional; if not provided, the library defaults to "latest"
  • api_key is required for private prompts; can be passed directly or via the MELTINGFACE_API_KEY environment variable
  • cache_dir lets you specify a custom cache location (defaults to ~/.meltingface/prompts)
  • force_download when set to True, bypasses the cache and fetches the prompt again

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

meltingface-0.1.3.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

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

meltingface-0.1.3-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file meltingface-0.1.3.tar.gz.

File metadata

  • Download URL: meltingface-0.1.3.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.4

File hashes

Hashes for meltingface-0.1.3.tar.gz
Algorithm Hash digest
SHA256 46b3bbfe8b1b913c787e32718ad77f437a87f3643aa36f8bb88d8f271456a001
MD5 26b35a65768dd14eb0f909a299ea62cc
BLAKE2b-256 ed8fe50166dc0f264528de9dc8ac15db6ae37318b45ad1eeaadb21cc37a6a907

See more details on using hashes here.

File details

Details for the file meltingface-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for meltingface-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4da9f981daf6ff28cb03af8096dcb13aef1a267a5aea8889a3cf07c2cdc7e3b1
MD5 669f00f3349121062c9bb56be2233d9b
BLAKE2b-256 e7d2f3586ca83fb7f16ab1a9e2196cad0fdfdbc907001e0f1f516ae274e7bbbf

See more details on using hashes here.

Supported by

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