{"id":21341,"library":"filestack-python","title":"Filestack Python SDK","description":"A Python SDK for the Filestack API, providing file upload, transformation, and delivery services. Version 4.0.0 is the latest major release with async support and reorganized client architecture. Releases are semi-regular with breaking changes between major versions.","status":"active","version":"4.0.0","language":"python","source_language":"en","source_url":"https://github.com/filestack/filestack-python","tags":["filestack","file upload","sdk","cloud"],"install":[{"cmd":"pip install filestack-python","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"In v4, 'Client' is the primary class, imported from 'filestack' directly, not 'FilestackClient'.","wrong":"from filestack import FilestackClient","symbol":"FilestackClient","correct":"from filestack import Client as FilestackClient"},{"note":"","wrong":"","symbol":"Client","correct":"from filestack import Client"}],"quickstart":{"code":"import os\nfrom filestack import Client\n\napi_key = os.environ.get('FILESTACK_API_KEY', '')\nclient = Client(api_key)\n\n# upload a file\nfilelink = client.upload(filepath='path/to/file.pdf')\nprint(filelink.url)","lang":"python","description":"Initialize the client with your API key and upload a file."},"warnings":[{"fix":"Update import: from filestack import Client (instead of from filestack import FilestackClient).","message":"v4 introduces a breaking change: the module structure changed. 'filestack' now exports 'Client' directly, replacing the old 'FilestackClient' from 'filestack-python' in v3.","severity":"breaking","affected_versions":">=4.0.0,<5.0.0"},{"fix":"Use filelink.url instead of filelink['url'].","message":"The upload method in v4 returns a Filelink object, not a dict. Accessing the URL requires .url attribute.","severity":"gotcha","affected_versions":">=4.0.0"},{"fix":"Always pass your API key: Client('your-api-key').","message":"API key is required even for public uploads unless using a security policy. The Client constructor expects the API key as the first positional argument.","severity":"gotcha","affected_versions":"all"},{"fix":"pip install filestack-python and import from filestack.","message":"v4 removed the 'Filestack' class and the 'filestack-python' top-level package. Use 'filestack' only.","severity":"deprecated","affected_versions":">=4.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"pip install filestack-python and use import filestack. Do not try to import 'filestack-python' directly.","cause":"The package is installed as 'filestack-python' but imported as 'filestack'.","error":"ModuleNotFoundError: No module named 'filestack'"},{"fix":"Use: from filestack import Client","cause":"Using old v3 import pattern with v4 installed.","error":"ImportError: cannot import name 'FilestackClient' from 'filestack'"},{"fix":"Provide the filepath argument: client.upload(filepath='path/to/file.pdf')","cause":"The upload method requires a filepath or file-like object as first argument.","error":"TypeError: upload() missing 1 required positional argument: 'filepath'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}