{"id":5139,"library":"box-sdk-gen","title":"Box Python Generated SDK","description":"The `box-sdk-gen` library is the official Box Python SDK, designed for rapid API updates and comprehensive coverage of the Box API. However, as of September 17, 2025, this standalone package will no longer receive updates, bug fixes, or new features. Its functionalities have been consolidated into the `boxsdk` package (version 10.0.0 and higher), which now contains the `box_sdk_gen` module. Users are strongly advised to migrate to `boxsdk>=10` for continued support and access to the latest features. The current version is 1.17.0, and the consolidated `boxsdk` maintains a regular release cadence for minor/patch versions every 2-3 months.","status":"deprecated","version":"1.17.0","language":"en","source_language":"en","source_url":"https://github.com/box/box-python-sdk-gen","tags":["box","sdk","api","cloud storage","file management","enterprise"],"install":[{"cmd":"pip install box-sdk-gen","lang":"bash","label":"Direct installation (deprecated)"},{"cmd":"pip install boxsdk>=10","lang":"bash","label":"Recommended: Consolidated SDK"},{"cmd":"pip install \"boxsdk[jwt]>=10\"","lang":"bash","label":"Recommended: Consolidated SDK with JWT support"}],"dependencies":[{"reason":"Required for JWT authentication, installed via 'boxsdk[jwt]' extra.","package":"PyJWT","optional":true}],"imports":[{"symbol":"BoxClient","correct":"from box_sdk_gen import BoxClient"},{"symbol":"BoxDeveloperTokenAuth","correct":"from box_sdk_gen import BoxDeveloperTokenAuth"},{"note":"JWT authentication classes are found in the `jwt_auth` submodule.","wrong":"from box_sdk_gen import BoxJWTAuth","symbol":"BoxJWTAuth","correct":"from box_sdk_gen.jwt_auth import BoxJWTAuth"},{"note":"Client Credentials Grant configuration is in the `ccg_auth` submodule.","wrong":"from box_sdk_gen import CCGConfig","symbol":"CCGConfig","correct":"from box_sdk_gen.ccg_auth import CCGConfig"}],"quickstart":{"code":"import os\nfrom box_sdk_gen import BoxClient, BoxDeveloperTokenAuth\n\n# It's recommended to set your developer token as an environment variable\n# For testing, you can replace os.environ.get with your actual token string\nDEVELOPER_TOKEN = os.environ.get('BOX_DEVELOPER_TOKEN', 'YOUR_DEVELOPER_TOKEN')\n\nif not DEVELOPER_TOKEN or DEVELOPER_TOKEN == 'YOUR_DEVELOPER_TOKEN':\n    print(\"Please set the BOX_DEVELOPER_TOKEN environment variable or replace the placeholder.\")\nelse:\n    try:\n        auth = BoxDeveloperTokenAuth(token=DEVELOPER_TOKEN)\n        client = BoxClient(auth=auth)\n\n        # Get information about the current user\n        me = client.users.get_user_me()\n        print(f\"Hello, I'm {me.name} (ID: {me.id}) - Login: {me.login}\")\n\n        # List items in the root folder (ID '0')\n        print(\"\\nItems in your root folder:\")\n        root_folder_items = client.folders.get_folder_items('0').entries\n        if root_folder_items:\n            for item in root_folder_items:\n                print(f\"  - {item.type.value.capitalize()}: {item.name} (ID: {item.id})\")\n        else:\n            print(\"  No items found in the root folder.\")\n\n    except Exception as e:\n        print(f\"An error occurred: {e}\")\n        print(\"Please ensure your developer token is valid and has the necessary permissions.\")","lang":"python","description":"This quickstart demonstrates how to authenticate using a Developer Token and fetch information about the current user and list items in the root folder. For production environments, consider more robust authentication methods like OAuth 2.0 or JWT. The developer token should be obtained from your Box Developer Console."},"warnings":[{"fix":"Migrate your project to use `boxsdk` version 10.0.0 or higher. Install with `pip install boxsdk>=10`. The `box_sdk_gen` module will be available within the `boxsdk` package, so imports like `from box_sdk_gen import ...` will continue to work after migration.","message":"The standalone `box-sdk-gen` package is deprecated as of September 17, 2025. It will no longer receive new features, updates, bug fixes, or security patches. All future development is consolidated into the `boxsdk` package (version 10.0.0 and higher).","severity":"breaking","affected_versions":"< 1.17.0 (as standalone)"},{"fix":"Consult the Box SDK versioning strategy and migration guides for detailed instructions when moving to the consolidated `boxsdk` package. Thoroughly test your application after upgrading.","message":"When upgrading to `boxsdk` v10+, significant interface changes may be present, especially for older `boxsdk` users. While `box_sdk_gen` retains its internal structure, the overarching `boxsdk` client instantiation and some method signatures may have been updated.","severity":"gotcha","affected_versions":"All versions when migrating from older `boxsdk` to `boxsdk>=10`"},{"fix":"For production, implement more secure and robust authentication methods such as OAuth 2.0, Client Credentials Grant (CCG), or JSON Web Token (JWT) as detailed in the official Box authentication documentation.","message":"Using a Developer Token is suitable only for testing and development. These tokens are short-lived and cannot be refreshed, making them unsuitable for production applications.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure correct import paths for authentication-related classes, e.g., `from box_sdk_gen.jwt_auth import BoxJWTAuth` or `from box_sdk_gen.ccg_auth import CCGConfig`.","message":"Specific authentication classes (e.g., for JWT, CCG) are located in submodules like `box_sdk_gen.jwt_auth` or `box_sdk_gen.ccg_auth`, not directly under `box_sdk_gen`.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-13T00:00:00.000Z","next_check":"2026-07-12T00:00:00.000Z"}