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.euversionis optional; if not provided, the library defaults to"latest"api_keyis required for private prompts; can be passed directly or via the MELTINGFACE_API_KEY environment variablecache_dirlets you specify a custom cache location (defaults to ~/.meltingface/prompts)force_downloadwhen set to True, bypasses the cache and fetches the prompt again
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46b3bbfe8b1b913c787e32718ad77f437a87f3643aa36f8bb88d8f271456a001
|
|
| MD5 |
26b35a65768dd14eb0f909a299ea62cc
|
|
| BLAKE2b-256 |
ed8fe50166dc0f264528de9dc8ac15db6ae37318b45ad1eeaadb21cc37a6a907
|
File details
Details for the file meltingface-0.1.3-py3-none-any.whl.
File metadata
- Download URL: meltingface-0.1.3-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4da9f981daf6ff28cb03af8096dcb13aef1a267a5aea8889a3cf07c2cdc7e3b1
|
|
| MD5 |
669f00f3349121062c9bb56be2233d9b
|
|
| BLAKE2b-256 |
e7d2f3586ca83fb7f16ab1a9e2196cad0fdfdbc907001e0f1f516ae274e7bbbf
|