<p align="center">
<img src="https://github.com/box/sdks/blob/master/images/box-dev-logo.png" alt= “box-dev-logo” width="30%" height="50%">
</p>
# Box Python SDK GENERATED
[![Project Status](http://opensource.box.com/badges/active.svg)](http://opensource.box.com/badges)
![build](https://github.com/box/box-python-sdk-gen/actions/workflows/build.yml/badge.svg)
[![PyPI version](https://badge.fury.io/py/box-sdk-gen.svg)](https://badge.fury.io/py/box-sdk-gen)
[![image](https://img.shields.io/pypi/dm/box-sdk-gen.svg)](https://pypi.python.org/pypi/box-sdk-gen)
![Platform](https://img.shields.io/badge/python-3.8+-blue)
[![Coverage](https://coveralls.io/repos/github/box/box-python-sdk-gen/badge.svg?branch=main)](https://coveralls.io/github/box/box-python-sdk-gen?branch=main)
We are excited to introduce the stable release of the latest generation of Box Python SDK, designed to elevate the developer experience and streamline your integration with the Box Content Cloud.
With this SDK, you’ll have access to:
1. Full API Support: The new generation of Box SDKs empowers developers with complete coverage of the Box API ecosystem. You can now access all the latest features and functionalities offered by Box, allowing you to build even more sophisticated and feature-rich applications.
2. Rapid API Updates: Say goodbye to waiting for new Box APIs to be incorporated into the SDK. With our new auto-generation development approach, we can now add new Box APIs to the SDK at a much faster pace (in a matter of days). This means you can leverage the most up-to-date features in your applications without delay.
3. Embedded Documentation: We understand that easy access to information is crucial for developers. With our new approach, we have included comprehensive documentation for all objects and parameters directly in the source code of the SDK. This means you no longer need to look up this information on the developer portal, saving you time and streamlining your development process.
4. Enhanced Convenience Methods: Our commitment to enhancing your development experience continues with the introduction of convenience methods. These methods cover various aspects such as chunk uploads, classification, and much more.
5. Seamless Start: The new SDKs integrate essential functionalities like authentication, automatic retries with exponential backoff, exception handling, request cancellation, and type checking, enabling you to focus solely on your application's business logic.
Embrace the new generation of Box SDKs and unlock the full potential of the Box Content Cloud.
# Table of contents
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
- [Installing](#installing)
- [Getting Started](#getting-started)
- [Documentation](#documentation)
- [Upgrades](#upgrades)
- [Integration Tests](#integration-tests)
- [Running integration tests locally](#running-integration-tests-locally)
- [Create Custom Application](#create-custom-application)
- [Export configuration](#export-configuration)
- [Running tests](#running-tests)
- [Questions, Bugs, and Feature Requests?](#questions-bugs-and-feature-requests)
- [Copyright and License](#copyright-and-license)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
# Installing
```console
pip install box-sdk-gen
```
This is autogenerated Box SDK version.
Supported Python versions are Python 3.8 and above.
To install also extra dependencies required for JWT authentication, use command:
```console
pip install "box-sdk-gen[jwt]"
```
# Getting Started
To get started with the SDK, get a Developer Token from the Configuration page of your app in the [Box Developer
Console](https://app.box.com/developers/console). You can use this token to make test calls for your own Box account.
The SDK provides an `BoxDeveloperTokenAuth` class, which allows you to authenticate using your Developer Token.
Use instance of `BoxDeveloperTokenAuth` to initialize `BoxClient` object.
Using `BoxClient` object you can access managers, which allow you to perform some operations on your Box account.
The example below demonstrates how to authenticate with Developer Token and print names of all items inside a root folder.
```python
from box_sdk_gen import BoxClient, BoxDeveloperTokenAuth
def main(token: str):
auth: BoxDeveloperTokenAuth = BoxDeveloperTokenAuth(token=token)
client: BoxClient = BoxClient(auth=auth)
for item in client.folders.get_folder_items('0').entries:
print(item.name)
if __name__ == '__main__':
main('INSERT YOUR DEVELOPER TOKEN HERE')
```
# Documentation
Browse the [docs](docs/README.md) or see [API Reference](https://developer.box.com/reference/) for more information.
# Upgrades
Upgrading from our legacy SDKs to the new generation SDKs is a straightforward process. See our [migration guide](migration-guide.md) and [changelog](CHANGELOG.md) for more information.
# Integration Tests
## Running integration tests locally
### Create Custom Application
To run integration tests locally you will need a `Custom App` created in the [Box Developer
Console](https://app.box.com/developers/console)
with `Server Authentication (with JWT)` selected as authentication method.
Once created you can edit properties of the application:
- In section `App Access Level` select `App + Enterprise Access`. You can enable all `Application Scopes`.
- In section `Advanced Features` enable `Make API calls using the as-user header` and `Generate user access tokens`.
Now select `Authorization` and submit application to be reviewed by account admin.
### Export configuration
1. Select `Configuration` tab and in the bottom in the section `App Settings`
download your app configuration settings as JSON.
2. Encode configuration file to Base64, e.g. using command: `base64 -i path_to_json_file`
3. Set environment variable: `JWT_CONFIG_BASE_64` with base64 encoded jwt configuration file
4. Set environment variable: `BOX_FILE_REQUEST_ID` with ID of file request already created in the user account, `BOX_EXTERNAL_USER_EMAIL` with email of free external user which not belongs to any enterprise.
5. Set environment variable: `WORKFLOW_FOLDER_ID` with the ID of the Relay workflow that deletes the file that triggered the workflow. The workflow should have a manual start to be able to start it from the API.
6. Set environment variable: `APP_ITEM_ASSOCIATION_FILE_ID` to the ID of the file with associated app item and `APP_ITEM_ASSOCIATION_FOLDER_ID` to the ID of the folder with associated app item.
### Running tests
To run integration tests locally:
1. `pip install -r requirements-test.txt`
2. `pytest`
# Questions, Bugs, and Feature Requests?
Need to contact us directly? [Browse the issues
tickets](https://github.com/box/box-python-sdk-gen/issues)! Or, if that
doesn't work, [file a new
one](https://github.com/box/box-python-sdk-gen/issues/new) and we will get
back to you. If you have general questions about the Box API, you can
post to the [Box Developer Forum](https://forum.box.com/).
# Copyright and License
Copyright 2023 Box, Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Raw data
{
"_id": null,
"home_page": "https://github.com/box/box-python-sdk-gen.git",
"name": "box-sdk-gen",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "box, sdk, api, rest, boxsdk, box-sdk-gen",
"author": "Box",
"author_email": "oss@box.com",
"download_url": "https://files.pythonhosted.org/packages/4b/a5/f0f3dd3104d71a2f8c7a7df77697f6c4a0b98dc81ec5b3b5052050e2fa92/box_sdk_gen-1.8.0.tar.gz",
"platform": null,
"description": "<p align=\"center\">\n <img src=\"https://github.com/box/sdks/blob/master/images/box-dev-logo.png\" alt= \u201cbox-dev-logo\u201d width=\"30%\" height=\"50%\">\n</p>\n\n# Box Python SDK GENERATED\n\n[![Project Status](http://opensource.box.com/badges/active.svg)](http://opensource.box.com/badges)\n![build](https://github.com/box/box-python-sdk-gen/actions/workflows/build.yml/badge.svg)\n[![PyPI version](https://badge.fury.io/py/box-sdk-gen.svg)](https://badge.fury.io/py/box-sdk-gen)\n[![image](https://img.shields.io/pypi/dm/box-sdk-gen.svg)](https://pypi.python.org/pypi/box-sdk-gen)\n![Platform](https://img.shields.io/badge/python-3.8+-blue)\n[![Coverage](https://coveralls.io/repos/github/box/box-python-sdk-gen/badge.svg?branch=main)](https://coveralls.io/github/box/box-python-sdk-gen?branch=main)\n\nWe are excited to introduce the stable release of the latest generation of Box Python SDK, designed to elevate the developer experience and streamline your integration with the Box Content Cloud.\n\nWith this SDK, you\u2019ll have access to:\n\n1. Full API Support: The new generation of Box SDKs empowers developers with complete coverage of the Box API ecosystem. You can now access all the latest features and functionalities offered by Box, allowing you to build even more sophisticated and feature-rich applications.\n2. Rapid API Updates: Say goodbye to waiting for new Box APIs to be incorporated into the SDK. With our new auto-generation development approach, we can now add new Box APIs to the SDK at a much faster pace (in a matter of days). This means you can leverage the most up-to-date features in your applications without delay.\n3. Embedded Documentation: We understand that easy access to information is crucial for developers. With our new approach, we have included comprehensive documentation for all objects and parameters directly in the source code of the SDK. This means you no longer need to look up this information on the developer portal, saving you time and streamlining your development process.\n4. Enhanced Convenience Methods: Our commitment to enhancing your development experience continues with the introduction of convenience methods. These methods cover various aspects such as chunk uploads, classification, and much more.\n5. Seamless Start: The new SDKs integrate essential functionalities like authentication, automatic retries with exponential backoff, exception handling, request cancellation, and type checking, enabling you to focus solely on your application's business logic.\n\nEmbrace the new generation of Box SDKs and unlock the full potential of the Box Content Cloud.\n\n# Table of contents\n\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n\n- [Installing](#installing)\n- [Getting Started](#getting-started)\n- [Documentation](#documentation)\n- [Upgrades](#upgrades)\n- [Integration Tests](#integration-tests)\n - [Running integration tests locally](#running-integration-tests-locally)\n - [Create Custom Application](#create-custom-application)\n - [Export configuration](#export-configuration)\n - [Running tests](#running-tests)\n- [Questions, Bugs, and Feature Requests?](#questions-bugs-and-feature-requests)\n- [Copyright and License](#copyright-and-license)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# Installing\n\n```console\npip install box-sdk-gen\n```\n\nThis is autogenerated Box SDK version.\nSupported Python versions are Python 3.8 and above.\n\nTo install also extra dependencies required for JWT authentication, use command:\n\n```console\npip install \"box-sdk-gen[jwt]\"\n```\n\n# Getting Started\n\nTo get started with the SDK, get a Developer Token from the Configuration page of your app in the [Box Developer\nConsole](https://app.box.com/developers/console). You can use this token to make test calls for your own Box account.\n\nThe SDK provides an `BoxDeveloperTokenAuth` class, which allows you to authenticate using your Developer Token.\nUse instance of `BoxDeveloperTokenAuth` to initialize `BoxClient` object.\nUsing `BoxClient` object you can access managers, which allow you to perform some operations on your Box account.\n\nThe example below demonstrates how to authenticate with Developer Token and print names of all items inside a root folder.\n\n```python\nfrom box_sdk_gen import BoxClient, BoxDeveloperTokenAuth\n\ndef main(token: str):\n auth: BoxDeveloperTokenAuth = BoxDeveloperTokenAuth(token=token)\n client: BoxClient = BoxClient(auth=auth)\n for item in client.folders.get_folder_items('0').entries:\n print(item.name)\n\nif __name__ == '__main__':\n main('INSERT YOUR DEVELOPER TOKEN HERE')\n```\n\n# Documentation\n\nBrowse the [docs](docs/README.md) or see [API Reference](https://developer.box.com/reference/) for more information.\n\n# Upgrades\n\nUpgrading from our legacy SDKs to the new generation SDKs is a straightforward process. See our [migration guide](migration-guide.md) and [changelog](CHANGELOG.md) for more information.\n\n# Integration Tests\n\n## Running integration tests locally\n\n### Create Custom Application\n\nTo run integration tests locally you will need a `Custom App` created in the [Box Developer\nConsole](https://app.box.com/developers/console)\nwith `Server Authentication (with JWT)` selected as authentication method.\nOnce created you can edit properties of the application:\n\n- In section `App Access Level` select `App + Enterprise Access`. You can enable all `Application Scopes`.\n- In section `Advanced Features` enable `Make API calls using the as-user header` and `Generate user access tokens`.\n\nNow select `Authorization` and submit application to be reviewed by account admin.\n\n### Export configuration\n\n1. Select `Configuration` tab and in the bottom in the section `App Settings`\n download your app configuration settings as JSON.\n2. Encode configuration file to Base64, e.g. using command: `base64 -i path_to_json_file`\n3. Set environment variable: `JWT_CONFIG_BASE_64` with base64 encoded jwt configuration file\n4. Set environment variable: `BOX_FILE_REQUEST_ID` with ID of file request already created in the user account, `BOX_EXTERNAL_USER_EMAIL` with email of free external user which not belongs to any enterprise.\n5. Set environment variable: `WORKFLOW_FOLDER_ID` with the ID of the Relay workflow that deletes the file that triggered the workflow. The workflow should have a manual start to be able to start it from the API.\n6. Set environment variable: `APP_ITEM_ASSOCIATION_FILE_ID` to the ID of the file with associated app item and `APP_ITEM_ASSOCIATION_FOLDER_ID` to the ID of the folder with associated app item.\n\n### Running tests\n\nTo run integration tests locally:\n\n1. `pip install -r requirements-test.txt`\n2. `pytest`\n\n# Questions, Bugs, and Feature Requests?\n\nNeed to contact us directly? [Browse the issues\ntickets](https://github.com/box/box-python-sdk-gen/issues)! Or, if that\ndoesn't work, [file a new\none](https://github.com/box/box-python-sdk-gen/issues/new) and we will get\nback to you. If you have general questions about the Box API, you can\npost to the [Box Developer Forum](https://forum.box.com/).\n\n# Copyright and License\n\nCopyright 2023 Box, Inc. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
"bugtrack_url": null,
"license": "Apache-2.0, http://www.apache.org/licenses/LICENSE-2.0",
"summary": "Official Box Python Generated SDK",
"version": "1.8.0",
"project_urls": {
"Homepage": "https://github.com/box/box-python-sdk-gen.git"
},
"split_keywords": [
"box",
" sdk",
" api",
" rest",
" boxsdk",
" box-sdk-gen"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d7e62e8a2f92057684cf949d1b953018ff21185ab272aa02fa7d943ce069453d",
"md5": "58c667bd1b407e42f34804b689ce67e0",
"sha256": "cd460b9b67798e6efc5b0619b859b5f320c5c4901b48d0f2085df64b9e50c801"
},
"downloads": -1,
"filename": "box_sdk_gen-1.8.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "58c667bd1b407e42f34804b689ce67e0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 436644,
"upload_time": "2024-12-02T16:50:10",
"upload_time_iso_8601": "2024-12-02T16:50:10.426174Z",
"url": "https://files.pythonhosted.org/packages/d7/e6/2e8a2f92057684cf949d1b953018ff21185ab272aa02fa7d943ce069453d/box_sdk_gen-1.8.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4ba5f0f3dd3104d71a2f8c7a7df77697f6c4a0b98dc81ec5b3b5052050e2fa92",
"md5": "82fbf1b71670d254b274b0f5c137e93f",
"sha256": "17513b3f0fec35e149a3051c9f002db927cd2c740885839a59d2ba40f1d9b055"
},
"downloads": -1,
"filename": "box_sdk_gen-1.8.0.tar.gz",
"has_sig": false,
"md5_digest": "82fbf1b71670d254b274b0f5c137e93f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 219657,
"upload_time": "2024-12-02T16:50:12",
"upload_time_iso_8601": "2024-12-02T16:50:12.066621Z",
"url": "https://files.pythonhosted.org/packages/4b/a5/f0f3dd3104d71a2f8c7a7df77697f6c4a0b98dc81ec5b3b5052050e2fa92/box_sdk_gen-1.8.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-02 16:50:12",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "box",
"github_project": "box-python-sdk-gen",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"tox": true,
"lcname": "box-sdk-gen"
}