{"id":24666,"library":"stups-zign","title":"stups-zign","description":"OAuth2 token management CLI for obtaining and storing OAuth2 access tokens from OpenID Connect providers. Version 1.2.2 supports Python >=3.10. Developed by Zalando, no longer actively maintained.","status":"maintenance","version":"1.2.2","language":"python","source_language":"en","source_url":"https://github.com/zalando-build/zign","tags":["oauth2","token-management","cli","sts","zign"],"install":[{"cmd":"pip install stups-zign","lang":"bash","label":"Default install"}],"dependencies":[{"reason":"Used for token expiry parsing","package":"python-dateutil","optional":false},{"reason":"HTTP client for OAuth2 requests","package":"requests","optional":false},{"reason":"CLI framework","package":"click","optional":false}],"imports":[{"note":"Core class for managing tokens","wrong":"","symbol":"ZignTokenManager","correct":"from zign.api import ZignTokenManager"}],"quickstart":{"code":"from zign.api import ZignTokenManager\nimport os\n\n# Use environment variables for credentials (common pattern)\nclient_id = os.environ.get('ZIGN_CLIENT_ID', '')\nclient_secret = os.environ.get('ZIGN_CLIENT_SECRET', '')\nurl = os.environ.get('ZIGN_TOKEN_URL', 'https://example.com/oauth2/token')\n\nmanager = ZignTokenManager()\ntoken = manager.get_token(url=url, client_id=client_id, client_secret=client_secret)\nprint(token.get('access_token', 'No token retrieved'))","lang":"python","description":"Initialize token manager and obtain an OAuth2 token using environment variables."},"warnings":[{"fix":"Migrate to alternative token management solutions.","message":"stups-zign is in maintenance mode. The Zalando STUPS ecosystem is being phased out. Consider migrating to keyring-based token storage or using OAuth2 libraries directly.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Set the ZIGN_TOKEN_DIR environment variable to a custom path if needed.","message":"Token storage path defaults to ~/.zign/tokens.json. Ensure read/write permissions in that directory.","severity":"gotcha","affected_versions":"all"},{"fix":"Use .get('access_token') and handle missing token gracefully.","message":"The get_token method raises a KeyError if the required fields are missing in the response. Always check for access_token in the returned dict.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use 'import zign' after installing 'pip install stups-zign'.","cause":"The library is installed as 'stups-zign' but imported as 'zign'.","error":"ModuleNotFoundError: No module named 'zign'"},{"fix":"Use 'from zign.api import ZignTokenManager'.","cause":"ZignTokenManager is not imported correctly; it's in zign.api.","error":"AttributeError: module 'zign' has no attribute 'ZignTokenManager'"},{"fix":"Call get_token() to create the file automatically, or create an empty JSON file manually.","cause":"The tokens file does not exist until a token is first saved.","error":"FileNotFoundError: [Errno 2] No such file or directory: '/home/user/.zign/tokens.json'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}