{"id":26738,"library":"assemblyline","title":"Assemblyline","description":"Assemblyline is an automated malware analysis framework by the Canadian Centre for Cyber Security. This package (assemblyline) contains the core libraries and client components. The current version is 4.7.3.1, released from the assemblyline-base repository. Release cadence is irregular with a mix of dev and stable tags.","status":"active","version":"4.7.3.1","language":"python","source_language":"en","source_url":"https://github.com/CybercentreCanada/assemblyline-base","tags":["malware-analysis","security","automation","assemblyline"],"install":[{"cmd":"pip install assemblyline","lang":"bash","label":"Install from PyPI"},{"cmd":"pip install assemblyline[all]","lang":"bash","label":"Install with all extras"}],"dependencies":[{"reason":"HTTP requests to the Assemblyline API","package":"requests","optional":false},{"reason":"Configuration file parsing","package":"PyYAML","optional":false}],"imports":[{"note":"Client class is in a separate subpackage assemblyline_client","wrong":"from assemblyline import Client","symbol":"Client","correct":"from assemblyline_client import Client"},{"note":"Direct import from assemblyline.datastore is correct","wrong":"from assemblyline.datastore.collection import Datastore","symbol":"Datastore","correct":"from assemblyline.datastore import Datastore"}],"quickstart":{"code":"from assemblyline_client import Client\nimport os\n\n# Connect to an Assemblyline instance\nal_client = Client(\n    os.environ.get('AL_HOST', 'https://localhost:443'),\n    apikey=(os.environ.get('AL_USER', ''), os.environ.get('AL_APIKEY', ''))\n)\n\n# Submit a file for analysis\nresponse = al_client.submit('path/to/sample.exe')\nprint('Submission ID:', response['submission']['sid'])","lang":"python","description":"Connect to Assemblyline and submit a file."},"warnings":[{"fix":"Use 'from assemblyline_client import Client' instead of 'from assemblyline import Client'.","message":"In v4.x, the client library was split into assemblyline and assemblyline_client packages. Importing from assemblyline directly will fail.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Update your API calls to use /api/v4/ endpoints and the new Client methods.","message":"The old HTTP API using /api/v1/ endpoints is deprecated. New deployments use /api/v4/.","severity":"deprecated","affected_versions":">=4.4.0"},{"fix":"Use apikey=(al_user, al_apikey) as a tuple.","message":"Authentication via apikey requires a tuple (username, apikey). Passing a single string will result in a ValueError.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Install with: pip install assemblyline[all] (includes client) or pip install assemblyline-client separately.","cause":"The assemblyline_client subpackage was not installed.","error":"ModuleNotFoundError: No module named 'assemblyline_client'"},{"fix":"Ensure you import 'from assemblyline_client import Client' and use the correct API.","cause":"Using an outdated client constructor. The Client class is from assemblyline_client, not assemblyline.","error":"AttributeError: 'Client' object has no attribute 'submit'"},{"fix":"Pass credentials as a tuple: Client(host, apikey=('myuser', 'myapikey'))","cause":"The apikey parameter expects a tuple of (username, apikey).","error":"ValueError: Invalid authentication credentials"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}