{"library":"nominal-api","title":"Nominal API Python Client","description":"The official Python client for the Nominal API, providing programmatic access to financial time-series data, including inflation, economic indicators, and asset prices. The library is actively maintained and frequently updated, often releasing new versions with minor bug fixes and feature enhancements, though breaking changes can occur in pre-1.0 releases.","language":"python","status":"active","last_verified":"Fri Apr 17","install":{"commands":["pip install nominal-api"],"cli":null},"imports":["from nominal import NominalAPIClient"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import os\nfrom nominal import NominalAPIClient\n\napi_key = os.environ.get('NOMINAL_API_KEY', 'YOUR_NOMINAL_API_KEY_HERE')\n\nif api_key == 'YOUR_NOMINAL_API_KEY_HERE':\n    print(\"Please set the NOMINAL_API_KEY environment variable or replace 'YOUR_NOMINAL_API_KEY_HERE' with your actual key.\")\nelse:\n    try:\n        client = NominalAPIClient(api_key=api_key)\n        # Fetch CPI data for USD between specified dates\n        timeseries_data = client.get_timeseries(\"USD.CPI\", \"2020-01-01\", \"2020-12-31\")\n        print(\"Successfully fetched data:\")\n        print(f\"First entry: {timeseries_data[0]}\")\n        print(f\"Last entry: {timeseries_data[-1]}\")\n    except Exception as e:\n        print(f\"An error occurred: {e}\")","lang":"python","description":"Initialize the NominalAPIClient with your API key and fetch time-series data. This example retrieves CPI data for USD for the year 2020. Ensure your API key is configured either as an environment variable or directly in the code.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}