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.prompt 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.prompt 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")

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.2.tar.gz (12.3 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.2-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for meltingface-0.1.2.tar.gz
Algorithm Hash digest
SHA256 68ccb52984bf11571e125eaad586f9201553466a1e0f33f9e4db84bc70b0209c
MD5 4710409060374675aae5edf571d86188
BLAKE2b-256 a4553fe5bc772e89b6e32a3e5122d4ea7b9cd9200c3aa25f96e6172dc4f26b63

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for meltingface-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 df843a5d0216351ad75b6d71004fd932caeae647da2b582510b3e14d88ab3775
MD5 de87540e7301173e6193f1da36dc36d7
BLAKE2b-256 38345106fcb182581681a4e49d59d0d8d2f1582f2b806024808ad328f88ca152

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