{"id":21826,"library":"python-nomad","title":"python-nomad","description":"Client library for Hashicorp Nomad, currently at version 2.1.0. Provides a Pythonic interface to the Nomad HTTP API. Release cadence is irregular with occasional major breaking changes.","status":"active","version":"2.1.0","language":"python","source_language":"en","source_url":"https://github.com/jrxfive/python-nomad","tags":["nomad","hashicorp","client","api","orchestrator"],"install":[{"cmd":"pip install python-nomad","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"HTTP library used for all API calls","package":"requests","optional":false}],"imports":[{"note":"Package name is 'nomad' not 'python_nomad'","wrong":"from python_nomad import Nomad","symbol":"Nomad","correct":"from nomad import Nomad"},{"note":"Exception classes are under nomad.api.exceptions","wrong":"from nomad import NomadException","symbol":"NomadException","correct":"from nomad.api.exceptions import BaseNomadException"}],"quickstart":{"code":"from nomad import Nomad\n\nclient = Nomad(\n    host='http://127.0.0.1:4646',\n    token=os.environ.get('NOMAD_TOKEN', ''),\n)\njobs = client.jobs.get_jobs()\nprint(jobs)","lang":"python","description":"Initialise a Nomad client and list all jobs."},"warnings":[{"fix":"Rename 'id' to 'id_' and 'type' to 'type_' in all API calls.","message":"In version 2.0.0, arguments named 'id' and 'type' were renamed to 'id_' and 'type_' to avoid shadowing built-ins. Code using keyword arguments 'id=' or 'type=' will break.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Upgrade to Python 3.7+.","message":"Python 2 and Python 3.6 support dropped in version 2.0.0. Also drop Python 3.5 in 1.5.0.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Always pass host='http://your-nomad-server:4646' or implement custom env var reading.","message":"The environment variable NOMAD_ADDR is not read automatically; you must pass 'host' explicitly to Nomad constructor. Only NOMAD_TOKEN is read from environment by default.","severity":"gotcha","affected_versions":"all"},{"fix":"Use client.vars and client.var for accessing variable endpoints.","message":"The 'registry' endpoint methods (e.g., client.registry) may be deprecated in favor of 'vars' and 'var' endpoints. Check Nomad API documentation.","severity":"deprecated","affected_versions":">=1.5.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run 'pip install python-nomad' and ensure you import using 'from nomad import Nomad'.","cause":"The package is not installed or import path is incorrect. Usually means 'python-nomad' is not installed.","error":"ImportError: cannot import name 'Nomad' from 'nomad'"},{"fix":"Verify Nomad host is reachable and token is correct. Ensure host starts with http:// or https://.","cause":"Initialization failed due to missing or invalid host/token, causing the client to not properly set up endpoints.","error":"AttributeError: 'Nomad' object has no attribute 'jobs'"},{"fix":"Replace 'id=...' with 'id_=...' in your call.","cause":"Passing keyword argument 'id' to an API method after version 2.0.0, where it was renamed to 'id_'.","error":"TypeError: get_jobs() got an unexpected keyword argument 'id'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}