{"id":4645,"library":"neptune-fetcher","title":"Neptune Fetcher","description":"Neptune Fetcher was a Python library designed to efficiently retrieve experiment metadata, metrics, and logs from Neptune.ai projects, allowing users to query and organize data into Pandas DataFrames. It is currently at version 0.23.0, but the library is officially deprecated, with `neptune-query` being its recommended successor. Development is minimal, focusing on critical fixes and dependency updates, with no new features planned.","status":"deprecated","version":"0.23.0","language":"en","source_language":"en","source_url":"https://github.com/neptune-ai/neptune-fetcher","tags":["machine-learning","mlops","experiment-tracking","data-fetching","deprecated","neptune-ai"],"install":[{"cmd":"pip install neptune-fetcher","lang":"bash","label":"Install stable version"}],"dependencies":[{"reason":"Core dependency for interacting with the Neptune.ai backend.","package":"neptune-api","optional":false},{"reason":"Used for structuring fetched data into DataFrames.","package":"pandas","optional":false}],"imports":[{"note":"The `get_project` function is exposed directly at the top level of the package.","wrong":"from neptune_fetcher.fetcher import get_project","symbol":"get_project","correct":"from neptune_fetcher import get_project"}],"quickstart":{"code":"import neptune\nfrom neptune_fetcher import get_project\nimport os\n\n# NOTE: This library is deprecated. Use `neptune-query` instead.\n# Ensure NEPTUNE_API_TOKEN and NEPTUNE_PROJECT are set as environment variables\n\n# Initialize a Neptune project session (from neptune-client)\nproject_name = os.environ.get('NEPTUNE_PROJECT', 'common/quick-start') # Replace with your project\nproject_api_token = os.environ.get('NEPTUNE_API_TOKEN', 'ANONYMOUS')\n\nif project_api_token == 'ANONYMOUS':\n    print(\"Warning: Using anonymous access. Please set NEPTUNE_API_TOKEN for full functionality.\")\n\n# The neptune.init_project call is from neptune-client, required to authenticate\nneptune_project = neptune.init_project(\n    project=project_name,\n    api_token=project_api_token, \n    mode=\"read-only\"\n)\n\nprint(f\"Initialized Neptune Project: {neptune_project.full_id}\")\n\n# Use neptune-fetcher to get the project handler\nfetcher_project = get_project(project=neptune_project.full_id)\n\n# Fetch runs data as a Pandas DataFrame\nruns_df = fetcher_project.fetch_runs_df(columns=['sys/name', 'training/acc'], states=['succeeded'])\n\nprint(f\"Fetched {len(runs_df)} runs.\")\nif not runs_df.empty:\n    print(runs_df.head())\n\n# Stop the Neptune project session\nneptune_project.stop()\n","lang":"python","description":"This quickstart demonstrates how to initialize a Neptune project using `neptune-client` and then use `neptune-fetcher`'s `get_project` to fetch run data. It explicitly warns about the library's deprecation and recommends `neptune-query`."},"warnings":[{"fix":"Migrate your code to use `neptune-query`. Install with `pip install neptune-query` and refer to its documentation for updated usage patterns. The `get_project` and `fetch_*_df` methods have similar counterparts in `neptune-query` but with potentially different arguments and return types.","message":"The `neptune-fetcher` library is officially deprecated. Users are strongly advised to migrate to the `neptune-query` library for future development and maintenance. The `neptune-fetcher` will receive only critical bug fixes and dependency updates, with no new features.","severity":"breaking","affected_versions":"0.21.0 and later"},{"fix":"Ensure your environment uses a compatible Python version (3.9, 3.10, 3.11, 3.12). Consider updating your Python environment or using virtual environments.","message":"Python compatibility is limited to versions 3.9 and higher, but strictly less than 4.0. Users on older Python versions (e.g., 3.8) or attempting to use it with Python 4.0 (if released) will encounter installation or runtime errors.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Upgrade to `neptune-fetcher` version 0.22.0 or higher to benefit from performance improvements in DataFrame creation. Better yet, migrate to `neptune-query` which has optimized data handling.","message":"Prior to version 0.22.0, fetching large DataFrames could lead to `PerformanceWarning` due to inefficient column insertion, potentially impacting performance with very wide datasets.","severity":"gotcha","affected_versions":"<0.22.0"},{"fix":"Update to `neptune-fetcher` 0.20.1 or newer to get updated default retry timeouts. If you need fine-grained control, consider implementing custom retry logic or checking for configuration options within the underlying `neptune-api`.","message":"Default soft/hard retry timeouts for API calls were significantly increased in versions 0.20.1 and 0.21.0-beta.2/1. This can affect how long operations might hang before failing in case of network issues or server unresponsiveness.","severity":"gotcha","affected_versions":"<0.20.1"}],"env_vars":null,"last_verified":"2026-04-12T00:00:00.000Z","next_check":"2026-07-11T00:00:00.000Z"}