Configuration Options
Pixeltable can be configured through:- Environment variables
- System configuration file (
~/.pixeltable/config.toml
on Linux/macOS orC:\Users\<username>\.pixeltable\config.toml
on Windows)
config.toml
:
System Settings
Environment Variable | Config File | Meaning |
---|---|---|
PIXELTABLE_HOME | (string) Pixeltable user directory; default is ~/.pixeltable | |
PIXELTABLE_CONFIG | (string) Pixeltable config file; default is $PIXELTABLE_HOME/config.toml | |
PIXELTABLE_PGDATA | (string) Directory where Pixeltable DB is stored; default is $PIXELTABLE_HOME/pgdata | |
PIXELTABLE_DB | (string) Pixeltable database name; default is pixeltable | |
PIXELTABLE_FILE_CACHE_SIZE_G | [pixeltable] file_cache_size_g | (float) Maximum size of the Pixeltable file cache, in GiB; required |
PIXELTABLE_TIME_ZONE | [pixeltable] time_zone | (string) Default time zone in IANA format; defaults to the system time zone |
PIXELTABLE_HIDE_WARNINGS | [pixeltable] hide_warnings | (bool) Suppress warnings generated by various libraries used by Pixeltable; default is false |
PIXELTABLE_VERBOSITY | [pixeltable] verbosity | (int) Verbosity for Pixeltable console logging (0: minimum, 1: normal, 2: maximum); default is 1 |
API Configuration
Environment Variable | Config File | Meaning |
---|---|---|
ANTHROPIC_API_KEY | [anthropic] api_key | (string) API key to use for Anthropic services |
DEEPSEEK_API_KEY | [deepseek] api_key | (string) API key to use for Deepseek services |
FIREWORKS_API_KEY | [fireworks] api_key | (string) API key to use for Fireworks AI services |
GEMINI_API_KEY | [gemini] api_key | (string) API key to use for Google Gemini services |
LABEL_STUDIO_API_KEY | [label_studio] api_key | (string) API key to use for Label Studio |
LABEL_STUDIO_URL | [label_studio] url | (string) URL of the Label Studio server to use |
MISTRAL_API_KEY | [mistral] api_key | (string) API key to use for Mistral AI services |
OPENAI_API_KEY | [openai] api_key | (string) API key to use for OpenAI services |
OPENAI_BASE_URL | [openai] base_url | (string, optional) Base URL to use for OpenAI services |
OPENAI_API_VERSION | [openai] api_version | (string) API version for use with Azure OpenAI; must be 'latest' or 'preview' |
REPLICATE_API_TOKEN | [replicate] api_token | (string) API token to use for Replicate services |
TOGETHER_API_KEY | [together] api_key | (string) API key to use for Together AI services |
Rate Limit Configuration
Pixeltable supports two patterns for configuring API rate limits inconfig.toml
. Refer to the docstring of the
relevant udf in the API reference for details on the rate limiting pattern used by that udf.
Single Rate Limit per Provider
For providers with a single rate limit across all models, add arate_limit
key to the provider’s config section:
Per-Model Rate Limits
For providers that support different rate limits for different models, add a<provider>.rate_limits
section and list the rate limits for each model:
Configuration Best Practices
Security Considerations
When configuring API keys and sensitive information:- Avoid hardcoding API keys in your code
- Use environment variables for temporary access
- Use the config file for persistent configuration
- Ensure your config.toml file has appropriate permissions (readable only by you)
Performance Tuning
- Adjust
file_cache_size_g
based on your available system memory - For large datasets, increase the cache size to improve performance
- Set appropriate verbosity level based on your debugging needs
Applying Configuration Changes
Configuration changes take effect:- For environment variables: When you restart your Python session
- For config file changes: When you restart your Python session or call
pxt.init()
again
Installation Guide
Return to the installation guide for setup instructions