{"id":27748,"library":"flowclient","title":"FlowClient","description":"A Python client library for interacting with the FlowMachine API, providing access to aggregated network data analysis queries. Current version 1.34.0, released on 2025-05-09. Requires Python >=3.6. Released approximately every 2-3 months.","status":"active","version":"1.34.0","language":"python","source_language":"en","source_url":"https://github.com/Flowminder/FlowKit","tags":["flowkit","api-client","network-data","aggregation"],"install":[{"cmd":"pip install flowclient","lang":"bash","label":"Default install"}],"dependencies":[],"imports":[{"note":"FlowClient is in the client submodule; top-level import works but is less explicit.","wrong":"from flowclient import FlowClient","symbol":"FlowClient","correct":"from flowclient.client import FlowClient"},{"note":"","wrong":null,"symbol":"get_available_dates","correct":"from flowclient.client import get_available_dates"}],"quickstart":{"code":"from flowclient.client import FlowClient\nimport os\n\nclient = FlowClient(\n    url=os.environ.get(\"FLOWKIT_URL\", \"http://localhost:9090\"),\n    token=os.environ.get(\"FLOWKIT_TOKEN\", \"\")\n)\ntry:\n    print(client.get_available_dates())\nexcept Exception as e:\n    print(f\"Error: {e}\")","lang":"python","description":"Connect to a FlowMachine API and retrieve available dates."},"warnings":[{"fix":"Always test connectivity with a simple query like get_available_dates() after creating the client.","message":"Token authentication is required, but the token is not validated on client instantiation. Errors will only appear when making the first query.","severity":"gotcha","affected_versions":"all"},{"fix":"Always provide a full URL, e.g., 'http://localhost:9090'.","message":"The parameter 'url' in FlowClient must include the scheme (http:// or https://). Omitting it causes obscure connection errors.","severity":"gotcha","affected_versions":"all"},{"fix":"For synchronous behaviour, use client.run_query(query_id) after constructing the query or use the function's sync variant if available.","message":"Some query functions return an 'id' (a query ID) instead of results. You must use run_async() or similar to execute synchronous queries.","severity":"gotcha","affected_versions":">=1.0"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"pip install flowclient","cause":"Library not installed in current environment.","error":"ModuleNotFoundError: No module named 'flowclient'"},{"fix":"from flowclient.client import FlowClient","cause":"Importing FlowClient from top-level instead of submodule.","error":"AttributeError: module 'flowclient' has no attribute 'FlowClient'"},{"fix":"Check URL includes http:// or https:// and server is running.","cause":"Wrong URL scheme or server not reachable.","error":"requests.exceptions.ConnectionError"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}