Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

pfeed creates a config file at ~/.pfeed/config/ on first use. Your project’s .env file, if any, is also loaded automatically; variables already set in your environment take precedence. To turn this off, set the environment variable PFEED_LOAD_DOTENV=0.

View Config

import pfeed as pe

config = pe.get_config()

Or from the command line:

pfeed config list   # print the config and the config file's path
pfeed config where  # print the config directory

Change Config

In Python

Call pe.configure() before anything else. Only the options you pass are changed:

pe.configure(
    data_path="path/to/data",
    log_path="path/to/logs",
    show_progress_bar=False,
)

Changes apply to the current session only. Pass persist=True to also save them to the config file.

OptionDefaultDescription
data_path~/.pfeed/data/where data is stored
log_path~/.pfeed/logs/where logs are written
show_progress_barTruewhether progress bars are shown
allow_timestamp_precision_lossFalsewhether IOs with coarser timestamps (e.g. microseconds) may truncate finer ones (e.g. nanoseconds) with a warning, instead of raising
stream_latency_log_intervalNoneseconds between a stream’s latency logs (at DEBUG level); None disables latency tracking
stream_optimize_interval1800seconds between optimize() calls on the table IOs (e.g. DuckLake) a stream writes to; 0 runs it once, when the streams end

From the Command Line

This changes the config file directly:

pfeed config set --data path/to/data --log path/to/logs

Or open the config file in your editor:

pfeed config open --config-file

To restore the defaults:

pfeed config reset --config-file

Logging

pfeed logs follow the Python logging config format, defined in a logging.yaml file in the config directory.

To change it for the current session, call pe.configure_logging() before creating a feed. Your settings are merged on top of logging.yaml:

# only print WARNING and above to the console
pe.configure_logging({"handlers": {"stream_handler": {"level": "WARNING"}}})

# or set every logger and handler to DEBUG
pe.configure_logging(debug=True)

To change it permanently, edit logging.yaml:

pfeed config open --logging-file